nixpkgs/pkgs/development/tools/pew/default.nix
Ryan Mulligan cf0a73f254 pew: 1.1.0 -> 1.1.2
Semi-automatic update. These checks were performed:

- built on NixOS
- ran `/nix/store/jr9kc24yp5cxdsk6m0f7iiqviz4q5s8y-pew-1.1.2/bin/.pew-wrapped version` and found version 1.1.2
- ran `/nix/store/jr9kc24yp5cxdsk6m0f7iiqviz4q5s8y-pew-1.1.2/bin/pew version` and found version 1.1.2
- found 1.1.2 with grep in /nix/store/jr9kc24yp5cxdsk6m0f7iiqviz4q5s8y-pew-1.1.2
- found 1.1.2 in filename of file in /nix/store/jr9kc24yp5cxdsk6m0f7iiqviz4q5s8y-pew-1.1.2

cc "@berdario"
2018-02-28 14:24:45 +00:00

32 lines
1.2 KiB
Nix

{ stdenv, python3Packages }:
with python3Packages; buildPythonApplication rec {
name = "${pname}-${version}";
pname = "pew";
version = "1.1.2";
src = fetchPypi {
inherit pname version;
sha256 = "04anak82p4v9w0lgfs55s7diywxil6amq8c8bhli143ca8l2fcdq";
};
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 ];
};
}