diff --git a/pkgs/development/interpreters/perl-5.10/default.nix b/pkgs/development/interpreters/perl-5.10/default.nix index 31168291e3d..89e6335c703 100644 --- a/pkgs/development/interpreters/perl-5.10/default.nix +++ b/pkgs/development/interpreters/perl-5.10/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl + , ...}: let diff --git a/pkgs/development/interpreters/python/2.6/default.nix b/pkgs/development/interpreters/python/2.6/default.nix index 8865738b0d7..3b94d0f8477 100644 --- a/pkgs/development/interpreters/python/2.6/default.nix +++ b/pkgs/development/interpreters/python/2.6/default.nix @@ -11,6 +11,7 @@ , arch ? null , sw_vers ? null , ncurses ? null +, ... }: assert zlibSupport -> zlib != null; diff --git a/pkgs/development/libraries/avahi/default.nix b/pkgs/development/libraries/avahi/default.nix index f481c8d65e3..54bf2550035 100644 --- a/pkgs/development/libraries/avahi/default.nix +++ b/pkgs/development/libraries/avahi/default.nix @@ -17,7 +17,7 @@ stdenv.mkDerivation rec { pkgconfig libdaemon dbus perl perlXMLParser glib expat gettext intltool ] - ++ lib.optional qt4Support qt4; + ++ (lib.optional qt4Support qt4); configureFlags = [ "--disable-qt3" "--disable-gdbm" "--disable-gtk" "--disable-mono" diff --git a/pkgs/development/libraries/cairo/default.nix b/pkgs/development/libraries/cairo/default.nix index dc8bb2a9b52..a14b7fdc2da 100644 --- a/pkgs/development/libraries/cairo/default.nix +++ b/pkgs/development/libraries/cairo/default.nix @@ -4,6 +4,7 @@ , xcbSupport ? false , stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype , zlib, libpng, pixman, libxcb ? null, xcbutil ? null +, ... }: assert postscriptSupport -> zlib != null; diff --git a/pkgs/development/libraries/consolekit/default.nix b/pkgs/development/libraries/consolekit/default.nix index 5cebc5874bd..30823489057 100644 --- a/pkgs/development/libraries/consolekit/default.nix +++ b/pkgs/development/libraries/consolekit/default.nix @@ -1,5 +1,6 @@ { stdenv, fetchurl, pkgconfig, dbus_glib, zlib, pam, glib, - libX11, polkit, expat }: + libX11, polkit, expat + , ...}: stdenv.mkDerivation rec { name = "consolekit-0.4.1"; diff --git a/pkgs/development/libraries/enchant/default.nix b/pkgs/development/libraries/enchant/default.nix index 388d042d3ac..65aa7cd572e 100644 --- a/pkgs/development/libraries/enchant/default.nix +++ b/pkgs/development/libraries/enchant/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl, aspell, pkgconfig, glib }: +{ stdenv, fetchurl, aspell, pkgconfig, glib, + ...}: stdenv.mkDerivation rec { name = "enchant-1.3.0"; diff --git a/pkgs/development/libraries/freetype/default.nix b/pkgs/development/libraries/freetype/default.nix index d3814bdb972..d88fa1d0ae3 100644 --- a/pkgs/development/libraries/freetype/default.nix +++ b/pkgs/development/libraries/freetype/default.nix @@ -5,6 +5,7 @@ # option allows them to be enabled. See # http://www.freetype.org/patents.html. useEncumberedCode ? false + , ... }: stdenv.mkDerivation (rec { diff --git a/pkgs/development/libraries/libjpeg/default.nix b/pkgs/development/libraries/libjpeg/default.nix index bc3245cf76d..d47887fd96b 100644 --- a/pkgs/development/libraries/libjpeg/default.nix +++ b/pkgs/development/libraries/libjpeg/default.nix @@ -1,4 +1,5 @@ -{ stdenv, fetchurl }: +{ stdenv, fetchurl, + ...}: stdenv.mkDerivation { name = "libjpeg-8"; diff --git a/pkgs/development/libraries/libxml2/default.nix b/pkgs/development/libraries/libxml2/default.nix index f3c9c6ca652..3481e56b3ab 100644 --- a/pkgs/development/libraries/libxml2/default.nix +++ b/pkgs/development/libraries/libxml2/default.nix @@ -1,4 +1,5 @@ -{stdenv, fetchurl, zlib, python ? null, pythonSupport ? true}: +{stdenv, fetchurl, zlib, python ? null, pythonSupport ? true + , ...}: assert pythonSupport -> python != null; diff --git a/pkgs/development/libraries/openssl/default.nix b/pkgs/development/libraries/openssl/default.nix index 4e567cf6577..4bc93869f9d 100644 --- a/pkgs/development/libraries/openssl/default.nix +++ b/pkgs/development/libraries/openssl/default.nix @@ -1,4 +1,4 @@ -{ stdenv, fetchurl, perl }: +{ stdenv, fetchurl, perl, ...}: let opensslCrossSystem = stdenv.lib.attrByPath [ "openssl" "system" ] diff --git a/pkgs/development/libraries/zlib/default.nix b/pkgs/development/libraries/zlib/default.nix index 95c891e9bc7..94a425aaf1d 100644 --- a/pkgs/development/libraries/zlib/default.nix +++ b/pkgs/development/libraries/zlib/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl, static ? false}: +{stdenv, fetchurl, static ? false, ...}: stdenv.mkDerivation { name = "zlib-1.2.3"; diff --git a/pkgs/development/tools/misc/gnum4/default.nix b/pkgs/development/tools/misc/gnum4/default.nix index 0c73ba1f738..83111c916fc 100644 --- a/pkgs/development/tools/misc/gnum4/default.nix +++ b/pkgs/development/tools/misc/gnum4/default.nix @@ -1,4 +1,4 @@ -{stdenv, fetchurl}: +{stdenv, fetchurl, ...}: stdenv.mkDerivation { name = "gnum4-1.4.13"; diff --git a/pkgs/lib/customisation.nix b/pkgs/lib/customisation.nix index 334c8036627..177856e4d0e 100644 --- a/pkgs/lib/customisation.nix +++ b/pkgs/lib/customisation.nix @@ -53,12 +53,12 @@ rec { { override = newArgs: makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs)); deepOverride = newArgs: - makeOverridable f ((lib.mapAttrs (deepOverride newArgs) origArgs) // newArgs); + makeOverridable f ((lib.mapAttrs (deepOverrider newArgs) origArgs) // newArgs); origArgs = origArgs; }; - deepOverride = newArgs: name: x: if builtins.isAttrs x then ( + deepOverrider = newArgs: name: x: if builtins.isAttrs x then ( if x ? deepOverride then (x.deepOverride newArgs) else if x ? override then (x.override newArgs) else x) else x; diff --git a/pkgs/lib/misc.nix b/pkgs/lib/misc.nix index f3eb7e8bf8f..321b641372d 100644 --- a/pkgs/lib/misc.nix +++ b/pkgs/lib/misc.nix @@ -22,9 +22,20 @@ rec { sumTwoArgs = f: x: y: f (defaultMerge x y); foldArgs = merger: f: init: x: - let arg=(merger init (defaultMergeArg init x)); in + let arg=(merger init (defaultMergeArg init x)); # now add the function with composed args already applied to the final attrs - setAttrMerge "passthru" {} (f arg) ( x : x // { function = foldArgs merger f arg; } ); + base = (setAttrMerge "passthru" {} (f arg) + ( z : z // rec { + function = foldArgs merger f arg; + args = (lib.attrByPath ["passthru" "args"] {} z) // x; + } )); + withStdOverrides = base // { + override = base.passthru.function; + deepOverride = a : (base.passthru.function ((lib.mapAttrs (lib.deepOverrider a) base.passthru.args) // a)); + } ; + in + withStdOverrides; + # predecessors: proposed replacement for applyAndFun (which has a bug cause it merges twice) # the naming "overridableDelayableArgs" tries to express that you can @@ -117,22 +128,22 @@ rec { # Return true only if there is an attribute and it is true. checkFlag = attrSet: name: - if (name == "true") then true else - if (name == "false") then false else - if (elem name (attrByPath ["flags"] [] attrSet)) then true else - attrByPath [name] false attrSet ; + if (name == "true") then true else + if (name == "false") then false else + if (elem name (attrByPath ["flags"] [] attrSet)) then true else + attrByPath [name] false attrSet ; # Input : attrSet, [ [name default] ... ], name # Output : its value or default. getValue = attrSet: argList: name: ( attrByPath [name] (if checkFlag attrSet name then true else - if argList == [] then null else - let x = builtins.head argList; in - if (head x) == name then - (head (tail x)) - else (getValue attrSet - (tail argList) name)) attrSet ); + if argList == [] then null else + let x = builtins.head argList; in + if (head x) == name then + (head (tail x)) + else (getValue attrSet + (tail argList) name)) attrSet ); # Input : attrSet, [[name default] ...], [ [flagname reqs..] ... ] @@ -141,46 +152,46 @@ rec { ( fold lib.and true (map (x: let name = (head x) ; in - - ((checkFlag attrSet name) -> - (fold lib.and true - (map (y: let val=(getValue attrSet argList y); in - (val!=null) && (val!=false)) - (tail x))))) condList)) ; - + + ((checkFlag attrSet name) -> + (fold lib.and true + (map (y: let val=(getValue attrSet argList y); in + (val!=null) && (val!=false)) + (tail x))))) condList)) ; + # !!! This function has O(n^2) performance, so you probably don't want to use it! uniqList = {inputList, outputList ? []}: - if (inputList == []) then outputList else - let x=head inputList; - newOutputList = outputList ++ - (if elem x outputList then [] else [x]); - in uniqList {outputList=newOutputList; - inputList = (tail inputList);}; + if (inputList == []) then outputList else + let x=head inputList; + newOutputList = outputList ++ + (if elem x outputList then [] else [x]); + in uniqList {outputList=newOutputList; + inputList = (tail inputList);}; uniqListExt = {inputList, outputList ? [], getter ? (x : x), compare ? (x: y: x==y)}: - if (inputList == []) then outputList else - let x=head inputList; - isX = y: (compare (getter y) (getter x)); - newOutputList = outputList ++ - (if any isX outputList then [] else [x]); - in uniqListExt {outputList=newOutputList; - inputList = (tail inputList); - inherit getter compare; - }; + if (inputList == []) then outputList else + let x=head inputList; + isX = y: (compare (getter y) (getter x)); + newOutputList = outputList ++ + (if any isX outputList then [] else [x]); + in uniqListExt {outputList=newOutputList; + inputList = (tail inputList); + inherit getter compare; + }; condConcat = name: list: checker: - if list == [] then name else - if checker (head list) then - condConcat - (name + (head (tail list))) - (tail (tail list)) - checker - else condConcat - name (tail (tail list)) checker; + if list == [] then name else + if checker (head list) then + condConcat + (name + (head (tail list))) + (tail (tail list)) + checker + else condConcat + name (tail (tail list)) checker; lazyGenericClosure = {startSet, operator}: let @@ -201,7 +212,7 @@ rec { else lazyGenericClosure; innerModifySumArgs = f: x: a: b: if b == null then (f a b) // x else - innerModifySumArgs f x (a // b); + innerModifySumArgs f x (a // b); modifySumArgs = f: x: innerModifySumArgs f x {}; @@ -210,7 +221,7 @@ rec { (ready ++ [(head list)]) ((tail list) ++ (maybeAttrNullable "propagatedBuildInputs" [] (head list)) - ++ (maybeAttrNullable "propagatedBuildNativeInputs" [] (head list))); + ++ (maybeAttrNullable "propagatedBuildNativeInputs" [] (head list))); closePropagation = list: (uniqList {inputList = (innerClosePropagation [] list);}); diff --git a/pkgs/os-specific/linux/hal/default.nix b/pkgs/os-specific/linux/hal/default.nix index 521992dae17..e764a1afca2 100644 --- a/pkgs/os-specific/linux/hal/default.nix +++ b/pkgs/os-specific/linux/hal/default.nix @@ -3,6 +3,7 @@ , perlXMLParser, gettext, zlib, gperf, consolekit, policykit , libsmbios, dmidecode, udev, utillinuxng, pmutils, usbutils , eject +, ... }: assert stdenv ? glibc; diff --git a/pkgs/servers/pulseaudio/default.nix b/pkgs/servers/pulseaudio/default.nix index 5e0440d9c9f..e2e94875451 100644 --- a/pkgs/servers/pulseaudio/default.nix +++ b/pkgs/servers/pulseaudio/default.nix @@ -1,6 +1,7 @@ { stdenv, fetchurl, pkgconfig, gnum4, gdbm, libtool, glib, dbus, hal, avahi , gconf, liboil, gtk, libX11, libICE, libSM, libXtst, libXi, intltool, gettext -, libcap, alsaLib, libsamplerate, libsndfile, speex }: +, libcap, alsaLib, libsamplerate, libsndfile, speex +, ...}: stdenv.mkDerivation rec { name = "pulseaudio-0.9.21"; diff --git a/pkgs/tools/networking/curl/default.nix b/pkgs/tools/networking/curl/default.nix index 0cfd6adef86..be5d94534fe 100644 --- a/pkgs/tools/networking/curl/default.nix +++ b/pkgs/tools/networking/curl/default.nix @@ -1,4 +1,8 @@ -{stdenv, fetchurl, zlibSupport ? false, zlib ? null, sslSupport ? false, openssl ? null, linkStatic ? false}: +{stdenv, fetchurl + , zlibSupport ? false, zlib ? null + , sslSupport ? false, openssl ? null + , linkStatic ? false + , ...}: assert zlibSupport -> zlib != null; assert sslSupport -> openssl != null; diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 015f0173b10..66e0bb8ae2f 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -5443,7 +5443,7 @@ let inherit fetchurl stdenv cmake unzip libtiff expat zlib libpng libjpeg; }; - webkit = builderDefsPackage (import ../development/libraries/webkit) { + webkit = ((builderDefsPackage ../development/libraries/webkit { inherit (gnome28) gtkdoc libsoup; inherit (gtkLibs) gtk atk pango glib; inherit freetype fontconfig gettext gperf curl @@ -5455,7 +5455,7 @@ let gstPluginsGood; flex = flex2535; inherit (xlibs) libXt; - }; + }).deepOverride {libsoup = gnome28.libsoup_2_31;}); wvstreams = import ../development/libraries/wvstreams { inherit stdenv fetchurl qt4 dbus zlib openssl readline perl; @@ -8874,7 +8874,7 @@ let inherit pkgconfig webkit makeWrapper; inherit (gtkLibs) gtk glib; inherit (xlibs) libX11; - libsoup = gnome28.libsoup; + libsoup = gnome28.libsoup_2_31; }; valknut = import ../applications/networking/p2p/valknut {