From d704ee72c939d6a30dcd1c92bacca2413dbc90fa Mon Sep 17 00:00:00 2001 From: Martin Weinelt Date: Sun, 12 Feb 2023 03:03:31 +0100 Subject: [PATCH] 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. --- pkgs/development/interpreters/python/tests.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/interpreters/python/tests.nix b/pkgs/development/interpreters/python/tests.nix index 6282b0f6690e..4ba1b757c3f6 100644 --- a/pkgs/development/interpreters/python/tests.nix +++ b/pkgs/development/interpreters/python/tests.nix @@ -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";