git-latexdiff: 1.6.0 -> 1.7.1 (#463389)

This commit is contained in:
Doron Behar
2026-02-09 21:30:37 +00:00
committed by GitHub
4 changed files with 43 additions and 36 deletions
+34 -19
View File
@@ -2,46 +2,61 @@
lib,
stdenv,
fetchFromGitLab,
git,
bash,
installShellFiles,
asciidoc,
makeBinaryWrapper,
coreutils,
gnused,
versionCheckHook,
}:
stdenv.mkDerivation (finalAttrs: {
version = "1.6.0";
version = "1.7.1";
pname = "git-latexdiff";
src = fetchFromGitLab {
hash = "sha256-DMoGEbCBuqUGjbna3yDpD4WNTikPudYRD4Wy1pPG2mw=";
rev = finalAttrs.version;
repo = "git-latexdiff";
owner = "git-latexdiff";
tag = finalAttrs.version;
hash = "sha256-ocEDds1vAnaj84YiAez150OZV82w3NlsgXoxNbUGW/Q=";
};
buildInputs = [
git
bash
];
dontBuild = true;
patches = [ ./version-test.patch ];
postPatch = ''
substituteInPlace git-latexdiff \
--replace "@GIT_LATEXDIFF_VERSION@" "v${finalAttrs.version}"
--replace-fail "@GIT_LATEXDIFF_VERSION@" "v${finalAttrs.version}"
patchShebangs git-latexdiff
'';
nativeBuildInputs = [
installShellFiles
asciidoc
makeBinaryWrapper
];
nativeInstallCheckInputs = [
versionCheckHook
];
doInstallCheck = true;
dontBuild = true;
installPhase = ''
mkdir -p $prefix/bin
mv git-latexdiff $prefix/bin
chmod +x $prefix/bin/git-latexdiff
installBin git-latexdiff
wrapProgram ''${!outputBin}/bin/git-latexdiff \
--prefix PATH : ${
lib.makeBinPath [
coreutils
gnused
]
}
make git-latexdiff.1
installManPage git-latexdiff.1
'';
meta = {
description = "View diff on LaTeX source files on the generated PDF files";
homepage = "https://gitlab.com/git-latexdiff/git-latexdiff";
maintainers = [ ];
maintainers = with lib.maintainers; [ doronbehar ];
license = lib.licenses.bsd3; # https://gitlab.com/git-latexdiff/git-latexdiff/issues/9
platforms = lib.platforms.unix;
mainProgram = "git-latexdiff";
@@ -1,17 +0,0 @@
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 () {
@@ -14,6 +14,7 @@
buildEnv,
callPackage,
ghostscript_headless,
git-latexdiff,
harfbuzz,
makeWrapper,
installShellFiles,
@@ -79,6 +80,7 @@ let
gawk
getopt
ghostscript_headless
git-latexdiff
gnugrep
gnumake
gnupg
@@ -12,6 +12,7 @@
gawk,
getopt,
ghostscript_headless,
git-latexdiff,
gnugrep,
gnumake,
gnupg,
@@ -545,6 +546,12 @@ lib.recursiveUpdate orig rec {
fi
'';
# Use top-level git-latexdiff's version and src. NOTE that this derivation is
# still different from top-level's `git-latexdiff`, due to __structuredAttrs
# enabled unconditionally. Still though this derivation produces a funcitonal
# binary.
inherit git-latexdiff;
# RISC-V: https://github.com/LuaJIT/LuaJIT/issues/628
luajittex.binfiles = lib.optionals (lib.meta.availableOn stdenv.hostPlatform luajit) orig.luajittex.binfiles;