[Nix-dev] [PATCH 2/3] removing deepOverride. The replacement pkgsFunDeepOverride doesn't suffer from - maybe overriding args which are named the same way by accident - because it forced adding , ...) to some packages which "weakens the precision of the function interface definitios"
Marc Weber
marco-oweber at gmx.de
Fri Jul 9 22:30:11 CEST 2010
---
pkgs/lib/customisation.nix | 10 +---------
pkgs/lib/misc.nix | 1 -
pkgs/top-level/all-packages.nix | 18 ++++++++++--------
3 files changed, 11 insertions(+), 18 deletions(-)
diff --git a/pkgs/lib/customisation.nix b/pkgs/lib/customisation.nix
index 41af26e..c6d74e7 100644
--- a/pkgs/lib/customisation.nix
+++ b/pkgs/lib/customisation.nix
@@ -34,7 +34,7 @@ rec {
overrideDerivation = drv: f:
let
# Filter out special attributes.
- drop = ["meta" "passthru" "outPath" "drvPath" "hostDrv" "buildDrv" "type" "override" "deepOverride" "origArgs"]
+ drop = ["meta" "passthru" "outPath" "drvPath" "hostDrv" "buildDrv" "type" "override" "origArgs"]
# also drop functions such as .merge .override etc
++ lib.filter (n: isFunction (getAttr n drv)) (attrNames drv);
attrs = removeAttrs drv drop;
@@ -52,15 +52,7 @@ rec {
makeOverridable = f: origArgs: f origArgs //
{ override = newArgs:
makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs));
- deepOverride = newArgs:
- makeOverridable f (lib.overrideExisting (lib.mapAttrs (deepOverrider newArgs) origArgs) newArgs);
origArgs = origArgs;
};
- 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 321b641..e036e8e 100644
--- a/pkgs/lib/misc.nix
+++ b/pkgs/lib/misc.nix
@@ -31,7 +31,6 @@ rec {
} ));
withStdOverrides = base // {
override = base.passthru.function;
- deepOverride = a : (base.passthru.function ((lib.mapAttrs (lib.deepOverrider a) base.passthru.args) // a));
} ;
in
withStdOverrides;
diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix
index 5a7c532..c14c69e 100644
--- a/pkgs/top-level/all-packages.nix
+++ b/pkgs/top-level/all-packages.nix
@@ -5464,19 +5464,21 @@ let
inherit fetchurl stdenv cmake unzip libtiff expat zlib libpng libjpeg;
};
- webkit = ((builderDefsPackage ../development/libraries/webkit {
- inherit (gnome28) gtkdoc libsoup;
- inherit (gtkLibs) gtk atk pango glib;
- inherit freetype fontconfig gettext gperf curl
+ webkit =
+ let p = pkgsFunDeepOverride {libsoup = gnome28.libsoup_2_31;};
+ in builderDefsPackage ../development/libraries/webkit {
+ inherit (p.gnome28) gtkdoc libsoup;
+ inherit (p.gtkLibs) gtk atk pango glib;
+ inherit (p) freetype fontconfig gettext gperf curl
libjpeg libtiff libpng libxml2 libxslt sqlite
icu cairo perl intltool automake libtool
pkgconfig autoconf bison libproxy enchant
python ruby;
- inherit (gst_all) gstreamer gstPluginsBase gstFfmpeg
+ inherit (p.gst_all) gstreamer gstPluginsBase gstFfmpeg
gstPluginsGood;
- flex = flex2535;
- inherit (xlibs) libXt;
- }).deepOverride {libsoup = gnome28.libsoup_2_31;});
+ flex = p.flex2535;
+ inherit (p.xlibs) libXt;
+ };
wvstreams = import ../development/libraries/wvstreams {
inherit stdenv fetchurl qt4 dbus zlib openssl readline perl;
--
1.7.1
More information about the nix-dev
mailing list