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