about summary refs log tree commit diff
path: root/pkgs/tools/misc/pandoc-include
diff options
context:
space:
mode:
authorppenguin <hieronymusv@gmail.com>2022-03-27 17:25:44 +0200
committerGitHub <noreply@github.com>2022-03-27 17:25:44 +0200
commitfaefa9212cbafb9bf5a3378090ac417518e8a044 (patch)
tree4bc26fabc38c0c16f10669e2d42fa1969cad7702 /pkgs/tools/misc/pandoc-include
parent389143bd7a3620811dc85b0aae4ded2d3a301992 (diff)
Add pandoc-include (#164552)
Co-authored-by: Michele Guerini Rocco <rnhmjoj@users.noreply.github.com>
Diffstat (limited to 'pkgs/tools/misc/pandoc-include')
-rw-r--r--pkgs/tools/misc/pandoc-include/default.nix30
1 files changed, 30 insertions, 0 deletions
diff --git a/pkgs/tools/misc/pandoc-include/default.nix b/pkgs/tools/misc/pandoc-include/default.nix
new file mode 100644
index 0000000000000..a0ce0f96b4377
--- /dev/null
+++ b/pkgs/tools/misc/pandoc-include/default.nix
@@ -0,0 +1,30 @@
+{ buildPythonApplication
+, fetchFromGitHub
+, lib
+, natsort
+, panflute
+}:
+
+buildPythonApplication rec {
+  pname = "pandoc-include";
+  version = "1.2.0";
+  format = "pyproject";
+
+  src = fetchFromGitHub {
+    owner = "DCsunset";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "sha256-kuxud7m+sWcNqE8A+Fwb8ATgiUwxQvHeYBTyw1UzX4U=";
+  };
+
+  propagatedBuildInputs = [ natsort panflute ];
+
+  pythonImportsCheck = [ "pandoc_include.main" ];
+
+  meta = with lib; {
+    description = "Pandoc filter to allow file and header includes";
+    homepage = "https://github.com/DCsunset/pandoc-include";
+    license = licenses.mit;
+    maintainers = with maintainers; [ ppenguin ];
+  };
+}