Browse Source

Making nixos handle the nixpkgs 'platform' parameter.

svn path=/nixos/trunk/; revision=20274
nsd-state-dir
Lluís Batlle i Rossell 13 years ago
parent
commit
9002335101
  1. 15
      lib/eval-config.nix
  2. 9
      modules/misc/nixpkgs.nix

15
lib/eval-config.nix

@ -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.

9
modules/misc/nixpkgs.nix

@ -13,5 +13,12 @@
'';
};
nixpkgs.platform = pkgs.lib.mkOption {
default = pkgs.platforms.pc;
description = ''
The platform for the Nix Packages collection.
'';
};
};
}
}
Loading…
Cancel
Save