Move the Python package into a variable
This commit is contained in:
parent
a82a8d00c7
commit
12414da5a8
13
flake.nix
13
flake.nix
|
@ -22,11 +22,7 @@
|
||||||
let
|
let
|
||||||
pkgs = nixpkgs.legacyPackages.${system};
|
pkgs = nixpkgs.legacyPackages.${system};
|
||||||
poetry2nix = inputs.poetry2nix.lib.mkPoetry2Nix { inherit pkgs; };
|
poetry2nix = inputs.poetry2nix.lib.mkPoetry2Nix { inherit pkgs; };
|
||||||
application = poetry2nix.mkPoetryApplication {
|
python = pkgs.python312;
|
||||||
projectDir = ./.;
|
|
||||||
python = pkgs.python312;
|
|
||||||
inherit overrides;
|
|
||||||
};
|
|
||||||
overrides = poetry2nix.defaultPoetryOverrides.extend (
|
overrides = poetry2nix.defaultPoetryOverrides.extend (
|
||||||
self: super: {
|
self: super: {
|
||||||
cryptography = super.cryptography.overridePythonAttrs (old: rec {
|
cryptography = super.cryptography.overridePythonAttrs (old: rec {
|
||||||
|
@ -40,14 +36,19 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
|
application = poetry2nix.mkPoetryApplication {
|
||||||
|
projectDir = ./.;
|
||||||
|
inherit overrides;
|
||||||
|
inherit python;
|
||||||
|
};
|
||||||
env = poetry2nix.mkPoetryEnv {
|
env = poetry2nix.mkPoetryEnv {
|
||||||
projectDir = ./.;
|
projectDir = ./.;
|
||||||
python = pkgs.python312;
|
|
||||||
groups = [ "dev" ];
|
groups = [ "dev" ];
|
||||||
editablePackageSources = {
|
editablePackageSources = {
|
||||||
snapbin = ./snapbin;
|
snapbin = ./snapbin;
|
||||||
};
|
};
|
||||||
inherit overrides;
|
inherit overrides;
|
||||||
|
inherit python;
|
||||||
};
|
};
|
||||||
tests = pkgs.writeShellScriptBin "python-test" ''
|
tests = pkgs.writeShellScriptBin "python-test" ''
|
||||||
trap "process-compose down &> /dev/null" EXIT
|
trap "process-compose down &> /dev/null" EXIT
|
||||||
|
|
Loading…
Reference in New Issue