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"]
|
2008-01-12 01:22:52 +01:00
|
|
|
["pythonSupport" "python"]
|
|
|
|
["perlSupport" "perl"]
|
|
|
|
["tclSupport" "tcl"]
|
2007-08-11 12:34:07 +02:00
|
|
|
["true" "ncurses"]
|
2007-08-11 13:14:36 +02:00
|
|
|
["false" "libSM"]
|
2007-08-11 12:34:07 +02:00
|
|
|
];
|
2007-08-15 23:17:11 +02:00
|
|
|
nameSuffixes = [
|
|
|
|
"hugeFeatures" "-huge"
|
|
|
|
"x11Support" "-X11"
|
2008-01-12 01:22:52 +01:00
|
|
|
"pythonSupport" "-python"
|
|
|
|
"perlSupport" "-perl"
|
|
|
|
"tclSupport" "-tcl"
|
|
|
|
"ximSupport" "-xim"
|
2007-08-15 23:17:11 +02:00
|
|
|
];
|
|
|
|
configFlags = [
|
2008-01-12 01:22:52 +01:00
|
|
|
"true" " "
|
2007-08-15 23:17:11 +02:00
|
|
|
"x11Support" " --enable-gui=auto "
|
2008-01-12 01:22:52 +01:00
|
|
|
"hugeFeatures" "--with-features=huge --enable-cscope --enable-multibyte --enable-xsmp "
|
|
|
|
"pythonSupport" " --enable-pythoninterp "
|
|
|
|
"perlSupport" " --enable-perlinterp "
|
|
|
|
"tclSupport" " --enable-tclinterp "
|
|
|
|
"ximSupport" " --enable-xim "
|
2007-08-15 23:17:11 +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 {
|
2007-08-15 23:17:11 +02:00
|
|
|
name = args.lib.condConcat "vim-7.1" nameSuffixes check;
|
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";
|
2007-08-15 23:17:11 +02:00
|
|
|
configureFlags = args.lib.condConcat "" configFlags check;
|
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
|
|
|
}
|