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,
|
|
|
|
wheel,
|
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";
|
2023-11-16 04:20:00 +00:00
|
|
|
version = "unstable-2023-09-05";
|
|
|
|
format = "pyproject";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
disabled = pythonOlder "3.7";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "twisted";
|
|
|
|
repo = pname;
|
2023-11-16 04:20:00 +00:00
|
|
|
rev = "44b356ede27a667252ae5392014c802f0492c017";
|
|
|
|
hash = "sha256-zHdyyx5IseFWr25BGLL0dDM8/5BDehsvbxIci+DEo9s=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
setuptools
|
|
|
|
wheel
|
|
|
|
];
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|