Make WebKit use libsoup 2.31.2 via deepOverride. Edit a few packages that were overridable but did not allow extra arguments. Remove a catch with deepOverride that pkgs.lib had this attribute in a different sense.

svn path=/nixpkgs/trunk/; revision=22529
This commit is contained in:
Michael Raskin 2010-07-08 13:25:52 +00:00
parent 3c824666fd
commit ccc497f80d
18 changed files with 85 additions and 60 deletions

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl
, ...}:
let

View File

@ -11,6 +11,7 @@
, arch ? null
, sw_vers ? null
, ncurses ? null
, ...
}:
assert zlibSupport -> zlib != null;

View File

@ -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"

View File

@ -4,6 +4,7 @@
, xcbSupport ? false
, stdenv, fetchurl, pkgconfig, x11, fontconfig, freetype
, zlib, libpng, pixman, libxcb ? null, xcbutil ? null
, ...
}:
assert postscriptSupport -> zlib != null;

View File

@ -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";

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl, aspell, pkgconfig, glib }:
{ stdenv, fetchurl, aspell, pkgconfig, glib,
...}:
stdenv.mkDerivation rec {
name = "enchant-1.3.0";

View File

@ -5,6 +5,7 @@
# option allows them to be enabled. See
# http://www.freetype.org/patents.html.
useEncumberedCode ? false
, ...
}:
stdenv.mkDerivation (rec {

View File

@ -1,4 +1,5 @@
{ stdenv, fetchurl }:
{ stdenv, fetchurl,
...}:
stdenv.mkDerivation {
name = "libjpeg-8";

View File

@ -1,4 +1,5 @@
{stdenv, fetchurl, zlib, python ? null, pythonSupport ? true}:
{stdenv, fetchurl, zlib, python ? null, pythonSupport ? true
, ...}:
assert pythonSupport -> python != null;

View File

@ -1,4 +1,4 @@
{ stdenv, fetchurl, perl }:
{ stdenv, fetchurl, perl, ...}:
let
opensslCrossSystem = stdenv.lib.attrByPath [ "openssl" "system" ]

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl, static ? false}:
{stdenv, fetchurl, static ? false, ...}:
stdenv.mkDerivation {
name = "zlib-1.2.3";

View File

@ -1,4 +1,4 @@
{stdenv, fetchurl}:
{stdenv, fetchurl, ...}:
stdenv.mkDerivation {
name = "gnum4-1.4.13";

View File

@ -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;

View File

@ -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);});

View File

@ -3,6 +3,7 @@
, perlXMLParser, gettext, zlib, gperf, consolekit, policykit
, libsmbios, dmidecode, udev, utillinuxng, pmutils, usbutils
, eject
, ...
}:
assert stdenv ? glibc;

View File

@ -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";

View File

@ -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;

View File

@ -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 {