Merge pull request #307098 from r-ryantm/auto-update/cilium-cli
[NixPkgs.git] / pkgs / development / python-modules / invoke / default.nix
blobbf23cfbbcdd56bbe0e929d29e71fd25112bac72f
1 { lib
2 , bash
3 , buildPythonPackage
4 , fetchPypi
5 , stdenv
6 }:
8 buildPythonPackage rec {
9   pname = "invoke";
10   version = "2.2.0";
11   format = "setuptools";
13   src = fetchPypi {
14     inherit pname version;
15     hash = "sha256-7my7EBrxqFnH/oTyomTAWQILDLf+NTX5QkMAq1aPa9U=";
16   };
18   postPatch = ''
19     sed -e 's|/bin/bash|${bash}/bin/bash|g' -i invoke/config.py
20   '';
22   # errors with vendored libs
23   doCheck = false;
25   pythonImportsCheck = [
26     "invoke"
27   ];
29   postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
30     mkdir -p $out/share/{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
31     $out/bin/inv --print-completion-script=zsh >$out/share/zsh/site-functions/_inv
32     $out/bin/inv --print-completion-script=bash >$out/share/bash-completion/completions/inv.bash
33     $out/bin/inv --print-completion-script=fish >$out/share/fish/vendor_completions.d/inv.fish
34   '';
36   meta = with lib; {
37     changelog = "https://www.pyinvoke.org/changelog.html";
38     description = "Pythonic task execution";
39     homepage = "https://www.pyinvoke.org/";
40     license = licenses.bsd2;
41     maintainers = with maintainers; [ ];
42   };