@@ -0,0 +1,39 @@
1+{ lib
2+, buildPythonPackage
3+, fetchFromGitHub
4+, karton-core
5+, malduck
6+}:
7+
8+buildPythonPackage rec {
9+ pname = "karton-config-extractor";
10+ version = "1.0.0";
11+
12+ src = fetchFromGitHub {
13+ owner = "CERT-Polska";
14+ repo = pname;
15+ rev = "v${version}";
16+ sha256 = "1v0zqa81yjz6hm17x9hp0iwkllymqzn84dd6r2yrhillbwnjg9bb";
17+ };
18+
19+ propagatedBuildInputs = [
20+ karton-core
21+ malduck
22+ ];
23+
24+ postPatch = ''
25+ substituteInPlace requirements.txt \
26+ --replace "karton.core==4.0.5" "karton-core"
27+ '';
28+
29+ # Project has no tests
30+ doCheck = false;
31+ pythonImportsCheck = [ "karton.config_extractor" ];
32+
33+ meta = with lib; {
34+ description = "Static configuration extractor for the Karton framework";
35+ homepage = "https://github.com/CERT-Polska/karton-config-extractor";
36+ license = with licenses; [ bsd3 ];
37+ maintainers = with maintainers; [ fab ];
38+ };
39+}