about summary refs log tree commit diff
path: root/pkgs/tools/typesetting
diff options
context:
space:
mode:
authorVladimír Čunát <vcunat@gmail.com>2016-02-03 16:54:03 +0100
committerVladimír Čunát <vcunat@gmail.com>2016-02-03 16:57:19 +0100
commitae74c356d94b795eb07dfe9978788b49b70f5959 (patch)
treec13c6894b75f95d3a4dc4627efef508bb03dfba8 /pkgs/tools/typesetting
parentc9790126312119ce5a2a8ac946d9f086e7ea9f55 (diff)
parent53e0f8b1cdf36574bfede6e62e2ac2739c3ef804 (diff)
downloadnixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.tar
nixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.gz
nixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.bz2
nixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.lz
nixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.xz
nixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.tar.zst
nixlib-ae74c356d94b795eb07dfe9978788b49b70f5959.zip
Merge recent 'staging' into closure-size
Let's get rid of those merge conflicts.
Diffstat (limited to 'pkgs/tools/typesetting')
-rw-r--r--pkgs/tools/typesetting/git-latexdiff/default.nix36
-rw-r--r--pkgs/tools/typesetting/git-latexdiff/shebang.patch10
-rw-r--r--pkgs/tools/typesetting/git-latexdiff/version-test.patch17
-rw-r--r--pkgs/tools/typesetting/odpdown/default.nix33
4 files changed, 96 insertions, 0 deletions
diff --git a/pkgs/tools/typesetting/git-latexdiff/default.nix b/pkgs/tools/typesetting/git-latexdiff/default.nix
new file mode 100644
index 000000000000..76536190f345
--- /dev/null
+++ b/pkgs/tools/typesetting/git-latexdiff/default.nix
@@ -0,0 +1,36 @@
+{ stdenv, fetchFromGitLab, git, bash }:
+
+stdenv.mkDerivation rec {
+  version = "1.1.2";
+  name = "git-latexdiff-${version}";
+
+  src = fetchFromGitLab {
+    sha256 = "1alnrjcf3f1qv7fk8h9yachmdz7mjgcynlgsvchfgcb2cpdavxjg";
+    rev = "v${version}";
+    repo = "git-latexdiff";
+    owner = "git-latexdiff";
+  };
+
+  buildInputs = [ git bash ];
+
+  dontBuild = true;
+
+  patches = [ ./shebang.patch ./version-test.patch ];
+
+  postPatch = ''
+    substituteInPlace git-latexdiff \
+      --replace "@GIT_LATEXDIFF_VERSION@" "v${version}"
+  '';
+
+  installPhase = ''
+    mkdir -p $prefix/bin
+    mv git-latexdiff $prefix/bin
+    chmod +x $prefix/bin/git-latexdiff
+  '';
+
+  meta = with stdenv.lib; {
+    description = "View diff on LaTeX source files on the generated PDF files";
+    maintainers = [ maintainers.DamienCassou ];
+    license = licenses.free; # https://gitlab.com/git-latexdiff/git-latexdiff/issues/9
+  };
+}
diff --git a/pkgs/tools/typesetting/git-latexdiff/shebang.patch b/pkgs/tools/typesetting/git-latexdiff/shebang.patch
new file mode 100644
index 000000000000..1d6d27c6e310
--- /dev/null
+++ b/pkgs/tools/typesetting/git-latexdiff/shebang.patch
@@ -0,0 +1,10 @@
+Fix for https://gitlab.com/git-latexdiff/git-latexdiff/issues/8
+---
+--- src/git-latexdiff	2016-01-26 14:04:54.338568955 +0100
++++ src/git-latexdiff	2016-01-26 14:40:23.700381943 +0100
+@@ -1,4 +1,4 @@
+-#! /bin/bash
++#!/usr/bin/env bash
+ 
+ # Main author: Matthieu Moy <Matthieu.Moy@imag.fr> (2012 - 2015)
+ # (See the Git history for other contributors)
diff --git a/pkgs/tools/typesetting/git-latexdiff/version-test.patch b/pkgs/tools/typesetting/git-latexdiff/version-test.patch
new file mode 100644
index 000000000000..e116bbd2c24d
--- /dev/null
+++ b/pkgs/tools/typesetting/git-latexdiff/version-test.patch
@@ -0,0 +1,17 @@
+Fix for https://gitlab.com/git-latexdiff/git-latexdiff/issues/7
+---
+--- src/git-latexdiff	2016-01-26 14:04:54.338568955 +0100
++++ src/git-latexdiff	2016-01-26 14:40:23.700381943 +0100
+@@ -44,11 +44,7 @@
+ git_latexdiff_version='@GIT_LATEXDIFF_VERSION@'
+ 
+ git_latexdiff_compute_version () {
+-    if [ "$git_latexdiff_version" = '@GIT_LATEXDIFF_VERSION@' ]; then
+-	(cd "$(dirname "$0")" && git describe --tags HEAD 2>/dev/null || echo 'Unknown version')
+-    else
+-	echo "$git_latexdiff_version"
+-    fi
++    echo "$git_latexdiff_version"
+ }
+ 
+ usage () {
diff --git a/pkgs/tools/typesetting/odpdown/default.nix b/pkgs/tools/typesetting/odpdown/default.nix
new file mode 100644
index 000000000000..9ff33b2fb698
--- /dev/null
+++ b/pkgs/tools/typesetting/odpdown/default.nix
@@ -0,0 +1,33 @@
+{ stdenv, fetchurl, buildPythonPackage, libreoffice, lpod, lxml, mistune, pillow
+, pygments
+}:
+
+buildPythonPackage rec {
+
+  name = "odpdown-${version}";
+  version = "0.4.1";
+
+  src = fetchurl {
+    url = "https://github.com/thorstenb/odpdown/archive/v${version}.tar.gz";
+    sha256 = "005eecc73c65b9d4c09532547940718a7b308cd565f62a213dfa040827d4d565";
+  };
+
+  propagatedBuildInputs = [ libreoffice lpod lxml mistune pillow pygments ];
+
+  meta = with stdenv.lib; {
+    homepage = https://github.com/thorstenb/odpdown;
+    repositories.git = https://github.com/thorstenb/odpdown.git;
+    description = "Create nice-looking slides from your favourite text editor";
+    longDescription = ''
+      Have a tool like pandoc, latex beamer etc, that you can write (or
+      auto-generate) input for within your favourite hacker's editor, and
+      generate nice-looking slides from. Using your corporation's mandatory,
+      CI-compliant and lovely-artsy Impress template. Including
+      syntax-highlighted code snippets of your latest hack, auto-fitted into the
+      slides.
+    '';
+    license = licenses.bsd3;
+    platforms = with platforms; linux ++ darwin;
+    maintainers = with maintainers; [ vandenoever ];
+  };
+}