summary refs log tree commit diff
path: root/pkgs/development/tools/pew
diff options
context:
space:
mode:
authorDario Bertini <berdario@gmail.com>2017-10-15 17:15:45 +0100
committerJoerg Thalheim <joerg@thalheim.io>2017-10-16 08:59:06 +0100
commitc6f90f949337c6296fe9fd8137c2ba0bbdc318d5 (patch)
tree036aff4e7f8f5f0641ea8d4b7e79cb0cea2e64dd /pkgs/development/tools/pew
parent09deacb7b8955e972685a72b5e8d8e74def7f0d0 (diff)
downloadnixpkgs-c6f90f949337c6296fe9fd8137c2ba0bbdc318d5.tar
nixpkgs-c6f90f949337c6296fe9fd8137c2ba0bbdc318d5.tar.gz
nixpkgs-c6f90f949337c6296fe9fd8137c2ba0bbdc318d5.tar.bz2
nixpkgs-c6f90f949337c6296fe9fd8137c2ba0bbdc318d5.tar.lz
nixpkgs-c6f90f949337c6296fe9fd8137c2ba0bbdc318d5.tar.xz
nixpkgs-c6f90f949337c6296fe9fd8137c2ba0bbdc318d5.tar.zst
nixpkgs-c6f90f949337c6296fe9fd8137c2ba0bbdc318d5.zip
pew: 0.1.14 -> 1.1.0
Pew was actually broken, due to a SHELL PATH check that had been added
in the previous release (though this shouldn't have hampered users with
bash as their shell)
Diffstat (limited to 'pkgs/development/tools/pew')
-rw-r--r--pkgs/development/tools/pew/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/pkgs/development/tools/pew/default.nix b/pkgs/development/tools/pew/default.nix
new file mode 100644
index 00000000000..16fc4817417
--- /dev/null
+++ b/pkgs/development/tools/pew/default.nix
@@ -0,0 +1,32 @@
+{ stdenv, python3Packages }:
+with python3Packages; buildPythonApplication rec {
+    name = "${pname}-${version}";
+    pname = "pew";
+    version = "1.1.0";
+
+    src = fetchPypi {
+      inherit pname version;
+      sha256 = "0b8z1vjsll1kgnh3mmdjps5rr9gayy091rapp2dra71jrwkx3yfh";
+    };
+
+    propagatedBuildInputs = [ virtualenv virtualenv-clone setuptools ];
+
+    postFixup = ''
+      set -euo pipefail
+      PEW_SITE="$out/lib/${python.libPrefix}/site-packages"
+      SETUPTOOLS="${setuptools}/lib/${python.libPrefix}/site-packages"
+      SETUPTOOLS_SITE=$SETUPTOOLS/$(cat $SETUPTOOLS/setuptools.pth)
+      CLONEVENV_SITE="${virtualenv-clone}/lib/${python.libPrefix}/site-packages"
+      SITE_PACKAGES="[\'$PEW_SITE\',\'$SETUPTOOLS_SITE\',\'$CLONEVENV_SITE\']"
+      substituteInPlace $PEW_SITE/pew/pew.py \
+        --replace "from pew.pew" "import sys; sys.path.extend($SITE_PACKAGES); from pew.pew" \
+        --replace 'sys.executable, "-m", "virtualenv"' "'${virtualenv}/bin/virtualenv'"
+    '';
+
+    meta = with stdenv.lib; {
+      description = "Tools to manage multiple virtualenvs written in pure python";
+      license = licenses.mit;
+      platforms = platforms.all;
+      maintainers = with maintainers; [ berdario ];
+    };
+  }
\ No newline at end of file