src/coreboot/default.nix: avoid reimporting nixpkgs

This commit changes a few path-references into `<nixpkgs/..>` so
they use attrset references instead.  This way it is not necessary
to have nixpkgs accessible via $NIX_PATH when you build ownerboot.
master
Adam Joseph 2 years ago
parent 1e33255408
commit f1490acef3

@ -19,6 +19,8 @@
let let
version = "4.9"; version = "4.9";
inherit (nixpkgsOnBuildForBuild) stdenv lib git python3 ncurses fetchgit; inherit (nixpkgsOnBuildForBuild) stdenv lib git python3 ncurses fetchgit;
buildLinuxConfigFile = (nixpkgsOnBuildForHost.buildLinux { inherit src version; }).passthru.configfile;
generate-config-pl = buildLinuxConfigFile.generateConfig;
src = fetchgit { src = fetchgit {
url = "https://review.coreboot.org/coreboot"; url = "https://review.coreboot.org/coreboot";
branchName = "${version}"; branchName = "${version}";
@ -129,7 +131,7 @@ stdenv.mkDerivation {
passAsFile = [ "structuredConfig" ]; passAsFile = [ "structuredConfig" ];
structuredConfig = (lib.evalModules { structuredConfig = (lib.evalModules {
modules = [ modules = [
(import <nixpkgs/nixos/modules/system/boot/kernel_config.nix>) buildLinuxConfigFile.passthru.module
{ {
settings = with lib.kernel; config // { settings = with lib.kernel; config // {
"DEFAULT_CONSOLE_LOGLEVEL_${toString console_loglevel}" = lib.mkForce yes; "DEFAULT_CONSOLE_LOGLEVEL_${toString console_loglevel}" = lib.mkForce yes;
@ -162,7 +164,7 @@ stdenv.mkDerivation {
SRC=. \ SRC=. \
BUILD_ROOT=$(pwd) \ BUILD_ROOT=$(pwd) \
KERNEL_CONFIG=$structuredConfigPath \ KERNEL_CONFIG=$structuredConfigPath \
perl -w ${<nixpkgs/pkgs/os-specific/linux/kernel/generate-config.pl>} perl -w ${generate-config-pl}
runHook postConfigure runHook postConfigure
''; '';

Loading…
Cancel
Save