3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #155216 from sudosubin/feature/pipenv-completions

This commit is contained in:
legendofmiracles 2022-01-18 11:52:47 -06:00 committed by GitHub
commit 84ccd32d19
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,5 +1,6 @@
{ lib
, python3
, installShellFiles
}:
with python3.pkgs;
@ -27,6 +28,8 @@ in buildPythonApplication rec {
LC_ALL = "en_US.UTF-8";
nativeBuildInputs = [ installShellFiles ];
postPatch = ''
# pipenv invokes python in a subprocess to create a virtualenv
# and to call setup.py.
@ -38,6 +41,13 @@ in buildPythonApplication rec {
propagatedBuildInputs = runtimeDeps python3.pkgs;
postInstall = ''
installShellCompletion --cmd pipenv \
--bash <(_PIPENV_COMPLETE=bash_source $out/bin/pipenv) \
--zsh <(_PIPENV_COMPLETE=zsh_source $out/bin/pipenv) \
--fish <(_PIPENV_COMPLETE=fish_source $out/bin/pipenv)
'';
doCheck = true;
checkPhase = ''
export HOME=$(mktemp -d)