From 53e85e512bb026c6f5211e16a72b2ab11b848688 Mon Sep 17 00:00:00 2001 From: Artturin Date: Fri, 30 Jul 2021 04:19:49 +0300 Subject: [PATCH] xonsh: add PYTHONPATH --- pkgs/shells/xonsh/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/shells/xonsh/default.nix b/pkgs/shells/xonsh/default.nix index 41f2c8b4f0a..28f87685166 100644 --- a/pkgs/shells/xonsh/default.nix +++ b/pkgs/shells/xonsh/default.nix @@ -29,6 +29,19 @@ python3Packages.buildPythonApplication rec { find scripts -name 'xonsh*' -exec sed -i -e "s|env -S|env|" {} \; find -name "*.xsh" | xargs sed -ie 's|/usr/bin/env|${coreutils}/bin/env|' patchShebangs . + + substituteInPlace scripts/xon.sh \ + --replace 'python' "${python3Packages.python}/bin/python" + + ''; + + makeWrapperArgs = [ + "--prefix PYTHONPATH : ${placeholder "out"}/lib/${python3Packages.python.libPrefix}/site-packages" + ]; + + postInstall = '' + wrapProgram $out/bin/xon.sh \ + $makeWrapperArgs ''; disabledTests = [