Set the nixpkgs platform as a module option.
This commit is contained in:
parent
36b67321c0
commit
6f74507684
4 changed files with 15 additions and 11 deletions
|
|
@ -8,8 +8,7 @@ let
|
|||
in
|
||||
{
|
||||
makeSystemConfig =
|
||||
{ system
|
||||
, modules
|
||||
{ modules
|
||||
, extraSpecialArgs ? { }
|
||||
,
|
||||
}:
|
||||
|
|
@ -34,6 +33,8 @@ in
|
|||
] ++ modules;
|
||||
}).config;
|
||||
|
||||
system = config.nixpkgs.hostPlatform;
|
||||
|
||||
returnIfNoAssertions = drv:
|
||||
let
|
||||
failedAssertions = map (x: x.message) (lib.filter (x: !x.assertion) config.assertions);
|
||||
|
|
|
|||
|
|
@ -9,6 +9,15 @@
|
|||
];
|
||||
|
||||
options = {
|
||||
|
||||
nixpkgs = {
|
||||
# TODO: switch to lib.systems.parsedPlatform
|
||||
hostPlatform = lib.mkOption {
|
||||
type = lib.types.str;
|
||||
example = "x86_64-linux";
|
||||
};
|
||||
};
|
||||
|
||||
assertions = lib.mkOption {
|
||||
type = lib.types.listOf lib.types.unspecified;
|
||||
internal = true;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue