2021-04-25 03:57:28 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
2022-09-30 11:47:45 +00:00
|
|
|
, fetchpatch
|
2021-04-25 03:57:28 +00:00
|
|
|
, flask
|
|
|
|
, karton-core
|
|
|
|
, mistune
|
2022-08-12 12:06:08 +00:00
|
|
|
, networkx
|
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";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "1.4.0";
|
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;
|
2022-08-12 12:06:08 +00:00
|
|
|
rev = "refs/tags/v${version}";
|
2022-09-30 11:47:45 +00:00
|
|
|
hash = "sha256-XMyQ0mRF4y61hqlqdxC+He+697P1URfOXQUMnV0pT7o=";
|
2021-04-25 03:57:28 +00:00
|
|
|
};
|
|
|
|
|
2022-09-30 11:47:45 +00:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
name = "update-mistune.patch";
|
|
|
|
url = "https://github.com/CERT-Polska/karton-dashboard/commit/d0a2a1ffd21e9066acca77434acaff7b20e460d0.patch";
|
|
|
|
hash = "sha256-LOqeLWoCXmVTthruBiQUYR03yPOPHhgYF/fJMhhT6Wo=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2021-04-25 03:57:28 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
flask
|
|
|
|
karton-core
|
|
|
|
mistune
|
2022-08-12 12:06:08 +00:00
|
|
|
networkx
|
2021-08-27 14:25:00 +00:00
|
|
|
prometheus-client
|
2021-04-25 03:57:28 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace requirements.txt \
|
2022-08-12 12:06:08 +00:00
|
|
|
--replace "Flask==2.0.3" "Flask" \
|
|
|
|
--replace "networkx==2.6.3" "networkx" \
|
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";
|
2023-02-16 17:41:37 +00:00
|
|
|
changelog = "https://github.com/CERT-Polska/karton-dashboard/releases/tag/v${version}";
|
2021-04-25 03:57:28 +00:00
|
|
|
license = with licenses; [ bsd3 ];
|
|
|
|
maintainers = with maintainers; [ fab ];
|
|
|
|
};
|
|
|
|
}
|