Merge pull request #12641 from DamienCassou/new-git-latexdiff

git-latexdiff: init at 1.1.2
This commit is contained in:
Damien Cassou 2016-01-27 10:39:00 +01:00
commit 59541736f5
4 changed files with 65 additions and 0 deletions

View File

@ -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
};
}

View File

@ -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)

View File

@ -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 () {

View File

@ -1646,6 +1646,8 @@ let
gitlab-git-http-server = callPackage ../applications/version-management/gitlab-git-http-server { };
git-latexdiff = callPackage ../tools/typesetting/git-latexdiff { };
glusterfs = callPackage ../tools/filesystems/glusterfs { };
glmark2 = callPackage ../tools/graphics/glmark2 { };