2015-09-15 05:27:19 +01:00
|
|
|
args@{ fetchgit, stdenv, ncurses, pkgconfig, gettext
|
|
|
|
, composableDerivation, lib, config, python, perl, tcl, ruby, qt4
|
|
|
|
, libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu
|
|
|
|
, libICE, ... }: with args;
|
2013-11-04 18:55:13 +00:00
|
|
|
|
2014-11-20 02:41:45 +00:00
|
|
|
let tag = "20140827";
|
2016-06-02 12:26:44 +01:00
|
|
|
sha256 = "0ncgbcm23z25naicxqkblz0mcl1zar2qwgi37y5ar8q8884w9ml2";
|
2014-11-20 02:41:45 +00:00
|
|
|
in
|
2013-11-04 18:55:13 +00:00
|
|
|
|
|
|
|
let inherit (args.composableDerivation) composableDerivation edf; in
|
|
|
|
composableDerivation {
|
|
|
|
} (fix: {
|
|
|
|
|
2014-11-20 02:41:45 +00:00
|
|
|
name = "qvim-7.4." + tag;
|
2013-11-04 18:55:13 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true; # test this
|
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = https://bitbucket.org/equalsraf/vim-qt.git ;
|
2014-11-20 02:41:45 +00:00
|
|
|
rev = "refs/tags/package-" + tag;
|
|
|
|
inherit sha256;
|
2013-11-04 18:55:13 +00:00
|
|
|
};
|
|
|
|
|
2013-11-08 08:23:04 +00:00
|
|
|
# FIXME: adopt Darwin fixes from vim/default.nix, then chage meta.platforms.linux
|
|
|
|
# to meta.platforms.unix
|
2013-11-04 18:55:13 +00:00
|
|
|
preConfigure = assert (! stdenv.isDarwin); "";
|
|
|
|
|
|
|
|
configureFlags = [ "--with-vim-name=qvim" "--enable-gui=qt" "--with-features=${args.features}" ];
|
|
|
|
|
|
|
|
nativeBuildInputs
|
|
|
|
= [ ncurses pkgconfig libX11 libXext libSM libXpm libXt libXaw libXau
|
|
|
|
libXmu libICE qt4];
|
|
|
|
|
|
|
|
# most interpreters aren't tested yet.. (see python for example how to do it)
|
|
|
|
flags = {
|
|
|
|
ftNix = {
|
|
|
|
# because we cd to src in the main patch phase, we can't just add this
|
|
|
|
# patch to the list, we have to apply it manually
|
|
|
|
postPatch = ''
|
|
|
|
cd runtime
|
|
|
|
patch -p2 < ${./ft-nix-support.patch}
|
|
|
|
cd ..
|
|
|
|
'';
|
|
|
|
};
|
|
|
|
}
|
|
|
|
// 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.
|
|
|
|
// edf { name = "perl"; feat = "perlinterp"; enable = { nativeBuildInputs = [perl]; };} #Include Perl interpreter.
|
|
|
|
|
|
|
|
// edf {
|
|
|
|
name = "python";
|
|
|
|
feat = "pythoninterp";
|
|
|
|
enable = {
|
|
|
|
nativeBuildInputs = [ python ];
|
|
|
|
} // lib.optionalAttrs stdenv.isDarwin {
|
|
|
|
configureFlags
|
|
|
|
= [ "--enable-pythoninterp=yes"
|
|
|
|
"--with-python-config-dir=${python}/lib" ];
|
|
|
|
};
|
|
|
|
}
|
|
|
|
|
|
|
|
// edf { name = "tcl"; enable = { nativeBuildInputs = [tcl]; }; } #Include Tcl interpreter.
|
|
|
|
// edf { name = "ruby"; feat = "rubyinterp"; enable = { nativeBuildInputs = [ruby]; };} #Include Ruby interpreter.
|
2014-04-26 01:04:47 +01:00
|
|
|
// edf {
|
|
|
|
name = "lua";
|
|
|
|
feat = "luainterp";
|
|
|
|
enable = {
|
|
|
|
nativeBuildInputs = [lua];
|
|
|
|
configureFlags = [
|
|
|
|
"--with-lua-prefix=${args.lua}"
|
|
|
|
"--enable-luainterp"
|
|
|
|
];
|
|
|
|
};
|
|
|
|
}
|
2013-11-04 18:55:13 +00:00
|
|
|
// edf { name = "cscope"; } #Include cscope interface.
|
|
|
|
// edf { name = "workshop"; } #Include Sun Visual Workshop support.
|
|
|
|
// edf { name = "netbeans"; } #Disable NetBeans integration support.
|
|
|
|
// edf { name = "sniff"; feat = "sniff" ; } #Include Sniff interface.
|
|
|
|
// edf { name = "multibyte"; } #Include multibyte editing support.
|
|
|
|
// edf { name = "hangulinput"; feat = "hangulinput" ;} #Include Hangul input support.
|
|
|
|
// edf { name = "xim"; } #Include XIM input support.
|
|
|
|
// 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).
|
|
|
|
// edf { name = "nls"; enable = {nativeBuildInputs = [gettext];}; } #Don't support NLS (gettext()).
|
|
|
|
;
|
|
|
|
|
|
|
|
cfg = {
|
2014-04-26 01:04:47 +01:00
|
|
|
luaSupport = config.vim.lua or true;
|
2013-11-04 18:55:13 +00:00
|
|
|
pythonSupport = config.vim.python or true;
|
|
|
|
rubySupport = config.vim.ruby or true;
|
|
|
|
nlsSupport = config.vim.nls or false;
|
|
|
|
tclSupport = config.vim.tcl or false;
|
|
|
|
multibyteSupport = config.vim.multibyte or false;
|
|
|
|
cscopeSupport = config.vim.cscope or false;
|
|
|
|
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);
|
|
|
|
|
|
|
|
# add .nix filetype detection and minimal syntax highlighting support
|
|
|
|
ftNixSupport = config.vim.ftNix or true;
|
|
|
|
};
|
|
|
|
|
|
|
|
postInstall = stdenv.lib.optionalString stdenv.isLinux ''
|
|
|
|
rpath=`patchelf --print-rpath $out/bin/qvim`;
|
|
|
|
for i in $nativeBuildInputs; do
|
|
|
|
echo adding $i/lib
|
|
|
|
rpath=$rpath:$i/lib
|
|
|
|
done
|
|
|
|
echo $nativeBuildInputs
|
|
|
|
echo $rpath
|
|
|
|
patchelf --set-rpath $rpath $out/bin/qvim
|
|
|
|
'';
|
|
|
|
|
|
|
|
dontStrip = 1;
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "The most popular clone of the VI editor (Qt GUI fork)";
|
|
|
|
homepage = https://bitbucket.org/equalsraf/vim-qt/wiki/Home;
|
2015-05-28 18:20:29 +01:00
|
|
|
license = licenses.vim;
|
2014-11-20 02:41:58 +00:00
|
|
|
maintainers = with maintainers; [ smironov ttuegel ];
|
2013-11-08 08:23:04 +00:00
|
|
|
platforms = platforms.linux;
|
2013-11-04 18:55:13 +00:00
|
|
|
};
|
|
|
|
})
|
|
|
|
|