1{
2 lib,
3 buildPythonPackage,
4 fetchPypi,
5 isPyPy,
6 setuptools,
7 pytest,
8 pytest-cov,
9 pytest-mock,
10 freezegun,
11 safety,
12 pre-commit,
13 jinja2,
14 binaryornot,
15 click,
16 jinja2-time,
17 requests,
18 python-slugify,
19 pyyaml,
20 arrow,
21 rich,
22}:
23
24buildPythonPackage rec {
25 pname = "cookiecutter";
26 version = "2.6.0";
27 pyproject = true;
28
29 # not sure why this is broken
30 disabled = isPyPy;
31
32 src = fetchPypi {
33 inherit pname version;
34 hash = "sha256-2yH4Fp6k9P3CQI1IykSFk0neJkf75JSp1sPt/AVCwhw=";
35 };
36
37 nativeBuildInputs = [ setuptools ];
38
39 nativeCheckInputs = [
40 pytest
41 pytest-cov
42 pytest-mock
43 freezegun
44 safety
45 pre-commit
46 ];
47 propagatedBuildInputs = [
48 binaryornot
49 jinja2
50 click
51 pyyaml
52 jinja2-time
53 python-slugify
54 requests
55 arrow
56 rich
57 ];
58
59 # requires network access for cloning git repos
60 doCheck = false;
61 checkPhase = ''
62 pytest
63 '';
64
65 meta = with lib; {
66 homepage = "https://github.com/audreyr/cookiecutter";
67 description = "A command-line utility that creates projects from project templates";
68 mainProgram = "cookiecutter";
69 license = licenses.bsd3;
70 maintainers = with maintainers; [ kragniz ];
71 };
72}