qvim: get rid of composableDerivation
Use `stdenv.mkDerivation` directly instead of `composableDerivation`. Some configure flags may have changed as the conversion wasn't exactly straightforward.
This commit is contained in:
parent
539f4f644a
commit
9cb1e7a1f3
@ -1,22 +1,38 @@
|
|||||||
args@{ fetchgit, stdenv, ncurses, pkgconfig, gettext
|
args@{ fetchgit, stdenv, ncurses, pkgconfig, gettext
|
||||||
, composableDerivation, lib, config, python, perl, tcl, ruby, qt4
|
, lib, config, python, perl, tcl, ruby, qt4
|
||||||
, libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu
|
, libX11, libXext, libSM, libXpm, libXt, libXaw, libXau, libXmu
|
||||||
, libICE, ... }: with args;
|
, libICE
|
||||||
|
, lua
|
||||||
|
, features
|
||||||
|
, luaSupport ? config.vim.lua or true
|
||||||
|
, perlSupport ? config.vim.perl or false # Perl interpreter
|
||||||
|
, 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
|
||||||
|
|
||||||
|
, ... }: with args;
|
||||||
|
|
||||||
let tag = "20140827";
|
let tag = "20140827";
|
||||||
sha256 = "0ncgbcm23z25naicxqkblz0mcl1zar2qwgi37y5ar8q8884w9ml2";
|
sha256 = "0ncgbcm23z25naicxqkblz0mcl1zar2qwgi37y5ar8q8884w9ml2";
|
||||||
in
|
in {
|
||||||
|
|
||||||
let inherit (args.composableDerivation) composableDerivation edf; in
|
|
||||||
composableDerivation {
|
|
||||||
} (fix: {
|
|
||||||
|
|
||||||
name = "qvim-7.4." + tag;
|
name = "qvim-7.4." + tag;
|
||||||
|
|
||||||
enableParallelBuilding = true; # test this
|
enableParallelBuilding = true; # test this
|
||||||
|
|
||||||
src = fetchgit {
|
src = fetchgit {
|
||||||
url = https://bitbucket.org/equalsraf/vim-qt.git ;
|
url = https://bitbucket.org/equalsraf/vim-qt.git;
|
||||||
rev = "refs/tags/package-" + tag;
|
rev = "refs/tags/package-" + tag;
|
||||||
inherit sha256;
|
inherit sha256;
|
||||||
};
|
};
|
||||||
@ -25,85 +41,53 @@ composableDerivation {
|
|||||||
# to meta.platforms.unix
|
# to meta.platforms.unix
|
||||||
preConfigure = assert (! stdenv.isDarwin); "";
|
preConfigure = assert (! stdenv.isDarwin); "";
|
||||||
|
|
||||||
configureFlags = [ "--with-vim-name=qvim" "--enable-gui=qt" "--with-features=${args.features}" ];
|
configureFlags = [
|
||||||
|
"--with-vim-name=qvim"
|
||||||
|
"--enable-gui=qt"
|
||||||
|
"--with-features=${features}"
|
||||||
|
"--disable-xsmp"
|
||||||
|
"--disable-xsmp_interact"
|
||||||
|
"--disable-workshop" # Sun Visual Workshop support
|
||||||
|
"--disable-sniff" # Sniff interface
|
||||||
|
"--disable-hangulinput" # Hangul input support
|
||||||
|
"--disable-fontset" # X fontset output support
|
||||||
|
"--disable-acl" # ACL support
|
||||||
|
"--disable-gpm" # GPM (Linux mouse daemon)
|
||||||
|
"--disable-mzscheme"
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optionals luaSupport [
|
||||||
|
"--with-lua-prefix=${lua}"
|
||||||
|
"--enable-luainterp"
|
||||||
|
]
|
||||||
|
++ stdenv.lib.optional pythonSupport "--enable-pythoninterp"
|
||||||
|
++ stdenv.lib.optional (pythonSupport && stdenv.isDarwin) "--with-python-config-dir=${python}/lib"
|
||||||
|
++ stdenv.lib.optional nlsSupport "--enable-nls"
|
||||||
|
++ stdenv.lib.optional perlSupport "--enable-perlinterp"
|
||||||
|
++ stdenv.lib.optional rubySupport "--enable-rubyinterp"
|
||||||
|
++ stdenv.lib.optional tclSupport "--enable-tcl"
|
||||||
|
++ stdenv.lib.optional multibyteSupport "--enable-multibyte"
|
||||||
|
++ stdenv.lib.optional darwinSupport "--enable-darwin"
|
||||||
|
++ stdenv.lib.optional cscopeSupport "--enable-cscope";
|
||||||
|
|
||||||
nativeBuildInputs
|
nativeBuildInputs = [ ncurses pkgconfig libX11 libXext libSM libXpm libXt libXaw
|
||||||
= [ ncurses pkgconfig libX11 libXext libSM libXpm libXt libXaw libXau
|
libXau libXmu libICE qt4
|
||||||
libXmu libICE qt4];
|
]
|
||||||
|
++ stdenv.lib.optional nlsSupport gettext
|
||||||
|
++ stdenv.lib.optional perlSupport perl
|
||||||
|
++ stdenv.lib.optional pythonSupport python
|
||||||
|
++ stdenv.lib.optional tclSupport tcl
|
||||||
|
++ stdenv.lib.optional rubySupport ruby
|
||||||
|
++ stdenv.lib.optional luaSupport lua
|
||||||
|
;
|
||||||
|
|
||||||
# most interpreters aren't tested yet.. (see python for example how to do it)
|
postPatch = ''
|
||||||
flags = {
|
'' + stdenv.lib.optionalString ftNixSupport ''
|
||||||
ftNix = {
|
|
||||||
# because we cd to src in the main patch phase, we can't just add this
|
# 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
|
# patch to the list, we have to apply it manually
|
||||||
postPatch = ''
|
|
||||||
cd runtime
|
cd runtime
|
||||||
patch -p2 < ${./ft-nix-support.patch}
|
patch -p2 < ${./ft-nix-support.patch}
|
||||||
cd ..
|
cd ..
|
||||||
'';
|
'';
|
||||||
};
|
|
||||||
}
|
|
||||||
// edf { name = "darwin"; } #Disable Darwin (macOS) 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.
|
|
||||||
// edf {
|
|
||||||
name = "lua";
|
|
||||||
feat = "luainterp";
|
|
||||||
enable = {
|
|
||||||
nativeBuildInputs = [lua];
|
|
||||||
configureFlags = [
|
|
||||||
"--with-lua-prefix=${args.lua}"
|
|
||||||
"--enable-luainterp"
|
|
||||||
];
|
|
||||||
};
|
|
||||||
}
|
|
||||||
// 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 = {
|
|
||||||
luaSupport = config.vim.lua or true;
|
|
||||||
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 ''
|
postInstall = stdenv.lib.optionalString stdenv.isLinux ''
|
||||||
rpath=`patchelf --print-rpath $out/bin/qvim`;
|
rpath=`patchelf --print-rpath $out/bin/qvim`;
|
||||||
@ -125,5 +109,5 @@ composableDerivation {
|
|||||||
maintainers = with maintainers; [ smironov ttuegel ];
|
maintainers = with maintainers; [ smironov ttuegel ];
|
||||||
platforms = platforms.linux;
|
platforms = platforms.linux;
|
||||||
};
|
};
|
||||||
})
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user