Use Package not Application

This commit is contained in:
2023-03-15 22:52:36 -04:00
parent 7f860d0154
commit ee29c54eef
2 changed files with 5 additions and 4 deletions

View File

@@ -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;

View File

@@ -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;
};