Files
nixpkgs/pkgs/development/python-modules/invoke/default.nix
T
Ihar Hrachyshka 567e8dfd8e treewide: clean up 'meta = with' pattern
This commit was created by a combination of scripts and tools:
- an ast-grep script to prefix things in meta with `lib.`,
- a modified nixf-diagnose / nixf combination to remove unused `with
lib;`, and
- regular nixfmt.

Co-authored-by: Wolfgang Walther <walther@technowledgy.de>
2025-12-10 18:09:49 +01:00

43 lines
1.1 KiB
Nix

{
lib,
bash,
buildPythonPackage,
fetchPypi,
stdenv,
}:
buildPythonPackage rec {
pname = "invoke";
version = "2.2.0";
format = "setuptools";
src = fetchPypi {
inherit pname version;
hash = "sha256-7my7EBrxqFnH/oTyomTAWQILDLf+NTX5QkMAq1aPa9U=";
};
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 = {
changelog = "https://www.pyinvoke.org/changelog.html";
description = "Pythonic task execution";
homepage = "https://www.pyinvoke.org/";
license = lib.licenses.bsd2;
maintainers = [ ];
};
}