forked from mirrors/nixpkgs
* 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:
parent
b3c8857f60
commit
b763e1d520
|
@ -195,7 +195,8 @@ let
|
|||
import (dir + "/${pVersion}.nix") (args // { version = pVersion; });
|
||||
|
||||
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.
|
||||
nixUnstable = import ../tools/package-management/nix/unstable.nix {
|
||||
nixUnstable = makeOverridable (import ../tools/package-management/nix/unstable.nix) {
|
||||
inherit fetchurl stdenv perl curl bzip2 openssl;
|
||||
aterm = aterm242fixes;
|
||||
db4 = db45;
|
||||
|
|
Loading…
Reference in a new issue