2022-09-15 20:30:40 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
2023-12-04 17:11:31 +00:00
|
|
|
setuptools,
|
2022-09-15 20:30:40 +00:00
|
|
|
pytestCheckHook,
|
2023-08-07 06:40:21 +00:00
|
|
|
pythonOlder,
|
2022-09-15 20:30:40 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "autocommand";
|
2023-08-07 06:35:12 +00:00
|
|
|
version = "2.2.2";
|
2023-12-04 17:11:31 +00:00
|
|
|
pyproject = true;
|
2023-08-07 06:40:21 +00:00
|
|
|
|
|
|
|
disabled = pythonOlder "3.7";
|
2022-09-15 20:30:40 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Lucretiel";
|
|
|
|
repo = "autocommand";
|
2023-08-07 06:37:55 +00:00
|
|
|
rev = "refs/tags/${version}";
|
2023-08-07 06:35:12 +00:00
|
|
|
hash = "sha256-9bv9Agj4RpeyNJvTLUaMwygQld2iZZkoLb81rkXOd3E=";
|
2022-09-15 20:30:40 +00:00
|
|
|
};
|
|
|
|
|
2023-12-04 17:11:31 +00:00
|
|
|
postPatch = ''
|
|
|
|
# _MissingDynamic: `license` defined outside of `pyproject.toml` is ignored.
|
|
|
|
rm setup.py
|
|
|
|
'';
|
|
|
|
|
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
|
2022-09-15 20:30:40 +00:00
|
|
|
# fails with: SyntaxError: invalid syntax
|
|
|
|
doCheck = false;
|
|
|
|
|
2023-08-07 06:37:55 +00:00
|
|
|
nativeCheckInputs = [ pytestCheckHook ];
|
2022-09-15 20:30:40 +00:00
|
|
|
|
2023-08-07 06:37:55 +00:00
|
|
|
pythonImportsCheck = [ "autocommand" ];
|
2022-09-15 20:30:40 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
2023-08-07 06:37:55 +00:00
|
|
|
description = "Autocommand turns a python function into a CLI program";
|
2022-09-15 20:30:40 +00:00
|
|
|
homepage = "https://github.com/Lucretiel/autocommand";
|
2023-08-07 06:39:04 +00:00
|
|
|
license = licenses.lgpl3Only;
|
2024-07-28 14:44:11 +00:00
|
|
|
maintainers = [ ];
|
2022-09-15 20:30:40 +00:00
|
|
|
};
|
|
|
|
}
|