2019-05-04 14:23:59 +01:00
|
|
|
{ lib
|
2019-10-23 11:33:23 +01:00
|
|
|
, python3
|
2019-05-04 14:23:59 +01:00
|
|
|
}:
|
|
|
|
|
2019-10-23 11:33:23 +01:00
|
|
|
with python3.pkgs;
|
|
|
|
|
|
|
|
let
|
|
|
|
|
|
|
|
runtimeDeps = [
|
|
|
|
certifi
|
|
|
|
setuptools
|
|
|
|
pip
|
|
|
|
virtualenv
|
|
|
|
virtualenv-clone
|
|
|
|
];
|
|
|
|
|
|
|
|
pythonEnv = python3.withPackages(ps: with ps; [ virtualenv ]);
|
|
|
|
|
|
|
|
in buildPythonApplication rec {
|
2019-03-06 17:56:44 +00:00
|
|
|
pname = "pipenv";
|
|
|
|
version = "2018.11.26";
|
2017-10-15 17:16:51 +01:00
|
|
|
|
2019-03-06 17:56:44 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
|
|
|
sha256 = "0ip8zsrwmhrankrix0shig9g8q2knmr7b63sh7lqa8a5x03fcwx6";
|
|
|
|
};
|
2017-10-15 17:16:51 +01:00
|
|
|
|
2019-03-06 17:56:44 +00:00
|
|
|
LC_ALL = "en_US.UTF-8";
|
2017-10-15 17:16:51 +01:00
|
|
|
|
2019-10-23 11:33:23 +01:00
|
|
|
postPatch = ''
|
|
|
|
# pipenv invokes python in a subprocess to create a virtualenv
|
|
|
|
# it uses sys.executable which will point in our case to a python that
|
|
|
|
# does not have virtualenv.
|
|
|
|
substituteInPlace pipenv/core.py \
|
|
|
|
--replace "vistir.compat.Path(sys.executable).absolute().as_posix()" "vistir.compat.Path('${pythonEnv.interpreter}').absolute().as_posix()"
|
|
|
|
'';
|
|
|
|
|
2019-10-22 12:14:36 +01:00
|
|
|
nativeBuildInputs = [ invoke parver ];
|
|
|
|
|
2019-10-23 11:33:23 +01:00
|
|
|
propagatedBuildInputs = runtimeDeps;
|
2017-10-15 17:16:51 +01:00
|
|
|
|
2019-03-06 17:56:44 +00:00
|
|
|
doCheck = false;
|
2017-10-15 17:16:51 +01:00
|
|
|
|
2019-05-04 14:23:59 +01:00
|
|
|
meta = with lib; {
|
2019-03-06 17:56:44 +00:00
|
|
|
description = "Python Development Workflow for Humans";
|
|
|
|
license = licenses.mit;
|
|
|
|
platforms = platforms.all;
|
|
|
|
maintainers = with maintainers; [ berdario ];
|
|
|
|
};
|
|
|
|
}
|