Changed syntax of getVersion
svn path=/nixpkgs/branches/stdenv-updates/; revision=9733
This commit is contained in:
parent
07091eed11
commit
ebc6bb79cd
@ -1,8 +1,7 @@
|
||||
args:
|
||||
rec {
|
||||
recurseForDerivations = true;
|
||||
default = v_0_14_6;
|
||||
v_0_14_6 = (import ./0.14.6.nix) args;
|
||||
v_0_15 = (import ./0.15.nix) args;
|
||||
v_0_16_x = (import ./0.16.x.nix) args;
|
||||
}
|
||||
builtins.listToAttrs [
|
||||
{ name = "recurseForDerivations"; value = true; }
|
||||
{ name = "0.14.6"; value = (import ./0.14.6.nix) args; }
|
||||
{ name = "0.15"; value = (import ./0.15.nix) args; }
|
||||
{ name = "0.16.x"; value = (import ./0.16.x.nix) args; }
|
||||
]
|
||||
|
@ -142,10 +142,10 @@ rec {
|
||||
# pkgname = getVersion "name" pkgname_alts;
|
||||
#
|
||||
# user will be able to write in his configuration.nix something like
|
||||
# environment = { versions = { name = v_0_2; }; }; and pkgname will be equal
|
||||
# to pkgname_alts.v_0_2. Using alts.default by default.
|
||||
# name = { version = "0.2"; }; and pkgname will be equal
|
||||
# to getAttr pkgname_alts "0.2". Using alts.default by default.
|
||||
getVersion = name: alts: builtins.getAttr
|
||||
(getConfig [ "environment" "versions" name ] "default") alts;
|
||||
(getConfig [ name "version" ] "default") alts;
|
||||
|
||||
# The same, another syntax.
|
||||
# Warning: syntax for configuration.nix changed too
|
||||
|
Loading…
Reference in New Issue
Block a user