2007-12-13 10:50:22 +01:00
|
|
|
# TODO tidy up eg The patchelf code is patching gvim even if you don't build it..
|
|
|
|
# but I have gvim with python support now :) - Marc
|
2013-08-13 17:47:27 +02:00
|
|
|
args@{source ? "default", ...}: with args;
|
2013-05-27 18:29:35 +02:00
|
|
|
|
|
|
|
|
2008-12-20 02:20:35 +01:00
|
|
|
let inherit (args.composableDerivation) composableDerivation edf; in
|
2013-06-13 10:12:12 +02:00
|
|
|
composableDerivation {
|
|
|
|
# use gccApple to compile on darwin
|
|
|
|
mkDerivation = ( if stdenv.isDarwin
|
|
|
|
then stdenvAdapters.overrideGCC stdenv gccApple
|
|
|
|
else stdenv ).mkDerivation;
|
|
|
|
} (fix: {
|
2007-12-12 08:20:41 +01:00
|
|
|
|
2013-08-13 17:47:27 +02:00
|
|
|
name = "vim_configurable-7.4";
|
2007-12-12 08:20:41 +01:00
|
|
|
|
2013-05-27 18:29:35 +02:00
|
|
|
enableParallelBuilding = true; # test this
|
|
|
|
|
|
|
|
src =
|
|
|
|
builtins.getAttr source {
|
|
|
|
"default" =
|
|
|
|
# latest release
|
|
|
|
args.fetchurl {
|
2013-08-13 17:47:27 +02:00
|
|
|
url = ftp://ftp.vim.org/pub/vim/unix/vim-7.4.tar.bz2;
|
|
|
|
sha256 = "1pjaffap91l2rb9pjnlbrpvb3ay5yhhr3g91zabjvw1rqk9adxfh";
|
2013-05-27 18:29:35 +02:00
|
|
|
};
|
|
|
|
"vim-nox" =
|
|
|
|
{
|
|
|
|
# vim nox branch: client-server without X by uing sockets
|
|
|
|
# REGION AUTO UPDATE: { name="vim-nox"; type="hg"; url="https://code.google.com/r/yukihironakadaira-vim-cmdsrv-nox/"; branch="cmdsrv-nox"; }
|
|
|
|
src = (fetchurl { url = "http://mawercer.de/~nix/repos/vim-nox-hg-2082fc3.tar.bz2"; sha256 = "293164ca1df752b7f975fd3b44766f5a1db752de6c7385753f083499651bd13a"; });
|
|
|
|
name = "vim-nox-hg-2082fc3";
|
|
|
|
# END
|
|
|
|
}.src;
|
2013-08-13 17:52:07 +02:00
|
|
|
};
|
2007-12-12 08:20:41 +01:00
|
|
|
|
2013-06-19 04:05:42 +02:00
|
|
|
# if darwin support is enabled, we want to make sure we're not building with
|
|
|
|
# OS-installed python framework
|
|
|
|
preConfigure
|
|
|
|
= stdenv.lib.optionalString
|
|
|
|
(stdenv.isDarwin && (config.vim.darwin or true)) ''
|
|
|
|
sed -i "5387,5390d" src/auto/configure
|
|
|
|
sed -i "5394d" src/auto/configure
|
|
|
|
'';
|
|
|
|
|
2013-06-15 12:48:20 +02:00
|
|
|
configureFlags
|
|
|
|
= [ "--enable-gui=${args.gui}" "--with-features=${args.features}" ];
|
2007-12-12 08:20:41 +01:00
|
|
|
|
2013-06-13 10:12:12 +02:00
|
|
|
nativeBuildInputs
|
|
|
|
= [ ncurses pkgconfig gtk libX11 libXext libSM libXpm libXt libXaw libXau
|
|
|
|
libXmu glib libICE ];
|
2008-12-20 02:20:35 +01:00
|
|
|
|
2009-03-07 00:21:28 +01:00
|
|
|
# most interpreters aren't tested yet.. (see python for example how to do it)
|
2009-03-07 01:27:13 +01:00
|
|
|
flags = {
|
|
|
|
ftNix = {
|
|
|
|
patches = [ ./ft-nix-support.patch ];
|
|
|
|
};
|
|
|
|
}
|
2009-03-07 00:21:28 +01:00
|
|
|
// edf { name = "darwin"; } #Disable Darwin (Mac OS X) support.
|
|
|
|
// edf { name = "xsmp"; } #Disable XSMP session management
|
|
|
|
// edf { name = "xsmp_interact"; } #Disable XSMP interaction
|
|
|
|
// edf { name = "mzscheme"; } #Include MzScheme interpreter.
|
2012-12-28 19:20:09 +01:00
|
|
|
// edf { name = "perl"; feat = "perlinterp"; enable = { nativeBuildInputs = [perl]; };} #Include Perl interpreter.
|
2013-06-19 04:05:42 +02:00
|
|
|
|
|
|
|
// edf {
|
|
|
|
name = "python";
|
|
|
|
feat = "pythoninterp";
|
|
|
|
enable = {
|
|
|
|
nativeBuildInputs = [ python ];
|
|
|
|
} // lib.optionalAttrs stdenv.isDarwin {
|
|
|
|
configureFlags
|
|
|
|
= [ "--enable-pythoninterp=yes"
|
|
|
|
"--with-python-config-dir=${python}/lib" ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
2012-12-28 19:20:09 +01:00
|
|
|
// edf { name = "tcl"; enable = { nativeBuildInputs = [tcl]; }; } #Include Tcl interpreter.
|
|
|
|
// edf { name = "ruby"; feat = "rubyinterp"; enable = { nativeBuildInputs = [ruby]; };} #Include Ruby interpreter.
|
|
|
|
// edf { name = "lua" ; feat = "luainterp"; enable = { nativeBuildInputs = [lua]; configureFlags = ["--with-lua-prefix=${args.lua}"];};}
|
2009-03-07 00:21:28 +01:00
|
|
|
// edf { name = "cscope"; } #Include cscope interface.
|
|
|
|
// edf { name = "workshop"; } #Include Sun Visual Workshop support.
|
|
|
|
// edf { name = "netbeans"; } #Disable NetBeans integration support.
|
2010-08-03 12:59:57 +02:00
|
|
|
// edf { name = "sniff"; feat = "sniff" ; } #Include Sniff interface.
|
2009-03-07 00:21:28 +01:00
|
|
|
// edf { name = "multibyte"; } #Include multibyte editing support.
|
2010-08-03 12:59:57 +02:00
|
|
|
// edf { name = "hangulinput"; feat = "hangulinput" ;} #Include Hangul input support.
|
|
|
|
// edf { name = "xim"; } #Include XIM input support.
|
2009-03-07 00:21:28 +01:00
|
|
|
// edf { name = "fontset"; } #Include X fontset output support.
|
|
|
|
// edf { name = "acl"; } #Don't check for ACL support.
|
|
|
|
// edf { name = "gpm"; } #Don't use gpm (Linux mouse daemon).
|
2012-12-28 19:20:09 +01:00
|
|
|
// edf { name = "nls"; enable = {nativeBuildInputs = [gettext];}; } #Don't support NLS (gettext()).
|
2009-03-07 00:21:28 +01:00
|
|
|
;
|
2008-12-20 02:20:35 +01:00
|
|
|
|
2009-03-07 00:21:28 +01:00
|
|
|
cfg = {
|
2012-09-19 19:56:56 +02:00
|
|
|
pythonSupport = config.vim.python or true;
|
2013-06-15 12:48:20 +02:00
|
|
|
rubySupport = config.vim.ruby or true;
|
2012-09-19 19:56:56 +02:00
|
|
|
nlsSupport = config.vim.nls or false;
|
|
|
|
tclSupport = config.vim.tcl or false;
|
|
|
|
multibyteSupport = config.vim.multibyte or false;
|
|
|
|
cscopeSupport = config.vim.cscope or false;
|
2013-06-13 10:12:12 +02:00
|
|
|
netbeansSupport = config.netbeans or true; # eg envim is using it
|
|
|
|
|
|
|
|
# by default, compile with darwin support if we're compiling on darwin, but
|
|
|
|
# allow this to be disabled by setting config.vim.darwin to false
|
|
|
|
darwinSupport = stdenv.isDarwin && (config.vim.darwin or true);
|
|
|
|
|
2010-10-03 11:18:14 +02:00
|
|
|
# add .nix filetype detection and minimal syntax highlighting support
|
2012-09-19 19:56:56 +02:00
|
|
|
ftNixSupport = config.vim.ftNix or true;
|
2009-03-07 00:21:28 +01:00
|
|
|
};
|
2007-12-12 08:20:41 +01:00
|
|
|
|
2009-03-07 00:21:28 +01:00
|
|
|
#--enable-gui=OPTS X11 GUI default=auto OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/photon/carbon
|
|
|
|
/*
|
|
|
|
// edf "gtk_check" "gtk_check" { } #If auto-select GUI, check for GTK default=yes
|
|
|
|
// edf "gtk2_check" "gtk2_check" { } #If GTK GUI, check for GTK+ 2 default=yes
|
|
|
|
// edf "gnome_check" "gnome_check" { } #If GTK GUI, check for GNOME default=no
|
|
|
|
// edf "motif_check" "motif_check" { } #If auto-select GUI, check for Motif default=yes
|
|
|
|
// edf "athena_check" "athena_check" { } #If auto-select GUI, check for Athena default=yes
|
|
|
|
// edf "nextaw_check" "nextaw_check" { } #If auto-select GUI, check for neXtaw default=yes
|
|
|
|
// edf "carbon_check" "carbon_check" { } #If auto-select GUI, check for Carbon default=yes
|
|
|
|
// edf "gtktest" "gtktest" { } #Do not try to compile and run a test GTK program
|
|
|
|
*/
|
2008-12-20 02:20:35 +01:00
|
|
|
|
2013-06-19 04:05:42 +02:00
|
|
|
postInstall = stdenv.lib.optionalString stdenv.isLinux ''
|
2013-06-13 10:12:12 +02:00
|
|
|
rpath=`patchelf --print-rpath $out/bin/vim`;
|
|
|
|
for i in $nativeBuildInputs; do
|
|
|
|
echo adding $i/lib
|
|
|
|
rpath=$rpath:$i/lib
|
2009-03-07 00:21:28 +01:00
|
|
|
done
|
2013-06-13 10:12:12 +02:00
|
|
|
echo $nativeBuildInputs
|
|
|
|
echo $rpath
|
|
|
|
patchelf --set-rpath $rpath $out/bin/{vim,gvim}
|
2013-06-19 04:05:42 +02:00
|
|
|
'';
|
2013-06-13 10:12:12 +02:00
|
|
|
|
|
|
|
dontStrip = 1;
|
2007-12-12 08:20:41 +01:00
|
|
|
|
2009-03-07 00:21:28 +01:00
|
|
|
meta = {
|
|
|
|
description = "The most popular clone of the VI editor";
|
2013-06-13 10:12:12 +02:00
|
|
|
homepage = "www.vim.org";
|
|
|
|
platforms = lib.platforms.unix;
|
2007-12-13 10:50:22 +01:00
|
|
|
};
|
2013-05-27 18:29:35 +02:00
|
|
|
})
|
|
|
|
|