summary refs log tree commit diff
path: root/pkgs/development/python-modules/recursive-pth-loader/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/python-modules/recursive-pth-loader/default.nix')
-rw-r--r--pkgs/development/python-modules/recursive-pth-loader/default.nix6
1 files changed, 5 insertions, 1 deletions
diff --git a/pkgs/development/python-modules/recursive-pth-loader/default.nix b/pkgs/development/python-modules/recursive-pth-loader/default.nix
index 959882be9380..9a17e722679f 100644
--- a/pkgs/development/python-modules/recursive-pth-loader/default.nix
+++ b/pkgs/development/python-modules/recursive-pth-loader/default.nix
@@ -7,11 +7,15 @@ stdenv.mkDerivation rec {
 
   buildInputs = [ python ];
 
+  patchPhase = "cat ${./sitecustomize.py} > sitecustomize.py";
+
+  buildPhase = "${python}/bin/${python.executable} -m compileall .";
+
   installPhase =
     ''
       dst=$out/lib/${python.libPrefix}/site-packages
       mkdir -p $dst
-      cat ${./sitecustomize.py} >> $dst/sitecustomize.py
+      cp sitecustomize.* $dst/
     '';
 
   meta = {