1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5 pytestCheckHook,
6 pythonOlder,
7 setuptools,
8}:
9
10buildPythonPackage rec {
11 pname = "lcgit";
12 version = "2.0.0";
13 pyproject = true;
14
15 disabled = pythonOlder "3.7";
16
17 src = fetchFromGitHub {
18 owner = "cisagov";
19 repo = "lcgit";
20 tag = "v${version}";
21 hash = "sha256-unw5xY5iZlVrV01hchHS3Ar+zpF7awTAutcqndKH0Ic=";
22 };
23
24 postPatch = ''
25 substituteInPlace pytest.ini \
26 --replace-fail " --cov" ""
27 '';
28
29 build-system = [ setuptools ];
30
31 nativeCheckInputs = [ pytestCheckHook ];
32
33 pythonImportsCheck = [ "lcgit" ];
34
35 meta = with lib; {
36 description = "Pythonic Linear Congruential Generator iterator";
37 homepage = "https://github.com/cisagov/lcgit";
38 changelog = "https://github.com/cisagov/lcgit/releases/tag/${src.tag}";
39 license = licenses.cc0;
40 maintainers = with maintainers; [ fab ];
41 };
42}