diff options
author | Jonathan Ringer <jonringer117@gmail.com> | 2020-02-19 18:36:56 -0800 |
---|---|---|
committer | Jon <jonringer@users.noreply.github.com> | 2020-02-19 22:30:50 -0800 |
commit | cd97c055a09c076de0cecf28f683d43d4da35d20 (patch) | |
tree | f98719a236f4b168511a77649218a5151ed72b31 /pkgs/development/interpreters | |
parent | 504f8bffaade58ca680fc80d260c8e7721400974 (diff) | |
download | nixlib-cd97c055a09c076de0cecf28f683d43d4da35d20.tar nixlib-cd97c055a09c076de0cecf28f683d43d4da35d20.tar.gz nixlib-cd97c055a09c076de0cecf28f683d43d4da35d20.tar.bz2 nixlib-cd97c055a09c076de0cecf28f683d43d4da35d20.tar.lz nixlib-cd97c055a09c076de0cecf28f683d43d4da35d20.tar.xz nixlib-cd97c055a09c076de0cecf28f683d43d4da35d20.tar.zst nixlib-cd97c055a09c076de0cecf28f683d43d4da35d20.zip |
python: execute pythonImportsCheckPhase in subshell
Execute in subshell so that the cwd returns back to the original directory. This is important as it enables pythonImportsCheck to work with checkPhase
Diffstat (limited to 'pkgs/development/interpreters')
-rw-r--r-- | pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh b/pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh index 0fc55145a8eb..f8ca84cd573a 100644 --- a/pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh +++ b/pkgs/development/interpreters/python/hooks/python-imports-check-hook.sh @@ -6,7 +6,7 @@ pythonImportsCheckPhase () { if [ -n "$pythonImportsCheck" ]; then echo "Check whether the following modules can be imported: $pythonImportsCheck" - cd $out && eval "@pythonCheckInterpreter@ -c 'import os; import importlib; list(map(lambda mod: importlib.import_module(mod), os.environ[\"pythonImportsCheck\"].split()))'" + ( cd $out && eval "@pythonCheckInterpreter@ -c 'import os; import importlib; list(map(lambda mod: importlib.import_module(mod), os.environ[\"pythonImportsCheck\"].split()))'" ) fi } |