Author: viric
Date: Fri Sep 3 21:34:49 2010
New Revision: 23635
URL: https://svn.nixos.org/websvn/nix/?rev=23635&sc=1
Log:
Changing the way 'platform' gets into all-packages, allowing setting it in
nixpkgs config.
Modified:
nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix
Modified: nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix
==============================================================================
--- nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix Fri Sep
3 20:52:32 2010 (r23634)
+++ nixpkgs/branches/stdenv-updates/pkgs/top-level/all-packages.nix Fri Sep
3 21:34:49 2010 (r23635)
@@ -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 @@
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;
_______________________________________________
nix-commits mailing list
[email protected]
http://mail.cs.uu.nl/mailman/listinfo/nix-commits