2017-10-15 16:15:45 +00:00
|
|
|
{ stdenv, python3Packages }:
|
|
|
|
with python3Packages; buildPythonApplication rec {
|
|
|
|
name = "${pname}-${version}";
|
|
|
|
pname = "pew";
|
2018-02-26 17:47:57 +00:00
|
|
|
version = "1.1.2";
|
2017-10-15 16:15:45 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2018-02-27 17:40:10 +00:00
|
|
|
sha256 = "04anak82p4v9w0lgfs55s7diywxil6amq8c8bhli143ca8l2fcdq";
|
2017-10-15 16:15:45 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [ virtualenv virtualenv-clone setuptools ];
|
|
|
|
|
2018-11-25 23:00:40 +00:00
|
|
|
LC_ALL = "en_US.UTF-8";
|
|
|
|
|
2017-10-15 16:15:45 +00:00
|
|
|
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; {
|
2018-11-25 23:06:41 +00:00
|
|
|
homepage = https://github.com/berdario/pew;
|
2017-10-15 16:15:45 +00:00
|
|
|
description = "Tools to manage multiple virtualenvs written in pure python";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ berdario ];
|
|
|
|
};
|
2018-02-28 18:52:49 +00:00
|
|
|
}
|