Unverified Commit 3bb82135 authored by K900's avatar K900 Committed by GitHub
Browse files

linuxManualConfig: Handle only y and m in readConfig, plus one minor fix (#444250)

parents 08eb6d24 abf2b9d1
Loading
Loading
Loading
Loading
+12 −18
Original line number Diff line number Diff line
@@ -32,24 +32,18 @@ let

  readConfig =
    configfile:
    lib.listToAttrs (
      map
        (
    let
      matchLine =
        line:
        let
            match = lib.match "(.*)=\"?(.*)\"?" line;
          match = lib.match "(CONFIG_[^=]+)=([ym])" line;
        in
          {
        lib.optional (match != null) {
          name = lib.elemAt match 0;
          value = lib.elemAt match 1;
          }
        )
        (
          lib.filter (line: !(lib.hasPrefix "#" line || line == "")) (
            lib.splitString "\n" (builtins.readFile configfile)
          )
        )
    );
        };
    in
    lib.listToAttrs (lib.concatMap matchLine (lib.splitString "\n" (builtins.readFile configfile)));
in
lib.makeOverridable (
  {
+1 −1
Original line number Diff line number Diff line
@@ -819,7 +819,7 @@ in
      src,
      modDirVersion ? lib.versions.pad 3 version,
      configfile,
      allowImportFromDerivation ? true,
      allowImportFromDerivation ? false,
    }:
    recurseIntoAttrs (
      packagesFor (manualConfig {