diff options
author | Jason "Don" O'Conal <lovek323@gmail.com> | 2013-06-13 18:12:12 +1000 |
---|---|---|
committer | Jason "Don" O'Conal <lovek323@gmail.com> | 2013-06-13 22:20:54 +1000 |
commit | 6baad4d4d6686c374af0f0fae2d0d856ab97c713 (patch) | |
tree | b27129884dcc353b001a6bfcb8f056d1971347bf /pkgs/applications/editors/vim/configurable.nix | |
parent | 8232b0eef1ee8188ddefa294ac368c4a297dfcf6 (diff) | |
download | nixlib-6baad4d4d6686c374af0f0fae2d0d856ab97c713.tar nixlib-6baad4d4d6686c374af0f0fae2d0d856ab97c713.tar.gz nixlib-6baad4d4d6686c374af0f0fae2d0d856ab97c713.tar.bz2 nixlib-6baad4d4d6686c374af0f0fae2d0d856ab97c713.tar.lz nixlib-6baad4d4d6686c374af0f0fae2d0d856ab97c713.tar.xz nixlib-6baad4d4d6686c374af0f0fae2d0d856ab97c713.tar.zst nixlib-6baad4d4d6686c374af0f0fae2d0d856ab97c713.zip |
vim_configurable: fix compilation on darwin
* compile with gccApple * enable darwinSupport by default * do not use patchelf
Diffstat (limited to 'pkgs/applications/editors/vim/configurable.nix')
-rw-r--r-- | pkgs/applications/editors/vim/configurable.nix | 46 |
1 files changed, 28 insertions, 18 deletions
diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index c10db35a51b9..b598a3d461e7 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -4,7 +4,12 @@ args@{source ? "latest", ...}: with args; 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"; @@ -37,9 +42,9 @@ composableDerivation {} (fix: { configureFlags = ["--enable-gui=auto" "--with-features=${args.features}"]; - nativeBuildInputs = [ncurses pkgconfig] - ++ [ gtk libX11 libXext libSM libXpm libXt libXaw libXau libXmu glib - libICE ]; + nativeBuildInputs + = [ ncurses pkgconfig gtk libX11 libXext libSM libXpm libXt libXaw libXau + libXmu glib libICE ]; # most interpreters aren't tested yet.. (see python for example how to do it) flags = { @@ -71,14 +76,18 @@ composableDerivation {} (fix: { cfg = { pythonSupport = config.vim.python or true; - darwinSupport = config.vim.darwin or false; 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; - 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 @@ -93,22 +102,23 @@ composableDerivation {} (fix: { // edf "gtktest" "gtktest" { } #Do not try to compile and run a test GTK program */ - postInstall = " - rpath=`patchelf --print-rpath \$out/bin/vim`; - for i in \$nativeBuildInputs; do - echo adding \$i/lib - rpath=\$rpath:\$i/lib + postInstall = if stdenv.isLinux then '' + rpath=`patchelf --print-rpath $out/bin/vim`; + for i in $nativeBuildInputs; do + echo adding $i/lib + rpath=$rpath:$i/lib done - echo \$nativeBuildInputs - echo \$rpath - patchelf --set-rpath \$rpath \$out/bin/{vim,gvim} - "; - dontStrip =1; + echo $nativeBuildInputs + echo $rpath + patchelf --set-rpath $rpath $out/bin/{vim,gvim} + '' else ""; + + dontStrip = 1; meta = { description = "The most popular clone of the VI editor"; - homepage = "www.vim.org"; + homepage = "www.vim.org"; + platforms = lib.platforms.unix; }; - }) |