2021-11-29 16:36:51 +00:00
|
|
|
{ lib
|
|
|
|
, buildPythonPackage
|
|
|
|
, cached-property
|
|
|
|
, chevron
|
|
|
|
, fetchPypi
|
|
|
|
, frozendict
|
|
|
|
, pystache
|
|
|
|
, pythonOlder
|
|
|
|
, pyyaml
|
2018-09-05 17:33:10 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
buildPythonPackage rec {
|
|
|
|
pname = "genanki";
|
2021-11-25 22:46:47 +00:00
|
|
|
version = "0.12.0";
|
2021-11-29 16:36:51 +00:00
|
|
|
format = "setuptools";
|
|
|
|
|
|
|
|
disabled = pythonOlder "3.6";
|
2018-09-05 17:33:10 +01:00
|
|
|
|
|
|
|
src = fetchPypi {
|
|
|
|
inherit pname version;
|
2021-11-25 22:46:47 +00:00
|
|
|
sha256 = "f787ac440ff37a3ef3389030e992e3527f000f7a69498f797033ccfad07ebe62";
|
2018-09-05 17:33:10 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
propagatedBuildInputs = [
|
|
|
|
cached-property
|
2021-11-29 16:36:51 +00:00
|
|
|
chevron
|
2018-09-05 17:33:10 +01:00
|
|
|
frozendict
|
|
|
|
pystache
|
|
|
|
pyyaml
|
|
|
|
];
|
|
|
|
|
2021-11-29 16:36:51 +00:00
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace setup.py \
|
|
|
|
--replace "'pytest-runner'," ""
|
|
|
|
'';
|
2018-09-05 17:33:10 +01:00
|
|
|
|
|
|
|
# relies on upstream anki
|
2020-11-10 11:37:26 +00:00
|
|
|
doCheck = false;
|
2021-11-29 16:36:51 +00:00
|
|
|
|
|
|
|
pythonImportsCheck = [
|
|
|
|
"genanki"
|
|
|
|
];
|
2018-09-05 17:33:10 +01:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-09-05 17:33:10 +01:00
|
|
|
description = "Generate Anki decks programmatically";
|
2021-11-29 16:36:51 +00:00
|
|
|
homepage = "https://github.com/kerrickstaley/genanki";
|
2018-09-05 17:33:10 +01:00
|
|
|
license = licenses.mit;
|
|
|
|
maintainers = with maintainers; [ teto ];
|
|
|
|
};
|
|
|
|
}
|