3
0
Fork 0
forked from mirrors/nixpkgs

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 let

View file

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

View file

@ -17,7 +17,7 @@ stdenv.mkDerivation rec {
pkgconfig libdaemon dbus perl perlXMLParser glib expat pkgconfig libdaemon dbus perl perlXMLParser glib expat
gettext intltool gettext intltool
] ]
++ lib.optional qt4Support qt4; ++ (lib.optional qt4Support qt4);
configureFlags = configureFlags =
[ "--disable-qt3" "--disable-gdbm" "--disable-gtk" "--disable-mono" [ "--disable-qt3" "--disable-gdbm" "--disable-gtk" "--disable-mono"

View file

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

View file

@ -1,5 +1,6 @@
{ stdenv, fetchurl, pkgconfig, dbus_glib, zlib, pam, glib, { stdenv, fetchurl, pkgconfig, dbus_glib, zlib, pam, glib,
libX11, polkit, expat }: libX11, polkit, expat
, ...}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "consolekit-0.4.1"; name = "consolekit-0.4.1";

View file

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

View file

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

View file

@ -1,4 +1,5 @@
{ stdenv, fetchurl }: { stdenv, fetchurl,
...}:
stdenv.mkDerivation { stdenv.mkDerivation {
name = "libjpeg-8"; 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; assert pythonSupport -> python != null;

View file

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

View file

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

View file

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

View file

@ -53,12 +53,12 @@ rec {
{ override = newArgs: { override = newArgs:
makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs)); makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs));
deepOverride = newArgs: deepOverride = newArgs:
makeOverridable f ((lib.mapAttrs (deepOverride newArgs) origArgs) // newArgs); makeOverridable f ((lib.mapAttrs (deepOverrider newArgs) origArgs) // newArgs);
origArgs = origArgs; 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 ? deepOverride then (x.deepOverride newArgs) else
if x ? override then (x.override newArgs) else if x ? override then (x.override newArgs) else
x) else x; x) else x;

View file

@ -22,9 +22,20 @@ rec {
sumTwoArgs = f: x: y: sumTwoArgs = f: x: y:
f (defaultMerge x y); f (defaultMerge x y);
foldArgs = merger: f: init: x: 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 # 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) # predecessors: proposed replacement for applyAndFun (which has a bug cause it merges twice)
# the naming "overridableDelayableArgs" tries to express that you can # the naming "overridableDelayableArgs" tries to express that you can

View file

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

View file

@ -1,6 +1,7 @@
{ stdenv, fetchurl, pkgconfig, gnum4, gdbm, libtool, glib, dbus, hal, avahi { stdenv, fetchurl, pkgconfig, gnum4, gdbm, libtool, glib, dbus, hal, avahi
, gconf, liboil, gtk, libX11, libICE, libSM, libXtst, libXi, intltool, gettext , gconf, liboil, gtk, libX11, libICE, libSM, libXtst, libXi, intltool, gettext
, libcap, alsaLib, libsamplerate, libsndfile, speex }: , libcap, alsaLib, libsamplerate, libsndfile, speex
, ...}:
stdenv.mkDerivation rec { stdenv.mkDerivation rec {
name = "pulseaudio-0.9.21"; 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 zlibSupport -> zlib != null;
assert sslSupport -> openssl != null; assert sslSupport -> openssl != null;

View file

@ -5443,7 +5443,7 @@ let
inherit fetchurl stdenv cmake unzip libtiff expat zlib libpng libjpeg; 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 (gnome28) gtkdoc libsoup;
inherit (gtkLibs) gtk atk pango glib; inherit (gtkLibs) gtk atk pango glib;
inherit freetype fontconfig gettext gperf curl inherit freetype fontconfig gettext gperf curl
@ -5455,7 +5455,7 @@ let
gstPluginsGood; gstPluginsGood;
flex = flex2535; flex = flex2535;
inherit (xlibs) libXt; inherit (xlibs) libXt;
}; }).deepOverride {libsoup = gnome28.libsoup_2_31;});
wvstreams = import ../development/libraries/wvstreams { wvstreams = import ../development/libraries/wvstreams {
inherit stdenv fetchurl qt4 dbus zlib openssl readline perl; inherit stdenv fetchurl qt4 dbus zlib openssl readline perl;
@ -8874,7 +8874,7 @@ let
inherit pkgconfig webkit makeWrapper; inherit pkgconfig webkit makeWrapper;
inherit (gtkLibs) gtk glib; inherit (gtkLibs) gtk glib;
inherit (xlibs) libX11; inherit (xlibs) libX11;
libsoup = gnome28.libsoup; libsoup = gnome28.libsoup_2_31;
}; };
valknut = import ../applications/networking/p2p/valknut { valknut = import ../applications/networking/p2p/valknut {