2022-07-14 12:49:19 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, attrs
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchFromGitHub
|
|
|
|
, hyperlink
|
|
|
|
, hypothesis
|
|
|
|
, incremental
|
|
|
|
, python
|
|
|
|
, pythonOlder
|
|
|
|
, treq
|
|
|
|
, tubes
|
|
|
|
, twisted
|
|
|
|
, typing-extensions
|
|
|
|
, werkzeug
|
|
|
|
, zope_interface
|
2021-08-23 08:02:39 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "klein";
|
2022-07-14 12:49:19 +00:00
|
|
|
version = "unstable-2022-06-26";
|
|
|
|
format = "setuptools";
|
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;
|
|
|
|
rev = "d8c2b92a3c77aa64c596696fb6f07172ecf94a74";
|
|
|
|
hash = "sha256-RDZqavkteUbARV78OctZtLIrE4RoYDVAanjwE5i/ZeM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
propagatedBuildInputs = [
|
|
|
|
attrs
|
|
|
|
hyperlink
|
|
|
|
incremental
|
|
|
|
twisted
|
|
|
|
tubes
|
|
|
|
werkzeug
|
|
|
|
zope_interface
|
|
|
|
] ++ lib.optionals (pythonOlder "3.8") [
|
|
|
|
typing-extensions
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
checkInputs = [
|
|
|
|
hypothesis
|
|
|
|
treq
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
checkPhase = ''
|
2021-08-23 08:02:39 +00:00
|
|
|
${python.interpreter} -m twisted.trial -j $NIX_BUILD_CORES klein
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2022-07-14 12:49:19 +00:00
|
|
|
pythonImportsCheck = [
|
|
|
|
"klein"
|
|
|
|
];
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
meta = with lib; {
|
|
|
|
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
|
|
|
};
|
|
|
|
}
|