diff options
author | Michael Raskin <7c6f434c@mail.ru> | 2008-08-19 05:54:09 +0000 |
---|---|---|
committer | Michael Raskin <7c6f434c@mail.ru> | 2008-08-19 05:54:09 +0000 |
commit | 87ff8d6347cd99618bc8f9ff58ddf357ce38c522 (patch) | |
tree | 304d18d1a67cf9e844bf9d772b2a5386d00aa5f0 /pkgs | |
parent | b5b68ce414fabb63a782dd74e86e940350e9a662 (diff) |
Changed builderDefs to use composedArgsAndFun, reduced number of nulls, made overrides in builderDefsPackage to work in an intuitive manner.
svn path=/nixpkgs/trunk/; revision=12655
Diffstat (limited to 'pkgs')
51 files changed, 224 insertions, 181 deletions
diff --git a/pkgs/applications/audio/audacity/default.nix b/pkgs/applications/audio/audacity/default.nix index 950a8e93907c..644996065cd6 100644 --- a/pkgs/applications/audio/audacity/default.nix +++ b/pkgs/applications/audio/audacity/default.nix @@ -1,5 +1,5 @@ args: with args; - let localDefs = builderDefs { + let localDefs = builderDefs.meta.function { src = fetchurl { url = mirror://sourceforge/audacity/audacity-src-1.3.3.tar.gz; @@ -8,7 +8,7 @@ args: with args; buildInputs =[(wxGTK null) libogg libvorbis libsndfile libmad pkgconfig gtk gettext glib]; - } null; + }; in with localDefs; let postInstall = FullDepEntry (" diff --git a/pkgs/applications/audio/ladspa-plugins/default.nix b/pkgs/applications/audio/ladspa-plugins/default.nix index 0c24a0fda454..230ee1d7de26 100644 --- a/pkgs/applications/audio/ladspa-plugins/default.nix +++ b/pkgs/applications/audio/ladspa-plugins/default.nix @@ -1,5 +1,5 @@ args: with args; - let localDefs = builderDefs { + let localDefs = builderDefs.meta.function { src = fetchurl { url = http://plugin.org.uk/releases/0.4.15/swh-plugins-0.4.15.tar.gz; @@ -7,7 +7,7 @@ args: with args; }; buildInputs = [fftw ladspaH pkgconfig]; configureFlags = []; - } null; + }; in with localDefs; let postInstall = FullDepEntry (" diff --git a/pkgs/applications/audio/ladspa-plugins/ladspah.nix b/pkgs/applications/audio/ladspa-plugins/ladspah.nix index 82595b4163e9..60ee6fbf4571 100644 --- a/pkgs/applications/audio/ladspa-plugins/ladspah.nix +++ b/pkgs/applications/audio/ladspa-plugins/ladspah.nix @@ -6,10 +6,10 @@ let sha256 = "1b908csn85ng9sz5s5d1mqk711cmawain2z8px2ajngihdrynb67"; }; in - let localDefs = builderDefs { + let localDefs = builderDefs.meta.function { buildInputs = []; inherit src; - } null; + }; in with localDefs; let copyFile = FullDepEntry (" diff --git a/pkgs/applications/audio/snd/default.nix b/pkgs/applications/audio/snd/default.nix index 0a8bb95173f3..a8eb2de8e1a7 100644 --- a/pkgs/applications/audio/snd/default.nix +++ b/pkgs/applications/audio/snd/default.nix @@ -1,51 +1,60 @@ -args : with args; - let localDefs = builderDefs { - src = - fetchurl { - url = http://downloads.sourceforge.net/snd/snd-9.4.tar.gz; - sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm"; - }; +args : +let + lib = args.lib; + fetchurl = args.fetchurl; + FullDepEntry = args.FullDepEntry; - buildInputs = [gtk glib pkgconfig libXpm gmp gettext libX11 fftw] - ++ (lib.optional (args ? ruby) args.ruby) - ++ (lib.optional (args ? mesa) args.mesa) - ++ (lib.optional (args ? guile) args.guile) - ++ (lib.optional (args ? libtool) args.libtool) - ++ (lib.optional (args ? sndlib) args.sndlib) - ++ (lib.optional (args ? alsaLib) args.alsaLib) - ++ (lib.optional (args ? jackaudio) args.jackaudio) - ; - configureFlags = ["--with-gtk" "--with-xpm"] - ++ (lib.optional (args ? ruby) "--with-ruby" ) - ++ (lib.optional (args ? mesa) "--with-gl" ) - ++ (lib.optional (args ? guile) "--with-guile") - ++ (lib.optional (args ? sndlib) "--with-midi" ) - ++ (lib.optional (args ? alsaLib) "--with-alsa") - ++ (lib.optional (args ? jackaudio) "--with-jack" ) - ++ [ "--with-fftw" "--htmldir=$out/share/snd/html" "--with-doc-dir=$out/share/snd/html" ] - ; - } null; /* null is a terminator for sumArgs */ - in with localDefs; - let makeDocsWork = FullDepEntry '' + version = lib.getAttr ["version"] "9.4" args; + buildInputs = with args; [gtk glib pkgconfig + libXpm gmp gettext libX11 fftw] + ++ (lib.optional (args ? ruby) args.ruby) + ++ (lib.optional (args ? mesa) args.mesa) + ++ (lib.optional (args ? guile) args.guile) + ++ (lib.optional (args ? libtool) args.libtool) + ++ (lib.optional (args ? sndlib) args.sndlib) + ++ (lib.optional (args ? alsaLib) args.alsaLib) + ++ (lib.optional (args ? jackaudio) args.jackaudio) + ; + configureFlags = ["--with-gtk" "--with-xpm"] + ++ (lib.optional (args ? ruby) "--with-ruby" ) + ++ (lib.optional (args ? mesa) "--with-gl" ) + ++ (lib.optional (args ? guile) "--with-guile") + ++ (lib.optional (args ? sndlib) "--with-midi" ) + ++ (lib.optional (args ? alsaLib) "--with-alsa") + ++ (lib.optional (args ? jackaudio) "--with-jack" ) + ++ [ "--with-fftw" "--htmldir=$out/share/snd/html" "--with-doc-dir=$out/share/snd/html" ] + ; +in +rec { + src = fetchurl { + url = "http://downloads.sourceforge.net/snd/snd-${version}.tar.gz"; + sha256 = "0zqgfnkvkqxby1k74mwba1r4pb520glcsz5jjmpzm9m41nqnghmm"; + }; + + inherit buildInputs; + configureFlags = []; + + /* doConfigure should be specified separately */ + phaseNames = ["doConfigure" "preBuild" "makeDocsWork" + "doMakeInstall" "doForceShare"]; + + makeDocsWork = FullDepEntry '' # hackish way to make html docs work h="$out/share/snd/html"; ensureDir "$h"; cp *.html "$h" patch -p1 < ${./doc.patch} sed "s@HTML-DIR@$h@" -i index.scm snd-help.c - '' [defEnsureDir]; + '' ["defEnsureDir"]; - preBuild = FullDepEntry ('' + preBuild = FullDepEntry ('' cp config.log /tmp/snd-config.log - export NIX_LDFLAGS="$NIX_LDFLAGS -L${libX11}/lib -lX11" + export NIX_LDFLAGS="$NIX_LDFLAGS -L${args.libX11}/lib -lX11" - '') [minInit doUnpack makeDocsWork]; -in -stdenv.mkDerivation rec { - name = "Snd-9.4"; - builder = writeScript (name + "-builder") - (textClosure localDefs [doConfigure preBuild makeDocsWork doMakeInstall doForceShare ]); - meta = { - description = "Snd sound editor."; - homepage = http://ccrma.stanford.edu/software/snd; - inherit src; - }; + '') ["minInit" "doUnpack" "makeDocsWork"]; + + name = "Snd-" + version; + meta = { + description = "Snd sound editor."; + homepage = http://ccrma.stanford.edu/software/snd; + inherit src; + }; } diff --git a/pkgs/applications/graphics/gocr/0.44.nix b/pkgs/applications/graphics/gocr/0.44.nix index 544c3b238d01..0a3c3869a1c7 100644 --- a/pkgs/applications/graphics/gocr/0.44.nix +++ b/pkgs/applications/graphics/gocr/0.44.nix @@ -1,5 +1,5 @@ args : with args; - let localDefs = builderDefs { + let localDefs = builderDefs.meta.function { src = /* put a fetchurl here */ fetchurl { url = http://prdownloads.sourceforge.net/jocr/gocr-0.44.tar.gz; @@ -8,7 +8,7 @@ fetchurl { buildInputs = []; configureFlags = []; - } null; /* null is a terminator for sumArgs */ + }; in with localDefs; stdenv.mkDerivation rec { name = "gocr"; diff --git a/pkgs/applications/graphics/xscreensaver/5.05.nix b/pkgs/applications/graphics/xscreensaver/5.05.nix index 9bfc3bfff7e4..2410f6938773 100644 --- a/pkgs/applications/graphics/xscreensaver/5.05.nix +++ b/pkgs/applications/graphics/xscreensaver/5.05.nix @@ -1,4 +1,4 @@ -args : with args; let localDefs = builderDefs (args // { +args : with args; let localDefs = builderDefs.meta.function (args // { src = /* put a fetchurl here */ fetchurl { url = http://www.jwz.org/xscreensaver/xscreensaver-5.05.tar.gz; @@ -19,7 +19,7 @@ args : with args; let localDefs = builderDefs (args // { "true" (" --with-x-app-defaults=\$out/share/xscreensaver/app-defaults "+ " --with-hackdir=\$out/share/xscreensaver-hacks ") ]; - }) null; /* null is a terminator for sumArgs */ + }); in with localDefs; let preConfigure = FullDepEntry (" diff --git a/pkgs/applications/networking/p2p/ldcpp/1.0.1.nix b/pkgs/applications/networking/p2p/ldcpp/1.0.1.nix index ea1f6b1b84b2..00626377e7c4 100644 --- a/pkgs/applications/networking/p2p/ldcpp/1.0.1.nix +++ b/pkgs/applications/networking/p2p/ldcpp/1.0.1.nix @@ -1,5 +1,5 @@ -args : with args; with builderDefs {src="";} null; - let localDefs = builderDefs (rec { +args : with args; with builderDefs; + let localDefs = builderDefs.meta.function ((rec { src = /* put a fetchurl here */ fetchurl { url = http://download2.berlios.de/linuxdcpp/linuxdcpp-1.0.1.tar.bz2; @@ -15,7 +15,7 @@ args : with args; with builderDefs {src="";} null; scons PREFIX=$out scons PREFIX=$out install '') ["minInit" "doUnpack" "addInputs" "defEnsureDir"]; - }) args null; /* null is a terminator for sumArgs */ + }) // args); in with localDefs; stdenv.mkDerivation rec { name = "ldcpp-"+version; diff --git a/pkgs/applications/virtualization/qemu/linux-img/0.2.nix b/pkgs/applications/virtualization/qemu/linux-img/0.2.nix index b951ca866844..87e2e114becd 100644 --- a/pkgs/applications/virtualization/qemu/linux-img/0.2.nix +++ b/pkgs/applications/virtualization/qemu/linux-img/0.2.nix @@ -1,6 +1,6 @@ args : with args; - let localDefs = builderDefs { + let localDefs = builderDefs.meta.function { src = /* put a fetchurl here */ fetchurl { url = [ http://fabrice.bellard.free.fr/qemu/linux-0.2.img.bz2 http://bellard.org/qemu/linux-0.2.img.bz2]; @@ -8,7 +8,7 @@ args : with args; }; buildInputs = []; configureFlags = []; - } null; /* null is a terminator for sumArgs */ + }; in with localDefs; let doCopy = FullDepEntry (" diff --git a/pkgs/applications/window-managers/compiz/0.6.2.nix b/pkgs/applications/window-managers/compiz/0.6.2.nix index bd63e356a652..213fc810ddf5 100644 --- a/pkgs/applications/window-managers/compiz/0.6.2.nix +++ b/pkgs/applications/window-managers/compiz/0.6.2.nix @@ -1,5 +1,5 @@ args : with args; - let localDefs = builderDefs { + let localDefs = builderDefs.meta.function { src = /* put a fetchurl here */ fetchurl { url = http://releases.compiz-fusion.org/compiz/0.6.2/compiz-0.6.2.tar.bz2; @@ -21,7 +21,7 @@ args : with args; "--enable-annotate" "--enable-librsvg"] ++ (if args ? extraConfigureFlags then args.extraConfigureFlags else []); patches = [ ./glx-patch-0.6.2.patch ]; - } null; /* null is a terminator for sumArgs */ + }; in with localDefs; let postAll = FullDepEntry (" diff --git a/pkgs/applications/window-managers/compiz/0.7.4.nix b/pkgs/applications/window-managers/compiz/0.7.4.nix index 8e95a9031557..6ae8f9dec0d5 100644 --- a/pkgs/applications/window-managers/compiz/0.7.4.nix +++ b/pkgs/applications/window-managers/compiz/0.7.4.nix @@ -1,5 +1,5 @@ args : with args; - let localDefs = builderDefs { + let localDefs = builderDefs.meta.function { src = /* put a fetchurl here */ fetchurl { url = http://releases.compiz-fusion.org/0.7.4/compiz/compiz-0.7.4.tar.bz2; @@ -22,7 +22,7 @@ args : with args; "--enable-annotate" "--enable-librsvg"] ++ (if args ? extraConfigureFlags then args.extraConfigureFlags else []); patches = [ ./glx-patch-0.6.2.patch ]; - } null; /* null is a terminator for sumArgs */ + }; in with localDefs; let postAll = FullDepEntry (" diff --git a/pkgs/applications/window-managers/fbpanel/4.12.nix b/pkgs/applications/window-managers/fbpanel/4.12.nix index 371e86585134..cf09e347a5dd 100644 --- a/pkgs/applications/window-managers/fbpanel/4.12.nix +++ b/pkgs/applications/window-managers/fbpanel/4.12.nix @@ -1,5 +1,5 @@ args : with args; - let localDefs = builderDefs { + let localDefs = builderDefs.meta.function { src = /* put a fetchurl here */ fetchurl { url = http://garr.dl.sourceforge.net/sourceforge/fbpanel/fbpanel-4.12.tgz; @@ -9,7 +9,7 @@ args : with args; buildInputs = [libX11 gtk pkgconfig libXmu libXpm libpng libjpeg libtiff librsvg]; configureFlags = []; - } null; /* null is a terminator for sumArgs */ + }; /* null is a terminator for sumArgs */ in with localDefs; stdenv.mkDerivation rec { name = "fbpanel"; diff --git a/pkgs/build-support/deb-package/default.nix b/pkgs/build-support/deb-package/default.nix index e884ae6d36b1..78bdeb07d187 100644 --- a/pkgs/build-support/deb-package/default.nix +++ b/pkgs/build-support/deb-package/default.nix @@ -1,10 +1,10 @@ args : with args; let - localDefs = with (builderDefs {src="";} null); + localDefs = with (builderDefs.meta.function {src="";}); let checkFlag = flag : lib.getAttr [flag] false args; in - builderDefs { + builderDefs.meta.function ({ inherit src; inherit checkFlag; buildInputs = []; @@ -40,7 +40,7 @@ args : with args; + (if args ? extraReplacements then args.extraReplacements else ""))["minInit" "doUnpack"]; - } args null; /* null is a terminator for sumArgs */ + } // args); in with localDefs; stdenv.mkDerivation rec { name = localDefs.name + "deb"; diff --git a/pkgs/data/fonts/clearlyU/1.9.nix b/pkgs/data/fonts/clearlyU/1.9.nix index 7dbae0e08408..e447dd3e0650 100644 --- a/pkgs/data/fonts/clearlyU/1.9.nix +++ b/pkgs/data/fonts/clearlyU/1.9.nix @@ -1,5 +1,5 @@ -args : with args; with builderDefs {src="";} null; - let localDefs = builderDefs (rec { +args : with args; with builderDefs; + let localDefs = builderDefs.meta.function (rec { src = /* put a fetchurl here */ fetchurl { url = http://crl.nmsu.edu/~mleisher/cu/cu12-1.9.tar.gz; @@ -15,7 +15,7 @@ args : with args; with builderDefs {src="";} null; mkfontdir mkfontscale '') ["minInit" "defEnsureDir" "addInputs"]; - }) null; /* null is a terminator for sumArgs */ + }); in with localDefs; stdenv.mkDerivation rec { name = "clearlyU-12-"+version; diff --git a/pkgs/data/fonts/fontWrap/default.nix b/pkgs/data/fonts/fontWrap/default.nix index 3e2dc1d2c349..875c65108ced 100644 --- a/pkgs/data/fonts/fontWrap/default.nix +++ b/pkgs/data/fonts/fontWrap/default.nix @@ -1,9 +1,9 @@ args : with args; - let localDefs = builderDefs { + let localDefs = builderDefs.meta.function { src =""; /* put a fetchurl here */ buildInputs = [mkfontdir mkfontscale ttmkfdir]; configureFlags = []; - } null; /* null is a terminator for sumArgs */ + }; in with localDefs; let doInstall = FullDepEntry (" diff --git a/pkgs/data/fonts/junicode/0.6.15.nix b/pkgs/data/fonts/junicode/0.6.15.nix index f199b0ca269f..f6fcc1917b32 100644 --- a/pkgs/data/fonts/junicode/0.6.15.nix +++ b/pkgs/data/fonts/junicode/0.6.15.nix @@ -1,5 +1,5 @@ -args : with args; with builderDefs {src="";} null; - let localDefs = builderDefs (rec { +args : with args; with builderDefs; + let localDefs = builderDefs.meta.function (rec { src = /* put a fetchurl here */ fetchurl { url = http://prdownloads.sourceforge.net/junicode/junicode-0.6.15.zip; @@ -13,7 +13,7 @@ args : with args; with builderDefs {src="";} null; ensureDir $out/share/fonts/junicode-ttf cp *.ttf $out/share/fonts/junicode-ttf '') ["minInit" "addInputs" "defEnsureDir"]; - }) null; /* null is a terminator for sumArgs */ + }); in with localDefs; stdenv.mkDerivation rec { name = "junicode-"+version; diff --git a/pkgs/data/fonts/wqy_zenhei/0.4.23-1.nix b/pkgs/data/fonts/wqy_zenhei/0.4.23-1.nix index c5aa6f40d403..15a7edd6535a 100644 --- a/pkgs/data/fonts/wqy_zenhei/0.4.23-1.nix +++ b/pkgs/data/fonts/wqy_zenhei/0.4.23-1.nix @@ -1,5 +1,5 @@ -args : with args; with builderDefs {src="";} null; - let localDefs = builderDefs (rec { +args : with args; with builderDefs; + let localDefs = builderDefs.meta.function (rec { src = /* put a fetchurl here */ fetchurl { url = http://prdownloads.sourceforge.net/wqy/wqy-zenhei-0.4.23-1.tar.gz; @@ -12,7 +12,7 @@ args : with args; with builderDefs {src="";} null; ensureDir $out/share/fonts cp *.ttf $out/share/fonts '') ["minInit" "addInputs" "doUnpack" "defEnsureDir"]; - }) null; /* null is a terminator for sumArgs */ + }); in with localDefs; stdenv.mkDerivation rec { name = "wqy-zenhei-"+version; diff --git a/pkgs/development/compilers/qi/9.1.nix b/pkgs/development/compilers/qi/9.1.nix index 4bfca07d20f0..73aaabf9227d 100644 --- a/pkgs/development/compilers/qi/9.1.nix +++ b/pkgs/development/compilers/qi/9.1.nix @@ -1,5 +1,5 @@ args : with args; - let localDefs = builderDefs { + let localDefs = builderDefs.meta.function { src = /* put a fetchurl here */ fetchurl { url = http://www.lambdassociates.org/Download/Qi9.1.zip; @@ -7,7 +7,7 @@ args : with args; }; buildInputs = [ unzip clisp]; configureFlags = []; - } null; /* null is a terminator for sumArgs */ + }; in with localDefs; let shell=stdenv.shell; diff --git a/pkgs/development/interpreters/pyrex/0.9.5.nix b/pkgs/development/interpreters/pyrex/0.9.5.nix index d494b5a15394..0b57d690e01f 100644 --- a/pkgs/development/interpreters/pyrex/0.9.5.nix +++ b/pkgs/development/interpreters/pyrex/0.9.5.nix @@ -2,7 +2,7 @@ args: with args; let - localDefs = builderDefs { + localDefs = builderDefs.meta.function { src = fetchurl { url = http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/oldtar/Pyrex-0.9.5.1.1.tar.gz; @@ -11,7 +11,7 @@ let buildInputs = [python]; - } null; /* null is a terminator for sumArgs */ + }; in with localDefs; diff --git a/pkgs/development/interpreters/pyrex/0.9.6.nix b/pkgs/development/interpreters/pyrex/0.9.6.nix index 02c1d532abb3..7125a2aff20e 100644 --- a/pkgs/development/interpreters/pyrex/0.9.6.nix +++ b/pkgs/development/interpreters/pyrex/0.9.6.nix @@ -2,7 +2,7 @@ args: with args; let - localDefs = builderDefs { + localDefs = builderDefs.meta.function { src = fetchurl { url = http://www.cosc.canterbury.ac.nz/greg.ewing/python/Pyrex/oldtar/Pyrex-0.9.6.4.tar.gz; @@ -11,7 +11,7 @@ let buildInputs = [python]; - } null; /* null is a terminator for sumArgs */ + }; in with localDefs; diff --git a/pkgs/development/libraries/cl-ppcre/default.nix b/pkgs/development/libraries/cl-ppcre/default.nix new file mode 100644 index 000000000000..172b654d4e07 --- /dev/null +++ b/pkgs/development/libraries/cl-ppcre/default.nix @@ -0,0 +1,26 @@ +args : +let + lib = args.lib; + fetchurl = args.fetchurl; + simplyShare = args.simplyShare; + + version = lib.getAttr ["version"] "2.0.0" args; + buildInputs = with args; [ ]; +in +rec { + src = fetchurl { + url = http://weitz.de/files/cl-ppcre.tar.gz; + sha256 = "14zxrmc4b4q9kg505y9lb0nqp80fpmpwn51xwkqiwkm361n6h23p"; + }; + + inherit buildInputs; + configureFlags = []; + + /* doConfigure should be specified separately */ + phaseNames = [(simplyShare "cl-ppcre")]; + + name = "cl-ppcre-" + version; + me |