forked from DGNum/liminix
extract writeKconfig to its own file
This commit is contained in:
parent
15be80e9de
commit
591bd78509
2 changed files with 15 additions and 9 deletions
|
@ -8,13 +8,8 @@
|
|||
, src
|
||||
, extraPatchPhase ? "echo"
|
||||
} :
|
||||
let writeConfig = name : config: writeText name
|
||||
(builtins.concatStringsSep
|
||||
"\n"
|
||||
(lib.mapAttrsToList
|
||||
(name: value: (if value == "n" then "# CONFIG_${name} is not set" else "CONFIG_${name}=${value}"))
|
||||
config
|
||||
));
|
||||
let
|
||||
writeConfig = import ./write-kconfig.nix { inherit lib writeText; };
|
||||
kconfigFile = writeConfig "kconfig" config;
|
||||
inherit lib; in
|
||||
stdenv.mkDerivation rec {
|
||||
|
|
11
pkgs/kernel/write-kconfig.nix
Normal file
11
pkgs/kernel/write-kconfig.nix
Normal file
|
@ -0,0 +1,11 @@
|
|||
{
|
||||
lib
|
||||
, writeText
|
||||
}:
|
||||
name : config: writeText name
|
||||
(builtins.concatStringsSep
|
||||
"\n"
|
||||
(lib.mapAttrsToList
|
||||
(name: value: (if value == "n" then "# CONFIG_${name} is not set" else "CONFIG_${name}=${value}"))
|
||||
config
|
||||
))
|
Loading…
Reference in a new issue