diff options
Diffstat (limited to 'pkgs/coreboot/default.nix')
-rw-r--r-- | pkgs/coreboot/default.nix | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/pkgs/coreboot/default.nix b/pkgs/coreboot/default.nix index 044e3667d650..3a24dd92fb54 100644 --- a/pkgs/coreboot/default.nix +++ b/pkgs/coreboot/default.nix @@ -44,9 +44,12 @@ let ''; }; - filteredConfig = lib.filterAttrs (n: v: v != null) corebootConfig; - lines = lib.mapAttrsToList (name: value: "${name}=${value}") filteredConfig; - configFile = writeText "config" (lib.concatStringsSep "\n" lines); + writeConfig = config: let + filteredConfig = lib.filterAttrs (n: v: v != null) config; + lines = lib.mapAttrsToList (name: value: "${name}=${value}") filteredConfig; + configFile = writeText "config" (lib.concatStringsSep "\n" lines); + in configFile; + in stdenv.mkDerivation rec { pname = "coreboot"; @@ -61,7 +64,7 @@ in stdenv.mkDerivation rec { configurePhase = '' runHook preConfigure - cp ${configFile} .config + cp ${writeConfig corebootConfig} .config make olddefconfig runHook postConfigure ''; @@ -72,6 +75,6 @@ in stdenv.mkDerivation rec { ''; passthru = { - inherit toolchain configFile; + inherit toolchain writeConfig corebootConfig; }; } |