Changing the way 'platform' gets into all-packages, allowing setting it in nixpkgs config.
svn path=/nixpkgs/branches/stdenv-updates/; revision=23635
This commit is contained in:
parent
23b5b032de
commit
0a1dcea515
@ -32,11 +32,11 @@
|
||||
config ? null
|
||||
|
||||
, crossSystem ? null
|
||||
, platform ? (import ./platforms.nix).pc
|
||||
, platform ? null
|
||||
}:
|
||||
|
||||
|
||||
let config_ = config; in # rename the function argument
|
||||
let config_ = config; platform_ = platform; in # rename the function arguments
|
||||
|
||||
let
|
||||
|
||||
@ -70,6 +70,10 @@ let
|
||||
then configExpr { inherit pkgs pkgsOrig; }
|
||||
else configExpr;
|
||||
|
||||
# Allow setting the platform in the config file. Otherwise, let's use a reasonable default (pc)
|
||||
platform = if platform_ != null then platform_
|
||||
else getConfig [ "platform" ] (import ./platforms.nix).pc;
|
||||
|
||||
# Return an attribute from the Nixpkgs configuration file, or
|
||||
# a default value if the attribute doesn't exist.
|
||||
getConfig = attrPath: default: lib.attrByPath attrPath default config;
|
||||
|
Loading…
Reference in New Issue
Block a user