11 runtimeDeps = ps: with ps; [
18 ++ lib.optionals stdenv.hostPlatform.isAndroid [
22 pythonEnv = python3.withPackages runtimeDeps;
24 in buildPythonApplication rec {
26 version = "2022.10.25";
29 inherit pname version;
30 sha256 = "sha256-PjnI1aK8qrMkVSoYV2EFwqNeAguzEf9T106stYuFGFM=";
33 LC_ALL = "en_US.UTF-8";
35 nativeBuildInputs = [ installShellFiles ];
38 # pipenv invokes python in a subprocess to create a virtualenv
39 # and to call setup.py.
40 # It would use sys.executable, which in our case points to a python that
41 # does not have the required dependencies.
42 substituteInPlace pipenv/core.py \
43 --replace "sys.executable" "'${pythonEnv.interpreter}'"
46 propagatedBuildInputs = runtimeDeps python3.pkgs;
49 installShellCompletion --cmd pipenv \
50 --bash <(_PIPENV_COMPLETE=bash_source $out/bin/pipenv) \
51 --zsh <(_PIPENV_COMPLETE=zsh_source $out/bin/pipenv) \
52 --fish <(_PIPENV_COMPLETE=fish_source $out/bin/pipenv)
57 export HOME=$(mktemp -d)
58 cp -r --no-preserve=mode ${wheel.src} $HOME/wheel-src
59 $out/bin/pipenv install $HOME/wheel-src
63 description = "Python Development Workflow for Humans";
64 license = licenses.mit;
65 platforms = platforms.all;
66 maintainers = with maintainers; [ berdario ];