diff options
author | Lluís Batlle i Rossell <viric@viric.name> | 2012-12-28 23:28:16 +0100 |
---|---|---|
committer | Lluís Batlle i Rossell <viric@viric.name> | 2012-12-28 23:28:16 +0100 |
commit | b58780c43de1f6463d753c4dbf2506641cf1c678 (patch) | |
tree | 858337275f05e2bd2fdfcac5f6574e200b00fb44 /pkgs/os-specific/linux/kernel/manual-config.nix | |
parent | 88b11196c130b6bda5fd2e57729e876527c63377 (diff) | |
parent | fde74242bf41d199ad68db90c5ce4d35f6c2c51b (diff) |
Merge remote-tracking branch 'eelco/master' into stdenv-updates
Conflicts: pkgs/development/compilers/gcc/4.7/default.nix Trivial solution.
Diffstat (limited to 'pkgs/os-specific/linux/kernel/manual-config.nix')
-rw-r--r-- | pkgs/os-specific/linux/kernel/manual-config.nix | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 70d5c809dba8c..5d84dee0a28d8 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -8,16 +8,13 @@ let readConfig = configFile: let configAttrs = import "${runCommand "config.nix" {} '' - (. ${configFile} - echo "{" - for var in `set`; do - if [[ "$var" =~ ^CONFIG_ ]]; then - IFS="=" - set -- $var - echo "\"$1\" = \"''${*:2}\";" - fi - done - echo "}") > $out + echo "{" > "$out" + while IFS='=' read key val; do + [ "x''${key#CONFIG_}" != "x$key" ] || continue + no_firstquote="''${val#\"}"; + echo ' "'"$key"'" = "'"''${no_firstquote%\"}"'";' >> "$out" + done < "${configFile}" + echo "}" >> $out ''}"; config = configAttrs // rec { |