mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-20 12:42:24 +00:00
Changed syntax of getVersion
svn path=/nixpkgs/trunk/; revision=10314
This commit is contained in:
parent
e0aeec3c36
commit
bc5974fb89
|
@ -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; }
|
||||
]
|
||||
|
|
|
@ -143,10 +143,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 a new issue