about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/recursive-pth-loader/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/python-modules/recursive-pth-loader/default.nix')
-rw-r--r--nixpkgs/pkgs/development/python-modules/recursive-pth-loader/default.nix25
1 files changed, 25 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/python-modules/recursive-pth-loader/default.nix b/nixpkgs/pkgs/development/python-modules/recursive-pth-loader/default.nix
new file mode 100644
index 000000000000..c49f891ec1de
--- /dev/null
+++ b/nixpkgs/pkgs/development/python-modules/recursive-pth-loader/default.nix
@@ -0,0 +1,25 @@
+{ stdenv, python }:
+
+stdenv.mkDerivation {
+  pname = "python-recursive-pth-loader";
+  version = "1.0";
+
+  dontUnpack = true;
+
+  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
+      cp sitecustomize.* $dst/
+    '';
+
+  meta = {
+      description = "Enable recursive processing of pth files anywhere in sys.path";
+  };
+}