2007-08-11 12:34:07 +02:00
|
|
|
args:
|
|
|
|
let
|
|
|
|
defList = [];
|
|
|
|
#stdenv and fetchurl are added automatically
|
|
|
|
getVal = (args.lib.getValue args defList);
|
|
|
|
check = args.lib.checkFlag args;
|
|
|
|
reqsList = [
|
|
|
|
["gtkGUI" "glib" "gtk" "pkgconfig" "libXpm" "libXext" "x11Support"]
|
|
|
|
["athenaGUI" "libXau" "libXt" "libXaw" "libXpm" "libXext" "x11Support"]
|
|
|
|
["x11Support" "libX11"]
|
|
|
|
["hugeFeatures"]
|
|
|
|
["true" "ncurses"]
|
2007-08-11 13:14:36 +02:00
|
|
|
["false" "libSM"]
|
2007-08-11 12:34:07 +02:00
|
|
|
];
|
2007-08-11 13:14:36 +02:00
|
|
|
buildInputsNames = args.lib.filter (x: (null!=getVal x))
|
|
|
|
(args.lib.uniqList {inputList =
|
|
|
|
(args.lib.concatLists (map
|
|
|
|
(x:(if (x==[]) then [] else builtins.tail x))
|
|
|
|
reqsList));});
|
2007-08-11 12:34:07 +02:00
|
|
|
in
|
|
|
|
assert args.lib.checkReqs args defList reqsList;
|
2007-08-10 21:53:30 +02:00
|
|
|
args.stdenv.mkDerivation {
|
|
|
|
name = "vim-7.1" +
|
2007-08-11 12:34:07 +02:00
|
|
|
(if (check "hugeFeatures") then
|
2007-08-10 21:53:30 +02:00
|
|
|
"-huge" else "")
|
2007-08-11 12:34:07 +02:00
|
|
|
+ (if (check "x11Support")
|
2007-08-10 21:53:30 +02:00
|
|
|
then "-X11" else "")
|
|
|
|
;
|
2004-07-30 14:57:27 +02:00
|
|
|
|
2007-08-10 21:53:30 +02:00
|
|
|
src = args.fetchurl {
|
2007-05-14 02:33:03 +02:00
|
|
|
url = ftp://ftp.nluug.nl/pub/editors/vim/unix/vim-7.1.tar.bz2;
|
|
|
|
sha256 = "0w6gy49gdbw7hby5rjkjpa7cdvc0z5iajsm4j1h8108rvfam22kz";
|
2004-07-30 14:57:27 +02:00
|
|
|
};
|
|
|
|
|
2007-08-10 21:53:30 +02:00
|
|
|
inherit (args) ncurses;
|
|
|
|
|
2007-08-11 13:14:36 +02:00
|
|
|
buildInputs = args.lib.filter (x: (x!=null)) (map getVal buildInputsNames);
|
|
|
|
|
2007-08-10 21:53:30 +02:00
|
|
|
postInstall = "ln -s $out/bin/vim $out/bin/vi";
|
|
|
|
preBuild="touch src/auto/link.sed";
|
|
|
|
configureFlags=" --enable-gui=auto --disable-xim "+
|
2007-08-11 12:34:07 +02:00
|
|
|
(if (check "hugeFeatures") then
|
2007-08-10 21:53:30 +02:00
|
|
|
"--with-features=huge --enable-cscope --enable-multibyte --enable-xsmp "
|
|
|
|
else "");
|
2006-10-12 12:53:16 +02:00
|
|
|
|
|
|
|
meta = {
|
|
|
|
description = "The most popular clone of the VI editor";
|
|
|
|
};
|
2004-07-30 14:57:27 +02:00
|
|
|
}
|