* makeOverridable: call the override function "override" instead of
"function", which isn't very descriptive ;-)
Also, the argument to "override" can be either a function (that
takes the old arguments and returns the overriding arguments), or a
plain attribute set that contains the overriding arguments.
E.g. you can say
nixUnstable.override { supportOldDBs = false; }
and
nixUnstable.override (oldArgs: { name = oldArgs.name + "-my-version"; })
svn path=/nixpkgs/trunk/; revision=14468
This commit is contained in:
@@ -195,7 +195,8 @@ let
|
|||||||
import (dir + "/${pVersion}.nix") (args // { version = pVersion; });
|
import (dir + "/${pVersion}.nix") (args // { version = pVersion; });
|
||||||
|
|
||||||
makeOverridable = f: origArgs: f origArgs //
|
makeOverridable = f: origArgs: f origArgs //
|
||||||
{ function = newArgsFun: makeOverridable f (origArgs // (newArgsFun origArgs));
|
{ override = newArgs:
|
||||||
|
makeOverridable f (origArgs // (if builtins.isFunction newArgs then newArgs origArgs else newArgs));
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
@@ -9401,7 +9402,7 @@ let
|
|||||||
};
|
};
|
||||||
|
|
||||||
# The bleeding edge.
|
# The bleeding edge.
|
||||||
nixUnstable = import ../tools/package-management/nix/unstable.nix {
|
nixUnstable = makeOverridable (import ../tools/package-management/nix/unstable.nix) {
|
||||||
inherit fetchurl stdenv perl curl bzip2 openssl;
|
inherit fetchurl stdenv perl curl bzip2 openssl;
|
||||||
aterm = aterm242fixes;
|
aterm = aterm242fixes;
|
||||||
db4 = db45;
|
db4 = db45;
|
||||||
|
|||||||
Reference in New Issue
Block a user