forked from mirrors/nixpkgs
Merge pull request #12641 from DamienCassou/new-git-latexdiff
git-latexdiff: init at 1.1.2
This commit is contained in:
commit
59541736f5
36
pkgs/tools/typesetting/git-latexdiff/default.nix
Normal file
36
pkgs/tools/typesetting/git-latexdiff/default.nix
Normal 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
|
||||
};
|
||||
}
|
10
pkgs/tools/typesetting/git-latexdiff/shebang.patch
Normal file
10
pkgs/tools/typesetting/git-latexdiff/shebang.patch
Normal 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)
|
17
pkgs/tools/typesetting/git-latexdiff/version-test.patch
Normal file
17
pkgs/tools/typesetting/git-latexdiff/version-test.patch
Normal 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 () {
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue