···
pythonEnv = python.withPackages (ps: with ps; [ ]);
···
# Plain Python interpreter
40
-
interpreter = env.interpreter;
39
+
environment = python;
40
+
interpreter = environment.interpreter;
···
# virtualenv: error: argument dest: the destination . is not write-able at /nix/store
nixenv-virtualenv = rec {
51
-
env = runCommand "${python.name}-virtualenv" { } ''
51
+
environment = runCommand "${python.name}-virtualenv" { } ''
${pythonVirtualEnv.interpreter} -m virtualenv venv
55
-
interpreter = "${env}/bin/${python.executable}";
55
+
interpreter = "${environment}/bin/${python.executable}";
···
// lib.optionalAttrs (python.implementation != "graal") {
# Python Nix environment (python.buildEnv)
65
-
interpreter = env.interpreter;
64
+
environment = pythonEnv;
65
+
interpreter = environment.interpreter;
···
# Python 2 does not support venv
# TODO: PyPy executable name is incorrect, it should be pypy-c or pypy-3c instead of pypy and pypy3.
76
-
env = runCommand "${python.name}-venv" { } ''
76
+
environment = runCommand "${python.name}-venv" { } ''
${python.interpreter} -m venv $out
79
-
interpreter = "${env}/bin/${python.executable}";
79
+
interpreter = "${environment}/bin/${python.executable}";
···
# TODO: Cannot create venv from a nix env
# Error: Command '['/nix/store/ddc8nqx73pda86ibvhzdmvdsqmwnbjf7-python3-3.7.6-venv/bin/python3.7', '-Im', 'ensurepip', '--upgrade', '--default-pip']' returned non-zero exit status 1.
91
-
env = runCommand "${python.name}-venv" { } ''
91
+
environment = runCommand "${python.name}-venv" { } ''
${pythonEnv.interpreter} -m venv $out
94
-
interpreter = "${env}/bin/${pythonEnv.executable}";
94
+
interpreter = "${environment}/bin/${pythonEnv.executable}";
···
120
-
lib.mapAttrs testfun envs;
120
+
lib.mapAttrs testfun environments;
# Integration tests involving the package set.
# All PyPy package builds are broken at the moment