1{ lib
2, buildPythonPackage
3, fetchFromGitHub
4, karton-core
5, malduck
6, pythonOlder
7}:
8
9buildPythonPackage rec {
10 pname = "karton-config-extractor";
11 version = "2.2.0";
12 format = "setuptools";
13
14 disabled = pythonOlder "3.7";
15
16 src = fetchFromGitHub {
17 owner = "CERT-Polska";
18 repo = pname;
19 rev = "refs/tags/v${version}";
20 hash = "sha256-X2g/wgWLIY2ZIwH1l83EApyoeYQU5/MWq5S0qmYz+CA=";
21 };
22
23 propagatedBuildInputs = [
24 karton-core
25 malduck
26 ];
27
28 postPatch = ''
29 substituteInPlace requirements.txt \
30 --replace "malduck==4.1.0" "malduck"
31 '';
32
33 # Project has no tests
34 doCheck = false;
35
36 pythonImportsCheck = [
37 "karton.config_extractor"
38 ];
39
40 meta = with lib; {
41 description = "Static configuration extractor for the Karton framework";
42 homepage = "https://github.com/CERT-Polska/karton-config-extractor";
43 changelog = "https://github.com/CERT-Polska/karton-config-extractor/releases/tag/v${version}";
44 license = with licenses; [ bsd3 ];
45 maintainers = with maintainers; [ fab ];
46 };
47}