1{ lib 2, buildPythonPackage 3, fetchFromGitHub 4, fetchpatch 5, flask 6, karton-core 7, mistune 8, networkx 9, prometheus-client 10, pythonOlder 11}: 12 13buildPythonPackage rec { 14 pname = "karton-dashboard"; 15 version = "1.4.0"; 16 format = "setuptools"; 17 18 disabled = pythonOlder "3.7"; 19 20 src = fetchFromGitHub { 21 owner = "CERT-Polska"; 22 repo = pname; 23 rev = "refs/tags/v${version}"; 24 hash = "sha256-XMyQ0mRF4y61hqlqdxC+He+697P1URfOXQUMnV0pT7o="; 25 }; 26 27 patches = [ 28 (fetchpatch { 29 name = "update-mistune.patch"; 30 url = "https://github.com/CERT-Polska/karton-dashboard/commit/d0a2a1ffd21e9066acca77434acaff7b20e460d0.patch"; 31 hash = "sha256-LOqeLWoCXmVTthruBiQUYR03yPOPHhgYF/fJMhhT6Wo="; 32 }) 33 ]; 34 35 propagatedBuildInputs = [ 36 flask 37 karton-core 38 mistune 39 networkx 40 prometheus-client 41 ]; 42 43 postPatch = '' 44 substituteInPlace requirements.txt \ 45 --replace "Flask==2.0.3" "Flask" \ 46 --replace "networkx==2.6.3" "networkx" \ 47 --replace "prometheus_client==0.11.0" "prometheus_client" 48 ''; 49 50 # Project has no tests. pythonImportsCheck requires MinIO configuration 51 doCheck = false; 52 53 meta = with lib; { 54 description = "Web application that allows for Karton task and queue introspection"; 55 homepage = "https://github.com/CERT-Polska/karton-dashboard"; 56 license = with licenses; [ bsd3 ]; 57 maintainers = with maintainers; [ fab ]; 58 }; 59}