[Nix-dev] topgit: make usage of $PAGER more POSIX-compatible

Nick Sauce nick.sauce at monumentmail.com
Tue Sep 9 11:48:30 CEST 2014


topgit: make usage of $PAGER more POSIX-compatible
---

diff --git \
a/pkgs/applications/version-management/git-and-tools/topgit/default.nix \
b/pkgs/applications/version-management/git-and-tools/topgit/default.nix
index 195f6f3..adeeae9 100644
--- a/pkgs/applications/version-management/git-and-tools/topgit/default.nix
+++ b/pkgs/applications/version-management/git-and-tools/topgit/default.nix
 <at>  <at>  -8,6 +8,10  <at>  <at>  stdenv.mkDerivation rec {
     sha256 = "1z9x42a0cmn8n2n961qcfl522nd6j9a3dpx1jbqfp24ddrk5zd94";
   };

+  # thanks to MarcWeber, Lethalman, and tv:
+  #   https://github.com/greenrd/topgit/issues/36
+  patches = [ ./pager-bug.patch ];
+
   configurePhase = "makeFlags=prefix=$out";

   postInstall = ''
diff --git \
a/pkgs/applications/version-management/git-and-tools/topgit/pager-bug.patch \
b/pkgs/applications/version-management/git-and-tools/topgit/pager-bug.patch
new file mode 100644
index 0000000..0345762
--- /dev/null
+++ b/pkgs/applications/version-management/git-and-tools/topgit/pager-bug.patch
 <at>  <at>  -0,0 +1,12  <at>  <at> 
+diff -Naur a/tg.sh b/tg.sh
+--- a/tg.sh	2013-03-09 22:04:06.000000000 +0900
++++ b/tg.sh	2014-09-09 11:02:09.118639436 +0900
+ <at>  <at>  -413,7 +413,7  <at>  <at> 
+ 	pager_fifo="${tg_tmp_dir:-${HOME}}/.tg-pager"
+ 	mkfifo -m 600 "$pager_fifo"
+ 
+-	"$TG_PAGER" < "$pager_fifo" &
++	eval "$TG_PAGER" < "$pager_fifo" &
+ 	exec > "$pager_fifo"		# dup2(pager_fifo.in, 1)
+ 
+ 	# this is needed so e.g. `git diff` will still colorize it's output if




More information about the nix-dev mailing list