From ee29c54eef468483f036817e7ab6f4029274da3f Mon Sep 17 00:00:00 2001 From: "DavidCrompton1192@gmail.com" Date: Wed, 15 Mar 2023 22:52:36 -0400 Subject: [PATCH] Use Package not Application --- deploy/flake.nix | 2 +- flake.nix | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/deploy/flake.nix b/deploy/flake.nix index 620856a..5931974 100644 --- a/deploy/flake.nix +++ b/deploy/flake.nix @@ -4,7 +4,7 @@ outputs = { self, nixpkgs, handyhelper }: let system = "x86_64-linux"; - handy_py = handyhelper.packages.${system}.handyhelper; + handy_py = handyhelper.packages.${system}.handyhelper_pkg; in { nixosConfigurations."staging" = nixpkgs.lib.nixosSystem { inherit system; diff --git a/flake.nix b/flake.nix index 0777276..a52995b 100644 --- a/flake.nix +++ b/flake.nix @@ -11,8 +11,7 @@ outputs = { self, nixpkgs, flake-utils, poetry2nix }: flake-utils.lib.eachDefaultSystem (system: let - # see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples. - inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication mkPoetryEnv; + inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication mkPoetryEnv mkPoetryPackages; pkgs = nixpkgs.legacyPackages.${system}; in rec { @@ -23,7 +22,7 @@ handyhelper = pkgs.runCommand "Handy Helper Deploy" { nativeBuildInputs = [ - packages.handyhelper + packages.handyhelper_pkg ]; } '' cat << 'DOC' >> $out @@ -44,8 +43,10 @@ DOC ''; }; }; + packages = { handyhelper = mkPoetryApplication { projectDir = self; }; + handyhelper_pkg = mkPoetryPackages { projectDir = self; }; default = self.packages.${system}.handyhelper; };