1{ lib
2, buildPythonPackage
3, fetchPypi
4, isPy27
5, contextlib2
6, pytest
7, pytestCheckHook
8, vcrpy
9, citeproc-py
10, requests
11, setuptools
12, six
13}:
14
15buildPythonPackage rec {
16 pname = "duecredit";
17 version = "0.9.1";
18 disabled = isPy27;
19
20 src = fetchPypi {
21 inherit pname version;
22 sha256 = "f6192ce9315b35f6a67174761291e61d0831e496e8ff4acbc061731e7604faf8";
23 };
24
25 # bin/duecredit requires setuptools at runtime
26 propagatedBuildInputs = [ citeproc-py requests setuptools six ];
27
28 checkInputs = [ contextlib2 pytest pytestCheckHook vcrpy ];
29
30 preCheck = ''
31 export HOME=$(mktemp -d)
32 '';
33
34 pythonImportsCheck = [ "duecredit" ];
35
36 meta = with lib; {
37 homepage = "https://github.com/duecredit/duecredit";
38 description = "Simple framework to embed references in code";
39 license = licenses.bsd2;
40 maintainers = with maintainers; [ bcdarwin ];
41 };
42}