Fix compatibility with Nix < 1.6

Nix 1.6 (accidentally) changed the semantics of strings like
"${path}/bla", so this happened to work on 1.6 but not before.
This commit is contained in:
Eelco Dolstra 2013-10-16 23:05:42 +02:00
parent 418fa3bb33
commit 84d4358635

View File

@ -26,10 +26,10 @@ with pkgs.lib;
config = { config = {
system.nixosVersion = system.nixosVersion =
mkDefault (builtins.readFile "${pkgs.path}/.version" + config.system.nixosVersionSuffix); mkDefault (builtins.readFile "${toString pkgs.path}/.version" + config.system.nixosVersionSuffix);
system.nixosVersionSuffix = system.nixosVersionSuffix =
let suffixFile = "${pkgs.path}/.version-suffix"; in let suffixFile = "${toString pkgs.path}/.version-suffix"; in
mkDefault (if builtins.pathExists suffixFile then builtins.readFile suffixFile else "pre-git"); mkDefault (if builtins.pathExists suffixFile then builtins.readFile suffixFile else "pre-git");
# Note: code names must only increase in alphabetical order. # Note: code names must only increase in alphabetical order.