diff --git a/pkgs/tools/graphics/graphviz/0001-vimdot-lookup-vim-in-PATH.patch b/pkgs/tools/graphics/graphviz/0001-vimdot-lookup-vim-in-PATH.patch new file mode 100644 index 000000000000..d5f71a4de9e5 --- /dev/null +++ b/pkgs/tools/graphics/graphviz/0001-vimdot-lookup-vim-in-PATH.patch @@ -0,0 +1,30 @@ +From 2008bf62e13ebe41cdad3e16f8b42f46ae393876 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Bj=C3=B8rn=20Forsman?= +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 + diff --git a/pkgs/tools/graphics/graphviz/default.nix b/pkgs/tools/graphics/graphviz/default.nix index e9a552e33001..5fecd69d8026 100644 --- a/pkgs/tools/graphics/graphviz/default.nix +++ b/pkgs/tools/graphics/graphviz/default.nix @@ -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