python.buildEnv: fix passthru
Python envs did not pass through any of the properties the Python interpreter has. That could be annoying, especially not having `python.interpreter` which is the path to the interpreter. This commit fixes the situation and inherit python.passthru.
This commit is contained in:
parent
07674788d6
commit
ea4121d225
@ -6,8 +6,7 @@
|
|||||||
# Create a python executable that knows about additional packages.
|
# Create a python executable that knows about additional packages.
|
||||||
let
|
let
|
||||||
recursivePthLoader = import ../../python-modules/recursive-pth-loader/default.nix { stdenv = stdenv; python = python; };
|
recursivePthLoader = import ../../python-modules/recursive-pth-loader/default.nix { stdenv = stdenv; python = python; };
|
||||||
env = (
|
env = let
|
||||||
let
|
|
||||||
paths = stdenv.lib.closePropagation (extraLibs ++ [ python recursivePthLoader ] ) ;
|
paths = stdenv.lib.closePropagation (extraLibs ++ [ python recursivePthLoader ] ) ;
|
||||||
in buildEnv {
|
in buildEnv {
|
||||||
name = "${python.name}-env";
|
name = "${python.name}-env";
|
||||||
@ -36,7 +35,11 @@ let
|
|||||||
done
|
done
|
||||||
'' + postBuild;
|
'' + postBuild;
|
||||||
|
|
||||||
passthru.env = stdenv.mkDerivation {
|
inherit (python) meta;
|
||||||
|
|
||||||
|
passthru = python.passthru // {
|
||||||
|
interpreter = "${env}/bin/${python.executable}";
|
||||||
|
env = stdenv.mkDerivation {
|
||||||
name = "interactive-${python.name}-environment";
|
name = "interactive-${python.name}-environment";
|
||||||
nativeBuildInputs = [ env ];
|
nativeBuildInputs = [ env ];
|
||||||
|
|
||||||
@ -47,8 +50,6 @@ let
|
|||||||
exit 1
|
exit 1
|
||||||
'';
|
'';
|
||||||
};
|
};
|
||||||
}) // {
|
};
|
||||||
inherit python;
|
|
||||||
inherit (python) meta;
|
|
||||||
};
|
};
|
||||||
in env
|
in env
|
||||||
|
Loading…
Reference in New Issue
Block a user