2020-04-24 23:36:52 +00:00
|
|
|
{ lib
|
|
|
|
, bash
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-07-15 17:15:38 +00:00
|
|
|
, stdenv
|
2020-04-24 23:36:52 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "invoke";
|
2023-03-15 16:39:30 +00:00
|
|
|
version = "2.0.0";
|
2022-03-30 09:31:56 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2023-03-15 16:39:30 +00:00
|
|
|
hash = "sha256-erXdnNdreH1WCnixqYENJSNnq1lZhcUGEnAr4h1nHdc=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-05-18 14:49:53 +00:00
|
|
|
postPatch = ''
|
2020-04-24 23:36:52 +00:00
|
|
|
sed -e 's|/bin/bash|${bash}/bin/bash|g' -i invoke/config.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
# errors with vendored libs
|
|
|
|
doCheck = false;
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"invoke"
|
|
|
|
];
|
|
|
|
|
2023-07-15 17:15:38 +00:00
|
|
|
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
|
|
|
|
'';
|
|
|
|
|
2022-03-30 09:31:56 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Pythonic task execution";
|
2022-03-30 09:31:56 +00:00
|
|
|
homepage = "https://www.pyinvoke.org/";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|