2020-06-18 07:06:33 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, fetchPypi
|
2023-11-16 04:20:00 +00:00
|
|
|
, pythonOlder
|
|
|
|
, setuptools
|
2020-06-18 07:06:33 +00:00
|
|
|
, pytestCheckHook
|
|
|
|
, vcrpy
|
|
|
|
, citeproc-py
|
|
|
|
, requests
|
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "duecredit";
|
2024-01-02 11:29:13 +00:00
|
|
|
version = "0.9.3";
|
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-01-02 11:29:13 +00:00
|
|
|
hash = "sha256-+DeOqQ0R+XUlkuSHySFj2oDZqf85mT64PAi/LtTso3I=";
|
2020-06-18 07:06:33 +00:00
|
|
|
};
|
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
nativeBuildInputs = [ setuptools ];
|
2024-01-02 11:29:13 +00:00
|
|
|
propagatedBuildInputs = [ citeproc-py requests ];
|
2020-06-18 07:06:33 +00:00
|
|
|
|
2023-11-16 04:20:00 +00:00
|
|
|
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
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
homepage = "https://github.com/duecredit/duecredit";
|
|
|
|
description = "Simple framework to embed references in code";
|
2023-11-16 04:20:00 +00:00
|
|
|
changelog = "https://github.com/duecredit/duecredit/releases/tag/${version}";
|
2020-06-18 07:06:33 +00:00
|
|
|
license = licenses.bsd2;
|
|
|
|
maintainers = with maintainers; [ bcdarwin ];
|
|
|
|
};
|
|
|
|
}
|