python3.tests.nixenv-virtualenv: Fix on darwin

The virtualenv mode is trying to be smart and checks whether it can
write to $out, which for some reason fails on darwin.

> virtualenv: error: argument dest: the destination . is not write-able at /nix/store

But what does work is creating it in the pwd and moving it to $out,
because mv just does what it is told.
This commit is contained in:
Martin Weinelt 2023-02-12 03:03:31 +01:00
parent f75329f0bc
commit d704ee72c9
No known key found for this signature in database
GPG key ID: 87C1E9888F856759

View file

@ -43,7 +43,8 @@ let
# Use virtualenv from a Nix env.
nixenv-virtualenv = rec {
env = runCommand "${python.name}-virtualenv" {} ''
${pythonVirtualEnv.interpreter} -m virtualenv $out
${pythonVirtualEnv.interpreter} -m virtualenv venv
mv venv $out
'';
interpreter = "${env}/bin/${python.executable}";
is_venv = "False";