From b56ed358510c2c2f44af2dd5bd278c24a0b77bcd Mon Sep 17 00:00:00 2001 From: Marc Weber Date: Fri, 6 Mar 2009 23:21:28 +0000 Subject: replacing applyAndFun by lib.defaultOverridableDelayableArgs applyAndFun has a bug resulting in the same arg beeing added more than once when using a concatenating merge function for the attr set. I've tried giving the function a name "overridableDelayableArgs" which resembles its usage much more. important refactoring: applyAndFun had .fun and .funMerge only when passing the merge function lib.mergeOrApply composableDerivation { initial = { ... }; } to overridableDelayableArgs has always .replace and .merge composableDerivation {} { ... } svn path=/nixpkgs/trunk/; revision=14428 --- pkgs/applications/editors/vim/configurable.nix | 121 ++++++++++++------------- 1 file changed, 59 insertions(+), 62 deletions(-) (limited to 'pkgs/applications/editors/vim/configurable.nix') diff --git a/pkgs/applications/editors/vim/configurable.nix b/pkgs/applications/editors/vim/configurable.nix index b958eb6b812..a528d8f7b35 100644 --- a/pkgs/applications/editors/vim/configurable.nix +++ b/pkgs/applications/editors/vim/configurable.nix @@ -2,77 +2,74 @@ # but I have gvim with python support now :) - Marc args: with args; let inherit (args.composableDerivation) composableDerivation edf; in -composableDerivation { - initial = { +composableDerivation {} { - name = "vim_configurable-7.1"; + name = "vim_configurable-7.1"; - src = args.fetchurl { - url = ftp://ftp.vim.org/pub/vim/unix/vim-7.2.tar.bz2; - sha256 = "11hxkb6r2550c4n13nwr0d8afvh30qjyr5c2hw16zgay43rb0kci"; - }; - - configureFlags = ["--enable-gui=auto" "--with-features=${args.features}"]; + src = args.fetchurl { + url = ftp://ftp.vim.org/pub/vim/unix/vim-7.2.tar.bz2; + sha256 = "11hxkb6r2550c4n13nwr0d8afvh30qjyr5c2hw16zgay43rb0kci"; + }; - buildInputs = [ncurses pkgconfig] - ++ [ gtk libX11 libXext libSM libXpm libXt libXaw libXau libXmu ]; + configureFlags = ["--enable-gui=auto" "--with-features=${args.features}"]; - # most interpreters aren't tested yet.. (see python for example how to do it) - flags = {} - // 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 = { buildInputs = [perl]; };} #Include Perl interpreter. - // edf { name = "python"; feat = "pythoninterp"; enable = { buildInputs = [python]; }; } #Include Python interpreter. - // edf { name = "tcl"; enable = { buildInputs = [tcl]; }; } #Include Tcl interpreter. - // edf { name = "ruby"; feat = "rubyinterp"; enable = { buildInputs = [ruby]; };} #Include Ruby interpreter. - // edf { name = "cscope"; } #Include cscope interface. - // edf { name = "workshop"; } #Include Sun Visual Workshop support. - // edf { name = "netbeans"; } #Disable NetBeans integration support. - // edf { name = "sniff"; } #Include Sniff interface. - // edf { name = "multibyte"; } #Include multibyte editing support. - // edf { name = "hangulinput"; } #Include Hangul input support. - # // edf { name = "xim"; enable = { buildInputs = [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"; } #Don't support NLS (gettext()). - ; + buildInputs = [ncurses pkgconfig] + ++ [ gtk libX11 libXext libSM libXpm libXt libXaw libXau libXmu ]; - cfg = { - pythonSupport = true; - }; + # most interpreters aren't tested yet.. (see python for example how to do it) + flags = {} + // 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 = { buildInputs = [perl]; };} #Include Perl interpreter. + // edf { name = "python"; feat = "pythoninterp"; enable = { buildInputs = [python]; }; } #Include Python interpreter. + // edf { name = "tcl"; enable = { buildInputs = [tcl]; }; } #Include Tcl interpreter. + // edf { name = "ruby"; feat = "rubyinterp"; enable = { buildInputs = [ruby]; };} #Include Ruby interpreter. + // edf { name = "cscope"; } #Include cscope interface. + // edf { name = "workshop"; } #Include Sun Visual Workshop support. + // edf { name = "netbeans"; } #Disable NetBeans integration support. + // edf { name = "sniff"; } #Include Sniff interface. + // edf { name = "multibyte"; } #Include multibyte editing support. + // edf { name = "hangulinput"; } #Include Hangul input support. + # // edf { name = "xim"; enable = { buildInputs = [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"; } #Don't support NLS (gettext()). + ; - #--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 - */ + cfg = { + pythonSupport = true; + }; - postInstall = " - rpath=`patchelf --print-rpath \$out/bin/vim`; - for i in $\buildInputs; do - echo adding \$i/lib - rpath=\$rpath:\$i/lib - done - echo \$buildInputs - echo \$rpath - patchelf --set-rpath \$rpath \$out/bin/{vim,gvim} - "; - dontStrip =1; + #--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 + */ - meta = { - description = "The most popular clone of the VI editor"; - homepage = "www.vim.org"; - }; + postInstall = " + rpath=`patchelf --print-rpath \$out/bin/vim`; + for i in $\buildInputs; do + echo adding \$i/lib + rpath=\$rpath:\$i/lib + done + echo \$buildInputs + echo \$rpath + patchelf --set-rpath \$rpath \$out/bin/{vim,gvim} + "; + dontStrip =1; + meta = { + description = "The most popular clone of the VI editor"; + homepage = "www.vim.org"; }; } -- cgit 1.4.1