1{ lib
2, buildPythonPackage
3, fetchPypi
4, pythonOlder
5, setuptools
6, pytestCheckHook
7, vcrpy
8, citeproc-py
9, requests
10, six
11}:
12
13buildPythonPackage rec {
14 pname = "duecredit";
15 version = "0.9.2";
16 pyproject = true;
17
18 disabled = pythonOlder "3.6";
19
20 src = fetchPypi {
21 inherit pname version;
22 hash = "sha256-Dg/Yfp5GzmyUMI6feAwgP+g22JYoQE+L9a+Wp0V77Rw=";
23 };
24
25 nativeBuildInputs = [ setuptools ];
26 propagatedBuildInputs = [ citeproc-py requests six ];
27
28 nativeCheckInputs = [ pytestCheckHook vcrpy ];
29 disabledTests = [ "test_import_doi" ]; # tries to access network
30
31 preCheck = ''
32 export HOME=$(mktemp -d)
33 '';
34
35 pythonImportsCheck = [ "duecredit" ];
36
37 meta = with lib; {
38 homepage = "https://github.com/duecredit/duecredit";
39 description = "Simple framework to embed references in code";
40 changelog = "https://github.com/duecredit/duecredit/releases/tag/${version}";
41 license = licenses.bsd2;
42 maintainers = with maintainers; [ bcdarwin ];
43 };
44}