2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, flask
|
|
|
|
, karton-core
|
|
|
|
, mistune
|
2021-08-27 14:25:00 +00:00
|
|
|
, prometheus-client
|
2021-12-30 13:39:12 +00:00
|
|
|
, pythonOlder
|
2021-04-25 03:57:28 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "karton-dashboard";
|
2021-09-18 10:52:07 +00:00
|
|
|
version = "1.2.1";
|
2021-12-26 17:43:05 +00:00
|
|
|
format = "setuptools";
|
2021-04-25 03:57:28 +00:00
|
|
|
|
2021-12-30 13:39:12 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "CERT-Polska";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-09-18 10:52:07 +00:00
|
|
|
sha256 = "sha256-C1wtpHyuTlNS6Se1rR0RGUl3xht4aphAtddKlIsOAkI=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
flask
|
|
|
|
karton-core
|
|
|
|
mistune
|
2021-08-27 14:25:00 +00:00
|
|
|
prometheus-client
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
2021-06-28 23:13:55 +00:00
|
|
|
--replace "Flask==1.1.1" "Flask" \
|
2021-12-30 13:39:12 +00:00
|
|
|
--replace "prometheus_client==0.11.0" "prometheus_client"
|
2021-04-25 03:57:28 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
# Project has no tests. pythonImportsCheck requires MinIO configuration
|
|
|
|
doCheck = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Web application that allows for Karton task and queue introspection";
|
|
|
|
homepage = "https://github.com/CERT-Polska/karton-dashboard";
|
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|