14 runtimeDeps = ps: with ps; [
21 ++ lib.optionals stdenv.hostPlatform.isAndroid [
25 pythonEnv = python3.withPackages runtimeDeps;
27 in buildPythonApplication rec {
32 src = fetchFromGitHub {
35 rev = "refs/tags/v${version}";
36 hash = "sha256-5gq1kXVNAMH/AeovpUStcZffXN4GfXj3wJ7lW4qebRM=";
39 env.LC_ALL = "en_US.UTF-8";
48 # pipenv invokes python in a subprocess to create a virtualenv
49 # and to call setup.py.
50 # It would use sys.executable, which in our case points to a python that
51 # does not have the required dependencies.
52 substituteInPlace pipenv/utils/virtualenv.py \
53 --replace "sys.executable" "'${pythonEnv.interpreter}'"
56 propagatedBuildInputs = runtimeDeps python3.pkgs;
71 # this test wants access to the internet
76 # many of these tests want access to the internet
81 verify-venv-patch = runCommand "${pname}-test-verify-venv-patch" {} ''
82 export PIPENV_VENV_IN_PROJECT=1
84 # "pipenv install" should be able to create a venv
85 ${pipenv}/bin/pipenv install
95 installShellCompletion --cmd pipenv \
96 --bash <(_PIPENV_COMPLETE=bash_source $out/bin/pipenv) \
97 --zsh <(_PIPENV_COMPLETE=zsh_source $out/bin/pipenv) \
98 --fish <(_PIPENV_COMPLETE=fish_source $out/bin/pipenv)
102 description = "Python Development Workflow for Humans";
103 license = licenses.mit;
104 platforms = platforms.all;
105 maintainers = with maintainers; [ berdario ];