nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 buildPythonPackage,
4 fetchFromGitHub,
5
6 # build-system
7 setuptools,
8
9 # dependencies
10 attrs,
11 hyperlink,
12 incremental,
13 tubes,
14 twisted,
15 werkzeug,
16 zope-interface,
17
18 # tests
19 idna,
20 python,
21 treq,
22}:
23
24buildPythonPackage rec {
25 pname = "klein";
26 version = "24.8.0";
27 pyproject = true;
28
29 src = fetchFromGitHub {
30 owner = "twisted";
31 repo = "klein";
32 tag = version;
33 hash = "sha256-2/zl4fS9ZP73quPmGnz2+brEt84ODgVS89Om/cUsj0M=";
34 };
35
36 build-system = [
37 incremental
38 setuptools
39 ];
40
41 dependencies = [
42 attrs
43 hyperlink
44 incremental
45 twisted
46 tubes
47 werkzeug
48 zope-interface
49 ];
50
51 nativeCheckInputs = [
52 idna
53 treq
54 ];
55
56 checkPhase = ''
57 runHook preCheck
58 ${python.interpreter} -m twisted.trial klein
59 runHook postCheck
60 '';
61
62 pythonImportsCheck = [ "klein" ];
63
64 meta = {
65 changelog = "https://github.com/twisted/klein/releases/tag/${version}";
66 description = "Klein Web Micro-Framework";
67 homepage = "https://github.com/twisted/klein";
68 license = lib.licenses.mit;
69 maintainers = with lib.maintainers; [ exarkun ];
70 };
71}