forked from mirrors/nixpkgs
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 =
|
pkgs =
|
||||||
if pkgs_ != null
|
if pkgs_ != null
|
||||||
then pkgs_
|
then pkgs_
|
||||||
else import nixpkgs {
|
else import nixpkgs (
|
||||||
inherit system;
|
let
|
||||||
config =
|
nixpkgsOptions = (import ./eval-config.nix {
|
||||||
(import ./eval-config.nix {
|
|
||||||
inherit system nixpkgs services extraArgs modules;
|
inherit system nixpkgs services extraArgs modules;
|
||||||
# For efficiency, leave out most NixOS modules; they don't
|
# For efficiency, leave out most NixOS modules; they don't
|
||||||
# define nixpkgs.config, so it's pointless to evaluate them.
|
# define nixpkgs.config, so it's pointless to evaluate them.
|
||||||
baseModules = [ ../modules/misc/nixpkgs.nix ];
|
baseModules = [ ../modules/misc/nixpkgs.nix ];
|
||||||
pkgs = import nixpkgs { inherit system; config = {}; };
|
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
|
# Optionally check wether all config values have corresponding
|
||||||
# option declarations.
|
# 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 a new issue