Use Package not Application
This commit is contained in:
@@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
outputs = { self, nixpkgs, handyhelper }: let
|
outputs = { self, nixpkgs, handyhelper }: let
|
||||||
system = "x86_64-linux";
|
system = "x86_64-linux";
|
||||||
handy_py = handyhelper.packages.${system}.handyhelper;
|
handy_py = handyhelper.packages.${system}.handyhelper_pkg;
|
||||||
in {
|
in {
|
||||||
nixosConfigurations."staging" = nixpkgs.lib.nixosSystem {
|
nixosConfigurations."staging" = nixpkgs.lib.nixosSystem {
|
||||||
inherit system;
|
inherit system;
|
||||||
|
|||||||
@@ -11,8 +11,7 @@
|
|||||||
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
|
outputs = { self, nixpkgs, flake-utils, poetry2nix }:
|
||||||
flake-utils.lib.eachDefaultSystem (system:
|
flake-utils.lib.eachDefaultSystem (system:
|
||||||
let
|
let
|
||||||
# see https://github.com/nix-community/poetry2nix/tree/master#api for more functions and examples.
|
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication mkPoetryEnv mkPoetryPackages;
|
||||||
inherit (poetry2nix.legacyPackages.${system}) mkPoetryApplication mkPoetryEnv;
|
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
in rec {
|
in rec {
|
||||||
|
|
||||||
@@ -23,7 +22,7 @@
|
|||||||
|
|
||||||
handyhelper = pkgs.runCommand "Handy Helper Deploy" {
|
handyhelper = pkgs.runCommand "Handy Helper Deploy" {
|
||||||
nativeBuildInputs = [
|
nativeBuildInputs = [
|
||||||
packages.handyhelper
|
packages.handyhelper_pkg
|
||||||
];
|
];
|
||||||
} ''
|
} ''
|
||||||
cat << 'DOC' >> $out
|
cat << 'DOC' >> $out
|
||||||
@@ -44,8 +43,10 @@ DOC
|
|||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
packages = {
|
packages = {
|
||||||
handyhelper = mkPoetryApplication { projectDir = self; };
|
handyhelper = mkPoetryApplication { projectDir = self; };
|
||||||
|
handyhelper_pkg = mkPoetryPackages { projectDir = self; };
|
||||||
default = self.packages.${system}.handyhelper;
|
default = self.packages.${system}.handyhelper;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user