about summary refs log tree commit diff
path: root/pkgs
diff options
context:
space:
mode:
authorAnderson Torres <torres.anderson.85@protonmail.com>2021-12-06 19:30:36 -0300
committerGitHub <noreply@github.com>2021-12-06 19:30:36 -0300
commit04887fa2226d8b6f54dfe6527e8fb34df2fbe79b (patch)
treef628dfb62b74b4fc3b5319cfe6c85b2e54a7e9cd /pkgs
parentf05c5079a9e2afd9e40c0c30981268a57504cbfe (diff)
parent89158eae07563ec21163929f49d9e2d3e918f118 (diff)
Merge pull request #147594 from xworld21/blahtexml
blahtexml: init at 0.9+date=2020-05-16
Diffstat (limited to 'pkgs')
-rw-r--r--pkgs/tools/typesetting/tex/blahtexml/default.nix48
-rw-r--r--pkgs/top-level/all-packages.nix2
2 files changed, 50 insertions, 0 deletions
diff --git a/pkgs/tools/typesetting/tex/blahtexml/default.nix b/pkgs/tools/typesetting/tex/blahtexml/default.nix
new file mode 100644
index 0000000000000..039b11a6746f9
--- /dev/null
+++ b/pkgs/tools/typesetting/tex/blahtexml/default.nix
@@ -0,0 +1,48 @@
+{ fetchFromGitHub, lib, stdenv, libiconv, texlive, xercesc }:
+
+stdenv.mkDerivation {
+  pname = "blahtexml";
+  version = "0.9+date=2020-05-16";
+
+  src = fetchFromGitHub {
+    owner = "gvanas";
+    repo = "blahtexml";
+    rev = "92f2c5ff1f2b00a541b2222facc51ec72e5f6559";
+    hash = "sha256-ts+2gWsp7+rQu1US2/qEdbttB2Ps12efTSrcioZYsmE=";
+  };
+
+  outputs = [ "out" "doc" ];
+
+  nativeBuildInputs = [ texlive.combined.scheme-full ];
+  buildInputs = [ xercesc ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
+
+  buildFlags =
+    [ "doc" ] ++
+    (if stdenv.isDarwin
+     then [ "blahtex-mac" "blahtexml-mac" ]
+     else [ "blahtex-linux" "blahtexml-linux" ]);
+
+  installPhase = ''
+    install -D -t "$out/bin" blahtex blahtexml
+    install -m644 -D -t "$doc/share/doc/blahtexml" Documentation/manual.pdf
+  '';
+
+  meta = with lib; {
+    homepage = "http://gva.noekeon.org/blahtexml/";
+    description = "A TeX to MathML converter";
+    longDescription = ''
+      Blahtex is a program written in C++, which converts an equation given in
+      a syntax close to TeX into MathML. It is designed by David Harvey and is
+      aimed at supporting equations in MediaWiki.
+
+      Blahtexml is a simple extension of blahtex, written by Gilles Van Assche.
+      In addition to the functionality of blahtex, blahtexml has XML processing
+      in mind and is able to process a whole XML document into another XML
+      document. Instead of converting only one formula at a time, blahtexml can
+      convert all the formulas of the given XML file into MathML.
+    '';
+    license = licenses.bsd3;
+    maintainers = [ maintainers.xworld21 ];
+    platforms = platforms.all;
+  };
+}
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 82d6b32b949e1..6bf57630a9287 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -3865,6 +3865,8 @@ with pkgs;
 
   blastem = callPackage ../misc/emulators/blastem { };
 
+  blahtexml = callPackage ../tools/typesetting/tex/blahtexml { };
+
   blueberry = callPackage ../tools/bluetooth/blueberry { };
 
   blueman = callPackage ../tools/bluetooth/blueman { };