summary refs log tree commit diff
path: root/pkgs/tools/misc/markdown-anki-decks
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2021-06-14 16:55:52 +0200
committerGitHub <noreply@github.com>2021-06-14 16:55:52 +0200
commitf0545ba9d32fbc8bc777ee1e6f2586424d545ce8 (patch)
treeb867e44588df617554eff73f9c1c5e2de74c3fc6 /pkgs/tools/misc/markdown-anki-decks
parenta1eefadd395fec830e9da5e332c9234911cf7e0e (diff)
downloadnixpkgs-f0545ba9d32fbc8bc777ee1e6f2586424d545ce8.tar
nixpkgs-f0545ba9d32fbc8bc777ee1e6f2586424d545ce8.tar.gz
nixpkgs-f0545ba9d32fbc8bc777ee1e6f2586424d545ce8.tar.bz2
nixpkgs-f0545ba9d32fbc8bc777ee1e6f2586424d545ce8.tar.lz
nixpkgs-f0545ba9d32fbc8bc777ee1e6f2586424d545ce8.tar.xz
nixpkgs-f0545ba9d32fbc8bc777ee1e6f2586424d545ce8.tar.zst
nixpkgs-f0545ba9d32fbc8bc777ee1e6f2586424d545ce8.zip
markdown-anki-decks: init at 1.0.0 (#126782)
Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
Diffstat (limited to 'pkgs/tools/misc/markdown-anki-decks')
-rw-r--r--pkgs/tools/misc/markdown-anki-decks/default.nix45
1 files changed, 45 insertions, 0 deletions
diff --git a/pkgs/tools/misc/markdown-anki-decks/default.nix b/pkgs/tools/misc/markdown-anki-decks/default.nix
new file mode 100644
index 00000000000..d74eb84dc34
--- /dev/null
+++ b/pkgs/tools/misc/markdown-anki-decks/default.nix
@@ -0,0 +1,45 @@
+{ 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;
+  };
+}