2020-06-18 07:06:33 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
|
|
|
, isPy27
|
|
|
|
, contextlib2
|
|
|
|
, pytest
|
|
|
|
, pytestCheckHook
|
|
|
|
, vcrpy
|
|
|
|
, citeproc-py
|
|
|
|
, requests
|
|
|
|
, setuptools
|
|
|
|
, six
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "duecredit";
|
2021-06-28 23:13:55 +00:00
|
|
|
version = "0.9.1";
|
2020-06-18 07:06:33 +00:00
|
|
|
disabled = isPy27;
|
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-06-28 23:13:55 +00:00
|
|
|
sha256 = "f6192ce9315b35f6a67174761291e61d0831e496e8ff4acbc061731e7604faf8";
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
# bin/duecredit requires setuptools at runtime
|
|
|
|
propagatedBuildInputs = [ citeproc-py requests setuptools six ];
|
|
|
|
|
2023-02-02 18:25:31 +00:00
|
|
|
nativeCheckInputs = [ contextlib2 pytest pytestCheckHook vcrpy ];
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "duecredit" ];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/duecredit/duecredit";
|
|
|
|
description = "Simple framework to embed references in code";
|
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|