From d32d994cc195858ec6569011a642d29350241edc Mon Sep 17 00:00:00 2001 From: sudosubin Date: Sun, 16 Jan 2022 22:31:42 +0900 Subject: [PATCH] pipenv: add pipenv shell completions --- pkgs/development/tools/pipenv/default.nix | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/pkgs/development/tools/pipenv/default.nix b/pkgs/development/tools/pipenv/default.nix index 1c09bb502a23..c9590c7fa5ee 100644 --- a/pkgs/development/tools/pipenv/default.nix +++ b/pkgs/development/tools/pipenv/default.nix @@ -38,6 +38,17 @@ in buildPythonApplication rec { propagatedBuildInputs = runtimeDeps python3.pkgs; + postInstall = '' + mkdir -p "$out/share/bash-completion/completions" + _PIPENV_COMPLETE=bash_source "$out/bin/pipenv" > "$out/share/bash-completion/completions/pipenv" + + mkdir -p "$out/share/zsh/vendor-completions" + _PIPENV_COMPLETE=zsh_source "$out/bin/pipenv" > "$out/share/zsh/vendor-completions/_pipenv" + + mkdir -p "$out/share/fish/vendor_completions.d" + _PIPENV_COMPLETE=fish_source "$out/bin/pipenv" > "$out/share/fish/vendor_completions.d/pipenv.fish" + ''; + doCheck = true; checkPhase = '' export HOME=$(mktemp -d)