1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 setuptools,
6 pytestCheckHook,
7 pythonOlder,
8}:
9
10buildPythonPackage rec {
11 pname = "autocommand";
12 version = "2.2.2";
13 pyproject = true;
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "Lucretiel";
19 repo = "autocommand";
20 tag = version;
21 hash = "sha256-9bv9Agj4RpeyNJvTLUaMwygQld2iZZkoLb81rkXOd3E=";
22 };
23
24 postPatch = ''
25 # _MissingDynamic: `license` defined outside of `pyproject.toml` is ignored.
26 rm setup.py
27 '';
28
29 nativeBuildInputs = [ setuptools ];
30
31 # fails with: SyntaxError: invalid syntax
32 doCheck = false;
33
34 nativeCheckInputs = [ pytestCheckHook ];
35
36 pythonImportsCheck = [ "autocommand" ];
37
38 meta = with lib; {
39 description = "Autocommand turns a python function into a CLI program";
40 homepage = "https://github.com/Lucretiel/autocommand";
41 license = licenses.lgpl3Only;
42 maintainers = [ ];
43 };
44}