summary refs log tree commit diff
path: root/pkgs/development/python-modules/duecredit/default.nix
blob: 28b21cabc1ca57128205bdd3c805542c2ef5d0e3 (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
{ lib
, buildPythonPackage
, fetchPypi
, isPy27
, pytest
, pytestCheckHook
, vcrpy
, citeproc-py
, requests
, six
}:

buildPythonPackage rec {
  pname = "duecredit";
  version = "0.9.2";
  disabled = isPy27;

  src = fetchPypi {
    inherit pname version;
    hash = "sha256-Dg/Yfp5GzmyUMI6feAwgP+g22JYoQE+L9a+Wp0V77Rw=";
  };

  propagatedBuildInputs = [ citeproc-py requests six ];

  nativeCheckInputs = [ pytest pytestCheckHook vcrpy ];

  preCheck = ''
    export HOME=$(mktemp -d)
  '';

  pythonImportsCheck = [ "duecredit" ];

  meta = with lib; {
    homepage = "https://github.com/duecredit/duecredit";
    description = "Simple framework to embed references in code";
    license = licenses.bsd2;
    maintainers = with maintainers; [ bcdarwin ];
  };
}