From e7fc14fcd3aaf1b3b6e51f0f6cb9b5ade296cf33 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..592d11f4 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.12"; + 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; }); }