Skip to content

Commit

Permalink
python3.tests.nixenv-virtualenv: Fix on darwin
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
mweinelt committed Feb 12, 2023
1 parent f75329f commit d704ee7
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion pkgs/development/interpreters/python/tests.nix
Original file line number Diff line number Diff line change
Expand Up @@ -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";
Expand Down

0 comments on commit d704ee7

Please sign in to comment.