2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchFromGitHub,
|
|
|
|
pythonOlder,
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# build-system
|
|
|
|
setuptools,
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# dependencies
|
|
|
|
attrs,
|
|
|
|
hyperlink,
|
|
|
|
incremental,
|
|
|
|
tubes,
|
|
|
|
twisted,
|
|
|
|
werkzeug,
|
|
|
|
zope-interface,
|
2023-11-16 04:20:00 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
# tests
|
|
|
|
idna,
|
|
|
|
python,
|
|
|
|
treq,
|
2021-08-23 08:02:39 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "klein";
|
2024-09-19 14:19:46 +00:00
|
|
|
version = "24.8.0";
|
|
|
|
pyproject = true;
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "twisted";
|
2024-09-19 14:19:46 +00:00
|
|
|
repo = "klein";
|
|
|
|
rev = "refs/tags/${version}";
|
|
|
|
hash = "sha256-2/zl4fS9ZP73quPmGnz2+brEt84ODgVS89Om/cUsj0M=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
build-system = [
|
|
|
|
incremental
|
2023-11-16 04:20:00 +00:00
|
|
|
setuptools
|
|
|
|
];
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
dependencies = [
|
2022-07-14 12:49:19 +00:00
|
|
|
attrs
|
|
|
|
hyperlink
|
|
|
|
incremental
|
|
|
|
twisted
|
|
|
|
tubes
|
|
|
|
werkzeug
|
2024-01-13 08:15:51 +00:00
|
|
|
zope-interface
|
2022-07-14 12:49:19 +00:00
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [
|
2023-11-16 04:20:00 +00:00
|
|
|
idna
|
2022-07-14 12:49:19 +00:00
|
|
|
treq
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2023-11-16 04:20:00 +00:00
|
|
|
runHook preCheck
|
2023-03-08 16:32:21 +00:00
|
|
|
${python.interpreter} -m twisted.trial klein
|
2023-11-16 04:20:00 +00:00
|
|
|
runHook postCheck
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
pythonImportsCheck = [ "klein" ];
|
2022-07-14 12:49:19 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/twisted/klein/releases/tag/${version}";
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Klein Web Micro-Framework";
|
2022-07-14 12:49:19 +00:00
|
|
|
homepage = "https://github.com/twisted/klein";
|
|
|
|
license = licenses.mit;
|
2021-08-23 08:02:39 +00:00
|
|
|
maintainers = with maintainers; [ exarkun ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|