From f1490acef3927ab1d8f04cd7055b64c0eac4c215 Mon Sep 17 00:00:00 2001 From: Adam Joseph Date: Fri, 5 May 2023 01:53:10 -0700 Subject: [PATCH] src/coreboot/default.nix: avoid reimporting nixpkgs This commit changes a few path-references into `` so they use attrset references instead. This way it is not necessary to have nixpkgs accessible via $NIX_PATH when you build ownerboot. --- src/coreboot/default.nix | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/coreboot/default.nix b/src/coreboot/default.nix index 469f7b8..b202038 100644 --- a/src/coreboot/default.nix +++ b/src/coreboot/default.nix @@ -19,6 +19,8 @@ let version = "4.9"; inherit (nixpkgsOnBuildForBuild) stdenv lib git python3 ncurses fetchgit; + buildLinuxConfigFile = (nixpkgsOnBuildForHost.buildLinux { inherit src version; }).passthru.configfile; + generate-config-pl = buildLinuxConfigFile.generateConfig; src = fetchgit { url = "https://review.coreboot.org/coreboot"; branchName = "${version}"; @@ -129,7 +131,7 @@ stdenv.mkDerivation { passAsFile = [ "structuredConfig" ]; structuredConfig = (lib.evalModules { modules = [ - (import ) + buildLinuxConfigFile.passthru.module { settings = with lib.kernel; config // { "DEFAULT_CONSOLE_LOGLEVEL_${toString console_loglevel}" = lib.mkForce yes; @@ -162,7 +164,7 @@ stdenv.mkDerivation { SRC=. \ BUILD_ROOT=$(pwd) \ KERNEL_CONFIG=$structuredConfigPath \ - perl -w ${} + perl -w ${generate-config-pl} runHook postConfigure '';