From 0bdf6e9355e92454c80177cca46b87d1b28efbca Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Wed, 29 Mar 2023 13:48:23 -0700 Subject: [PATCH] src/plat/*: pass `lib` as a parameter instead of reimporting it --- src/default.nix | 6 +++--- src/platform/am1i/default.nix | 4 +++- src/platform/kevin/default.nix | 4 +++- src/platform/kgpe/default.nix | 4 +++- 4 files changed, 12 insertions(+), 6 deletions(-) diff --git a/src/default.nix b/src/default.nix index 1fde9d3..4a3fe94 100644 --- a/src/default.nix +++ b/src/default.nix @@ -26,9 +26,9 @@ let .overrideScope' overlay; in { # one entry for each supported platform - kevin = ownerboot (import ./platform/kevin); - am1i = ownerboot (import ./platform/am1i); - kgpe = ownerboot (import ./platform/kgpe); + kevin = ownerboot (import ./platform/kevin { inherit lib; }); + am1i = ownerboot (import ./platform/am1i { inherit lib; }); + kgpe = ownerboot (import ./platform/kgpe { inherit lib; }); em100 = nixpkgsOnBuildForBuild.callPackage ./util/em100 { }; flashrom = nixpkgsOnBuildForBuild.callPackage ./flashrom { }; diff --git a/src/platform/am1i/default.nix b/src/platform/am1i/default.nix index d6d7b31..9c02e9a 100644 --- a/src/platform/am1i/default.nix +++ b/src/platform/am1i/default.nix @@ -1,5 +1,7 @@ +{ lib ? import +}: { - hostPlatform = (import ).systems.examples.gnu64; + hostPlatform = lib.systems.examples.gnu64; overlay = (final: prev: { diff --git a/src/platform/kevin/default.nix b/src/platform/kevin/default.nix index 3450fdb..2ca4dc5 100644 --- a/src/platform/kevin/default.nix +++ b/src/platform/kevin/default.nix @@ -1,3 +1,5 @@ +{ lib ? import +}: let # order matters! this is also the order in which the modules are insmoded modules_insmod = [ @@ -31,7 +33,7 @@ let "drivers/net/wireless/marvell/mwifiex/mwifiex.ko" ]; in { - hostPlatform = (import ).systems.examples.aarch64-multiplatform; + hostPlatform = lib.systems.examples.aarch64-multiplatform; overlay = (final: prev: { nixpkgsOnBuildForHost = prev.nixpkgsOnBuildForBuild.pkgsCross.aarch64-multiplatform; diff --git a/src/platform/kgpe/default.nix b/src/platform/kgpe/default.nix index e7768cc..699f637 100644 --- a/src/platform/kgpe/default.nix +++ b/src/platform/kgpe/default.nix @@ -1,8 +1,10 @@ +{ lib ? import +}: let update_microcode = true; in { - hostPlatform = (import ).systems.examples.gnu64; + hostPlatform = lib.systems.examples.gnu64; overlay = (final: prev: {