nixpkgs/pkgs/development/tools/pipenv/default.nix
Väinö Järvelä 11d491dce5 pipenv: Ignore Python site-packages
pipenv nix wrapper contains a PYTHONPATH which has some dependencies
for pipenv installed. pipenv by default uses site-packages when
resolving packages, which means that any package that is included in
the nix wrapper is satisfied when running `pipenv install`.

But when the actual virtualenv created by pipenv is activated, it
doesn't contain those packages anymore and fails to import them.

pipenv has a flag PIP_IGNORE_INSTALLED which can be used to ignore
site-packages. Which fixes the problem of having different resolved
packages when running pipenv and when running the virtualenv.
2019-04-11 07:59:36 +02:00

37 lines
703 B
Nix

{ stdenv, python3Packages, pew }:
with python3Packages;
buildPythonApplication rec {
pname = "pipenv";
version = "2018.11.26";
src = fetchPypi {
inherit pname version;
sha256 = "0ip8zsrwmhrankrix0shig9g8q2knmr7b63sh7lqa8a5x03fcwx6";
};
LC_ALL = "en_US.UTF-8";
propagatedBuildInputs = [
flake8
invoke
parver
pew
pip
requests
];
doCheck = false;
makeWrapperArgs = [
"--set PYTHONPATH \"$PYTHONPATH\""
"--set PIP_IGNORE_INSTALLED 1"
];
meta = with stdenv.lib; {
description = "Python Development Workflow for Humans";
license = licenses.mit;
platforms = platforms.all;
maintainers = with maintainers; [ berdario ];
};
}