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-15 01:55:21 +01:00
|
|
|
["pythonSupport" "python"]
|
|
|
|
["perlSupport" "perl"]
|
|
|
|
["tclSupport" "tcl"]
|
2010-02-23 19:10:42 +01:00
|
|
|
["eclSupport" "ecl" "gmp" "mpfr"]
|
2010-02-28 18:54:41 +01:00
|
|
|
["luaSupport" "lua"]
|
|
|
|
|
|
|
|
# Currently causes problems
|
|
|
|
["mzSchemeSupport" "pltScheme"]
|
|
|
|
|
|
|
|
["perlSupport" "perl"]
|
|
|
|
["rubySupport" "ruby"]
|
|
|
|
["hangulSupport"]
|
|
|
|
["sniffSupport"]
|
|
|
|
["gettextSupport" "gettext"]
|
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-15 01:55:21 +01:00
|
|
|
"pythonSupport" "-python"
|
|
|
|
"perlSupport" "-perl"
|
|
|
|
"tclSupport" "-tcl"
|
|
|
|
"ximSupport" "-xim"
|
2010-02-23 19:10:42 +01:00
|
|
|
"eclSupport" "-ecl"
|
2010-02-28 18:54:41 +01:00
|
|
|
"luaSupport" "-lua"
|
|
|
|
"perlSupport" "-perl"
|
|
|
|
"rubySupport" "-ruby"
|
|
|
|
"mzSchemeSupport" "-mzscheme"
|
2007-08-15 23:17:11 +02:00
|
|
|
];
|
|
|
|
configFlags = [
|
2009-10-12 16:29:07 +02:00
|
|
|
"true" " --enable-multibyte "
|
2007-08-15 23:17:11 +02:00
|
|
|
"x11Support" " --enable-gui=auto "
|
2009-10-12 16:29:07 +02:00
|
|
|
"hugeFeatures" "--with-features=huge --enable-cscope --enable-xsmp "
|
2008-01-15 01:55:21 +01:00
|
|
|
"pythonSupport" " --enable-pythoninterp "
|
|
|
|
"perlSupport" " --enable-perlinterp "
|
|
|
|
"tclSupport" " --enable-tclinterp "
|
|
|
|
"ximSupport" " --enable-xim "
|
2010-02-23 19:10:42 +01:00
|
|
|
"eclSupport" " --enable-eclinterp "
|
2010-02-28 18:54:41 +01:00
|
|
|
"hangulSupport" " --enable-hangulinput "
|
|
|
|
"perlSupport" " --enable-perlinterp "
|
|
|
|
"luaSupport" " --enable-luainterp --with-lua-prefix=${args.lua} "
|
|
|
|
"rubySupport" " --enable-rubyinterp "
|
|
|
|
"sniffSupport" " --enable-sniff "
|
|
|
|
"mzSchemeSupport" " --enable-mzschemeinterp "
|
|
|
|
"gettextSupport" " --enable-nls "
|
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 {
|
2008-08-10 17:05:08 +02:00
|
|
|
name = args.lib.condConcat "vim-7.2" nameSuffixes check;
|
2004-07-30 14:57:27 +02:00
|
|
|
|
2010-02-23 19:10:42 +01:00
|
|
|
src = args.lib.attrByPath ["src"] (args.fetchurl {
|
2008-08-10 17:05:08 +02:00
|
|
|
url = ftp://ftp.vim.org/pub/vim/unix/vim-7.2.tar.bz2;
|
2009-10-12 16:29:07 +02:00
|
|
|
sha256 = "11hxkb6r2550c4n13nwr0d8afvh30qjyr5c2hw16zgay43rb0kci";
|
2010-02-23 19:10:42 +01:00
|
|
|
}) args;
|
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
|
|
|
|
2008-02-06 20:01:06 +01:00
|
|
|
NIX_LDFLAGS = "-lpthread -lutil";
|
|
|
|
|
2006-10-12 12:53:16 +02:00
|
|
|
meta = {
|
|
|
|
description = "The most popular clone of the VI editor";
|
2008-01-31 11:41:45 +01:00
|
|
|
homepage = http://www.vim.org;
|
2006-10-12 12:53:16 +02:00
|
|
|
};
|
2004-07-30 14:57:27 +02:00
|
|
|
}
|