diff --git a/src/default.nix b/src/default.nix index e7e61e3..de173fe 100644 --- a/src/default.nix +++ b/src/default.nix @@ -1,11 +1,12 @@ { lib ? import , pkgsFun ? import +, hostPlatform ? null # if left `null` this will be set based on the ./platform/ }: let nixpkgsArgs = { config.allowNonSource = false; }; nixpkgsOnBuildForBuild = pkgsFun nixpkgsArgs; - ownerboot = { hostPlatform?null, overlays }: let + ownerboot = { overlays }: let base = final: prev: { inherit hostPlatform; nixpkgsOnBuildForHost = pkgsFun diff --git a/src/platform/am1i/default.nix b/src/platform/am1i/default.nix index 4414608..8e444b7 100644 --- a/src/platform/am1i/default.nix +++ b/src/platform/am1i/default.nix @@ -1,10 +1,7 @@ { lib ? import -, hostPlatform ? lib.systems.examples.gnu64 , common_amd64 }: { - inherit hostPlatform; - overlays = common_amd64.overlays ++ [(final: prev: { platform_name = "am1i"; diff --git a/src/platform/common/amd64.nix b/src/platform/common/amd64.nix index a6fac26..859685f 100644 --- a/src/platform/common/amd64.nix +++ b/src/platform/common/amd64.nix @@ -3,5 +3,9 @@ { overlays = [( final: prev: { + hostPlatform = + if prev.hostPlatform != null + then prev.hostPlatform + else lib.systems.examples.gnu64; })]; } diff --git a/src/platform/common/arm64.nix b/src/platform/common/arm64.nix index c512951..1653ea0 100644 --- a/src/platform/common/arm64.nix +++ b/src/platform/common/arm64.nix @@ -3,5 +3,9 @@ { overlays = [(final: prev: { + hostPlatform = + if prev.hostPlatform != null + then prev.hostPlatform + else lib.systems.examples.aarch64-multiplatform; })]; } diff --git a/src/platform/kevin/default.nix b/src/platform/kevin/default.nix index 76ad720..6729a03 100644 --- a/src/platform/kevin/default.nix +++ b/src/platform/kevin/default.nix @@ -1,5 +1,4 @@ { lib ? import -, hostPlatform ? lib.systems.examples.aarch64-multiplatform , common_arm64 }: let @@ -35,7 +34,6 @@ let "drivers/net/wireless/marvell/mwifiex/mwifiex.ko" ]; in { - inherit hostPlatform; overlays = common_arm64.overlays ++ [(final: prev: { nixpkgsOnBuildForHost = prev.nixpkgsOnBuildForBuild.pkgsCross.aarch64-multiplatform; diff --git a/src/platform/kgpe/default.nix b/src/platform/kgpe/default.nix index 1184c87..20a3094 100644 --- a/src/platform/kgpe/default.nix +++ b/src/platform/kgpe/default.nix @@ -1,11 +1,8 @@ { lib ? import -, hostPlatform ? lib.systems.examples.gnu64 , common_amd64 }: { - inherit hostPlatform; - overlays = common_amd64.overlays ++ [(final: prev: { platform_name = "kgpe";