9c6ee729d6
GitOrigin-RevId: 6cee3b5893090b0f5f0a06b4cf42ca4e60e5d222
42 lines
1.1 KiB
Nix
42 lines
1.1 KiB
Nix
{ lib
|
|
, bash
|
|
, buildPythonPackage
|
|
, fetchPypi
|
|
, stdenv
|
|
}:
|
|
|
|
buildPythonPackage rec {
|
|
pname = "invoke";
|
|
version = "2.0.0";
|
|
format = "setuptools";
|
|
|
|
src = fetchPypi {
|
|
inherit pname version;
|
|
hash = "sha256-erXdnNdreH1WCnixqYENJSNnq1lZhcUGEnAr4h1nHdc=";
|
|
};
|
|
|
|
postPatch = ''
|
|
sed -e 's|/bin/bash|${bash}/bin/bash|g' -i invoke/config.py
|
|
'';
|
|
|
|
# errors with vendored libs
|
|
doCheck = false;
|
|
|
|
pythonImportsCheck = [
|
|
"invoke"
|
|
];
|
|
|
|
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
mkdir -p $out/share/{bash-completion/completions,fish/vendor_completions.d,zsh/site-functions}
|
|
$out/bin/inv --print-completion-script=zsh >$out/share/zsh/site-functions/_inv
|
|
$out/bin/inv --print-completion-script=bash >$out/share/bash-completion/completions/inv.bash
|
|
$out/bin/inv --print-completion-script=fish >$out/share/fish/vendor_completions.d/inv.fish
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Pythonic task execution";
|
|
homepage = "https://www.pyinvoke.org/";
|
|
license = licenses.bsd2;
|
|
maintainers = with maintainers; [ ];
|
|
};
|
|
}
|