mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-24 16:03:23 +00:00
Making nixos handle the nixpkgs 'platform' parameter.
svn path=/nixos/trunk/; revision=20274
This commit is contained in:
parent
bc4e159d0e
commit
9002335101
@ -47,17 +47,20 @@ rec {
|
||||
pkgs =
|
||||
if pkgs_ != null
|
||||
then pkgs_
|
||||
else import nixpkgs {
|
||||
inherit system;
|
||||
config =
|
||||
(import ./eval-config.nix {
|
||||
else import nixpkgs (
|
||||
let
|
||||
nixpkgsOptions = (import ./eval-config.nix {
|
||||
inherit system nixpkgs services extraArgs modules;
|
||||
# For efficiency, leave out most NixOS modules; they don't
|
||||
# define nixpkgs.config, so it's pointless to evaluate them.
|
||||
baseModules = [ ../modules/misc/nixpkgs.nix ];
|
||||
pkgs = import nixpkgs { inherit system; config = {}; };
|
||||
}).optionDefinitions.nixpkgs.config;
|
||||
};
|
||||
}).optionDefinitions.nixpkgs;
|
||||
in
|
||||
{
|
||||
inherit system;
|
||||
inherit (nixpkgsOptions) config platform;
|
||||
});
|
||||
|
||||
# Optionally check wether all config values have corresponding
|
||||
# option declarations.
|
||||
|
@ -13,5 +13,12 @@
|
||||
'';
|
||||
};
|
||||
|
||||
nixpkgs.platform = pkgs.lib.mkOption {
|
||||
default = pkgs.platforms.pc;
|
||||
description = ''
|
||||
The platform for the Nix Packages collection.
|
||||
'';
|
||||
};
|
||||
|
||||
};
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user