about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/python-modules/cookiecutter/default.nix
blob: 6818f9021a4494680c838ed31e8b862c4eae1cfa (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
{ lib, buildPythonPackage, fetchPypi, isPyPy
, setuptools
, pytest, pytest-cov, pytest-mock, freezegun, safety, pre-commit
, jinja2, binaryornot, click, jinja2-time, requests
, python-slugify
, pyyaml
, arrow
, rich
}:

buildPythonPackage rec {
  pname = "cookiecutter";
  version = "2.6.0";
  pyproject = true;

  # not sure why this is broken
  disabled = isPyPy;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-2yH4Fp6k9P3CQI1IykSFk0neJkf75JSp1sPt/AVCwhw=";
  };

  nativeBuildInputs = [
    setuptools
  ];

  nativeCheckInputs = [
    pytest
    pytest-cov
    pytest-mock
    freezegun
    safety
    pre-commit
  ];
  propagatedBuildInputs = [
    binaryornot
    jinja2
    click
    pyyaml
    jinja2-time
    python-slugify
    requests
    arrow
    rich
  ];

  # requires network access for cloning git repos
  doCheck = false;
  checkPhase = ''
    pytest
  '';

  meta = with lib; {
    homepage = "https://github.com/audreyr/cookiecutter";
    description = "A command-line utility that creates projects from project templates";
    mainProgram = "cookiecutter";
    license = licenses.bsd3;
    maintainers = with maintainers; [ kragniz ];
  };
}