From 855777ad22e056557d8e8a8c71aebb156f21a711 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 20 Dec 2018 14:03:23 +0000 Subject: [PATCH 1/2] wrap-python: fix pypy site-packages path --- pkgs/development/interpreters/python/wrap-python.nix | 2 +- pkgs/development/interpreters/python/wrap.sh | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/interpreters/python/wrap-python.nix b/pkgs/development/interpreters/python/wrap-python.nix index 1efd777bb052..4ff0a62d7fbd 100644 --- a/pkgs/development/interpreters/python/wrap-python.nix +++ b/pkgs/development/interpreters/python/wrap-python.nix @@ -7,7 +7,7 @@ with lib; makeSetupHook { deps = makeWrapper; - substitutions.libPrefix = python.libPrefix; + substitutions.sitePackages = python.sitePackages; substitutions.executable = python.interpreter; substitutions.python = python; substitutions.magicalSedExpression = let diff --git a/pkgs/development/interpreters/python/wrap.sh b/pkgs/development/interpreters/python/wrap.sh index 01b573e6ad5d..6fa8c316a17d 100644 --- a/pkgs/development/interpreters/python/wrap.sh +++ b/pkgs/development/interpreters/python/wrap.sh @@ -92,7 +92,7 @@ _addToPythonPath() { pythonPathsSeen[$dir]=1 # addToSearchPath is defined in stdenv/generic/setup.sh. It will have # the effect of calling `export program_X=$dir/...:$program_X`. - addToSearchPath program_PYTHONPATH $dir/lib/@libPrefix@/site-packages + addToSearchPath program_PYTHONPATH $dir/@sitePackages@ addToSearchPath program_PATH $dir/bin # Inspect the propagated inputs (if they exist) and recur on them. @@ -113,9 +113,9 @@ createBuildInputsPth() { if $(echo -n $x |grep -q python-recursive-pth-loader); then continue fi - if test -d "$x"/lib/@libPrefix@/site-packages; then - echo $x/lib/@libPrefix@/site-packages \ - >> "$out"/lib/@libPrefix@/site-packages/${name}-nix-python-$category.pth + if test -d "$x"/@sitePackages@; then + echo $x/@sitePackages@ \ + >> "$out"/@sitePackages@/${name}-nix-python-$category.pth fi done fi From 2dd13d4ba0fb22bf5b6e86ddcb916075e070a455 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Thalheim?= Date: Thu, 20 Dec 2018 14:54:56 +0000 Subject: [PATCH 2/2] nixos/glusterfs: remove unused PYTHONPATH this directory does not exists --- nixos/modules/services/network-filesystems/glusterfs.nix | 1 - 1 file changed, 1 deletion(-) diff --git a/nixos/modules/services/network-filesystems/glusterfs.nix b/nixos/modules/services/network-filesystems/glusterfs.nix index eb7f060c7da0..00875c6c4a18 100644 --- a/nixos/modules/services/network-filesystems/glusterfs.nix +++ b/nixos/modules/services/network-filesystems/glusterfs.nix @@ -201,7 +201,6 @@ in serviceConfig = { Type="simple"; - Environment="PYTHONPATH=${glusterfs}/usr/lib/python2.7/site-packages"; PIDFile="/run/glustereventsd.pid"; ExecStart="${glusterfs}/sbin/glustereventsd --pid-file /run/glustereventsd.pid"; ExecReload="/bin/kill -SIGUSR2 $MAINPID";