2024-06-05 15:53:02 +00:00
|
|
|
{
|
|
|
|
lib,
|
|
|
|
buildPythonPackage,
|
|
|
|
fetchPypi,
|
|
|
|
pythonOlder,
|
|
|
|
setuptools,
|
|
|
|
pytestCheckHook,
|
|
|
|
vcrpy,
|
|
|
|
citeproc-py,
|
|
|
|
looseversion,
|
|
|
|
requests,
|
2020-06-18 07:06:33 +00:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "duecredit";
|
2024-06-20 14:57:18 +00:00
|
|
|
version = "0.10.2";
|
2023-11-16 04:20:00 +00:00
|
|
|
pyproject = true;
|
|
|
|
|
2024-01-02 11:29:13 +00:00
|
|
|
disabled = pythonOlder "3.8";
|
2020-06-18 07:06:33 +00:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2024-06-20 14:57:18 +00:00
|
|
|
hash = "sha256-/nOiDk+7LZcroB7fN97BsLoeZG7+XvTMrwxnJMoofUI=";
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace tox.ini \
|
|
|
|
--replace-fail "--cov=duecredit" "" \
|
|
|
|
--replace-fail "--cov-config=tox.ini" ""
|
|
|
|
'';
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
citeproc-py
|
|
|
|
looseversion
|
|
|
|
requests
|
|
|
|
];
|
|
|
|
|
|
|
|
nativeCheckInputs = [
|
|
|
|
pytestCheckHook
|
|
|
|
vcrpy
|
|
|
|
];
|
|
|
|
disabledTests = [ "test_import_doi" ]; # tries to access network
|
2022-08-12 12:06:08 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
export HOME=$(mktemp -d)
|
|
|
|
'';
|
|
|
|
|
|
|
|
pythonImportsCheck = [ "duecredit" ];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2024-06-05 15:53:02 +00:00
|
|
|
meta = {
|
2020-06-18 07:06:33 +00:00
|
|
|
homepage = "https://github.com/duecredit/duecredit";
|
|
|
|
description = "Simple framework to embed references in code";
|
2024-04-21 15:54:59 +00:00
|
|
|
mainProgram = "duecredit";
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/duecredit/duecredit/releases/tag/${version}";
|
2024-06-05 15:53:02 +00:00
|
|
|
license = lib.licenses.bsd2;
|
|
|
|
maintainers = [ lib.maintainers.bcdarwin ];
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
}
|