vim_configurable: fix compilation on darwin
* compile with gccApple * enable darwinSupport by default * do not use patchelf
This commit is contained in:
parent
8232b0eef1
commit
6baad4d4d6
|
@ -4,7 +4,12 @@ args@{source ? "latest", ...}: with args;
|
||||||
|
|
||||||
|
|
||||||
let inherit (args.composableDerivation) composableDerivation edf; in
|
let inherit (args.composableDerivation) composableDerivation edf; in
|
||||||
composableDerivation {} (fix: {
|
composableDerivation {
|
||||||
|
# use gccApple to compile on darwin
|
||||||
|
mkDerivation = ( if stdenv.isDarwin
|
||||||
|
then stdenvAdapters.overrideGCC stdenv gccApple
|
||||||
|
else stdenv ).mkDerivation;
|
||||||
|
} (fix: {
|
||||||
|
|
||||||
name = "vim_configurable-7.3";
|
name = "vim_configurable-7.3";
|
||||||
|
|
||||||
|
@ -37,9 +42,9 @@ composableDerivation {} (fix: {
|
||||||
|
|
||||||
configureFlags = ["--enable-gui=auto" "--with-features=${args.features}"];
|
configureFlags = ["--enable-gui=auto" "--with-features=${args.features}"];
|
||||||
|
|
||||||
nativeBuildInputs = [ncurses pkgconfig]
|
nativeBuildInputs
|
||||||
++ [ gtk libX11 libXext libSM libXpm libXt libXaw libXau libXmu glib
|
= [ ncurses pkgconfig gtk libX11 libXext libSM libXpm libXt libXaw libXau
|
||||||
libICE ];
|
libXmu glib libICE ];
|
||||||
|
|
||||||
# most interpreters aren't tested yet.. (see python for example how to do it)
|
# most interpreters aren't tested yet.. (see python for example how to do it)
|
||||||
flags = {
|
flags = {
|
||||||
|
@ -71,14 +76,18 @@ composableDerivation {} (fix: {
|
||||||
|
|
||||||
cfg = {
|
cfg = {
|
||||||
pythonSupport = config.vim.python or true;
|
pythonSupport = config.vim.python or true;
|
||||||
darwinSupport = config.vim.darwin or false;
|
|
||||||
nlsSupport = config.vim.nls or false;
|
nlsSupport = config.vim.nls or false;
|
||||||
tclSupport = config.vim.tcl or false;
|
tclSupport = config.vim.tcl or false;
|
||||||
multibyteSupport = config.vim.multibyte or false;
|
multibyteSupport = config.vim.multibyte or false;
|
||||||
cscopeSupport = config.vim.cscope 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
|
# add .nix filetype detection and minimal syntax highlighting support
|
||||||
ftNixSupport = config.vim.ftNix or true;
|
ftNixSupport = config.vim.ftNix or true;
|
||||||
netbeansSupport = config.netbeans or true; # eg envim is using it
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#--enable-gui=OPTS X11 GUI default=auto OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/photon/carbon
|
#--enable-gui=OPTS X11 GUI default=auto OPTS=auto/no/gtk/gtk2/gnome/gnome2/motif/athena/neXtaw/photon/carbon
|
||||||
|
@ -93,22 +102,23 @@ composableDerivation {} (fix: {
|
||||||
// edf "gtktest" "gtktest" { } #Do not try to compile and run a test GTK program
|
// edf "gtktest" "gtktest" { } #Do not try to compile and run a test GTK program
|
||||||
*/
|
*/
|
||||||
|
|
||||||
postInstall = "
|
postInstall = if stdenv.isLinux then ''
|
||||||
rpath=`patchelf --print-rpath \$out/bin/vim`;
|
rpath=`patchelf --print-rpath $out/bin/vim`;
|
||||||
for i in \$nativeBuildInputs; do
|
for i in $nativeBuildInputs; do
|
||||||
echo adding \$i/lib
|
echo adding $i/lib
|
||||||
rpath=\$rpath:\$i/lib
|
rpath=$rpath:$i/lib
|
||||||
done
|
done
|
||||||
echo \$nativeBuildInputs
|
echo $nativeBuildInputs
|
||||||
echo \$rpath
|
echo $rpath
|
||||||
patchelf --set-rpath \$rpath \$out/bin/{vim,gvim}
|
patchelf --set-rpath $rpath $out/bin/{vim,gvim}
|
||||||
";
|
'' else "";
|
||||||
dontStrip =1;
|
|
||||||
|
dontStrip = 1;
|
||||||
|
|
||||||
meta = {
|
meta = {
|
||||||
description = "The most popular clone of the VI editor";
|
description = "The most popular clone of the VI editor";
|
||||||
homepage = "www.vim.org";
|
homepage = "www.vim.org";
|
||||||
|
platforms = lib.platforms.unix;
|
||||||
};
|
};
|
||||||
|
|
||||||
})
|
})
|
||||||
|
|
||||||
|
|
|
@ -8217,18 +8217,20 @@ let
|
||||||
|
|
||||||
vimHugeX = vim_configurable;
|
vimHugeX = vim_configurable;
|
||||||
|
|
||||||
vim_configurable = callPackage (import ../applications/editors/vim/configurable.nix) {
|
vim_configurable = callPackage ../applications/editors/vim/configurable.nix {
|
||||||
inherit (pkgs) fetchurl stdenv ncurses pkgconfig gettext composableDerivation lib config;
|
inherit (pkgs) fetchurl stdenv ncurses pkgconfig gettext
|
||||||
inherit (pkgs.xlibs) libX11 libXext libSM libXpm libXt libXaw libXau libXmu libICE;
|
composableDerivation lib config glib gtk python perl tcl ruby;
|
||||||
inherit (pkgs) glib gtk;
|
inherit (pkgs.xlibs) libX11 libXext libSM libXpm libXt libXaw libXau libXmu
|
||||||
|
libICE;
|
||||||
|
|
||||||
features = "huge"; # one of tiny, small, normal, big or huge
|
features = "huge"; # one of tiny, small, normal, big or huge
|
||||||
# optional features by passing
|
|
||||||
# python
|
|
||||||
# TODO mzschemeinterp perlinterp
|
|
||||||
inherit (pkgs) python perl tcl ruby /*x11*/;
|
|
||||||
lua = pkgs.lua5;
|
lua = pkgs.lua5;
|
||||||
|
|
||||||
# optional features by flags
|
# optional features by flags
|
||||||
flags = [ "python" "X11" ]; # only flag "X11" by now
|
flags = [ "python" "X11" ]; # only flag "X11" by now
|
||||||
|
|
||||||
|
# so that we can use gccApple if we're building on darwin
|
||||||
|
inherit stdenvAdapters gccApple;
|
||||||
};
|
};
|
||||||
vimLatest = vim_configurable.override { source = "latest"; };
|
vimLatest = vim_configurable.override { source = "latest"; };
|
||||||
vimNox = vim_configurable.override { source = "vim-nox"; };
|
vimNox = vim_configurable.override { source = "vim-nox"; };
|
||||||
|
|
Loading…
Reference in a new issue