depot/third_party/nixpkgs/pkgs/tools/misc/markdown-anki-decks/default.nix
Default email 841d9c7fc1 Project import generated by Copybara.
GitOrigin-RevId: 3a8d7958a610cd3fec3a6f424480f91a1b259185
2021-06-29 00:13:55 +01:00

45 lines
1 KiB
Nix

{ lib
, python3
}:
python3.pkgs.buildPythonApplication rec {
pname = "markdown-anki-decks";
version = "1.0.0";
format = "pyproject";
src = python3.pkgs.fetchPypi {
inherit pname version;
sha256 = "R6T8KOHMb1Neg/RG5JQl9+7LxOkAoZL0L5wvVaqm9O0=";
};
nativeBuildInputs = with python3.pkgs; [
poetry-core
];
propagatedBuildInputs = with python3.pkgs; [
genanki
typer
colorama
shellingham
beautifulsoup4
markdown
python-frontmatter
];
postPatch = ''
# No API changes.
substituteInPlace pyproject.toml --replace 'python-frontmatter = "^0.5.0"' 'python-frontmatter = "^1.0.0"'
'';
# No tests available on Pypi and there is only a failing version assertion test in the repo.
doCheck = false;
meta = with lib; {
description = "Simple program to convert markdown files into anki decks";
maintainers = with maintainers; [ jtojnar ];
homepage = "https://github.com/lukesmurray/markdown-anki-decks";
license = licenses.mit;
platforms = platforms.unix;
};
}