nixpkgs: support buildPlatform, hostPlatform, and overlays (#184)

This commit is contained in:
mjones-vsat 2025-01-10 06:47:22 -08:00 committed by GitHub
parent c9e35e9b7d
commit 489c060d2e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 30 additions and 3 deletions

View file

@ -20,13 +20,23 @@
in
{
nixpkgs = {
# TODO: switch to lib.systems.parsedPlatform
hostPlatform = lib.mkOption {
buildPlatform = lib.mkOption {
type = types.str;
example = "x86_64-linux";
default = config.nixpkgs.hostPlatform;
};
hostPlatform = lib.mkOption {
type = with types; either str attrs;
example = "x86_64-linux";
default = throw "the option nixpkgs.hostPlatform needs to be set.";
};
overlays = lib.mkOption {
type = with types; listOf anything;
default = [];
};
config = lib.mkOption {
type = types.attrs;
description = ''Configuration used to instantiate nixpkgs.'';