graphviz: patch vimdot to lookup 'vim' in $PATH

Without this it tries to run /usr/bin/vim. Patch is already accepted
upstream.
This commit is contained in:
Bjørn Forsman 2015-01-08 19:58:30 +01:00
parent 9438fa4d3f
commit e90d316f19
2 changed files with 32 additions and 0 deletions

View File

@ -0,0 +1,30 @@
From 2008bf62e13ebe41cdad3e16f8b42f46ae393876 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= <bjorn.forsman@gmail.com>
Date: Tue, 6 Jan 2015 20:39:41 +0100
Subject: [PATCH] vimdot: lookup 'vim' in $PATH
Instead of hardcoding /usr/bin/vim. Needed for NixOS (http://nixos.org), and is
probably useful for others too.
---
plugin/xlib/vimdot.sh | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/plugin/xlib/vimdot.sh b/plugin/xlib/vimdot.sh
index 749fe6a..4e6dd4b 100755
--- a/plugin/xlib/vimdot.sh
+++ b/plugin/xlib/vimdot.sh
@@ -3,9 +3,9 @@
error() { echo "$0: $*" >&2; exit 1; }
-editor="/usr/bin/vim"
+editor="vim"
-if ! test -x "$editor"; then error "the \"$editor\" editor not found or not executable"; fi
+if ! test -x "$(command -v "$editor")"; then error "the \"$editor\" editor not found or not executable"; fi
default="noname.gv"
--
2.1.3

View File

@ -11,6 +11,8 @@ stdenv.mkDerivation rec {
sha256 = "17l5czpvv5ilmg17frg0w4qwf89jzh2aglm9fgx0l0aakn6j7al1";
};
patches = [ ./0001-vimdot-lookup-vim-in-PATH.patch ];
buildInputs =
[ pkgconfig libpng libjpeg expat libXaw yacc libtool fontconfig
pango gd gts