From cb72de413d83b59ca8e5b6639254b4b87ec1aea3 Mon Sep 17 00:00:00 2001 From: Aaron Honeycutt Date: Thu, 12 Sep 2024 09:50:19 -0600 Subject: [PATCH] fix: using package in a flake input --- flake.nix | 23 ++++++++++++++--------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/flake.nix b/flake.nix index daa0fcdc..60559dbb 100644 --- a/flake.nix +++ b/flake.nix @@ -12,18 +12,23 @@ let pkgs = import nixpkgs { inherit system; }; naersk-lib = naersk.lib."${system}"; - cargo = pkgs.cargo; - in { - defaultPackage = naersk-lib.buildPackage { - name = "system76-keyboard-configurator"; - version = "1.3.0"; - src = ./.; - buildInputs = - (with pkgs; [ pkg-config rustc cargo hidapi glib gtk3 ]); + in + { + packages = rec { + default = system76-keyboard-configurator; + + system76-keyboard-configurator = naersk-lib.buildPackage { + name = "system76-keyboard-configurator"; + version = "1.3.0"; + src = ./.; + buildInputs = with pkgs; [ pkg-config rustc cargo hidapi glib gtk3 ]; + }; }; - devShell = pkgs.mkShell { + + devShells.default = pkgs.mkShell { buildInputs = with pkgs; [ pkg-config rustc cargo hidapi glib gtk3 ]; }; + formatter = nixpkgs.legacyPackages."${system}".nixfmt; }); }