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