at master 1.2 kB view raw
1{ 2 lib, 3 bash, 4 buildPythonPackage, 5 fetchPypi, 6 stdenv, 7}: 8 9buildPythonPackage rec { 10 pname = "invoke"; 11 version = "2.2.0"; 12 format = "setuptools"; 13 14 src = fetchPypi { 15 inherit pname version; 16 hash = "sha256-7my7EBrxqFnH/oTyomTAWQILDLf+NTX5QkMAq1aPa9U="; 17 }; 18 19 postPatch = '' 20 sed -e 's|/bin/bash|${bash}/bin/bash|g' -i invoke/config.py 21 ''; 22 23 # errors with vendored libs 24 doCheck = false; 25 26 pythonImportsCheck = [ "invoke" ]; 27 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 ''; 34 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 }; 42}