From 84d4358635031c4e86a30f71b5ccd37462a94821 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Wed, 16 Oct 2013 23:05:42 +0200 Subject: [PATCH] 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. --- nixos/modules/misc/version.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix index e9ee476d36a..1b519d3e6ee 100644 --- a/nixos/modules/misc/version.nix +++ b/nixos/modules/misc/version.nix @@ -26,10 +26,10 @@ with pkgs.lib; config = { system.nixosVersion = - mkDefault (builtins.readFile "${pkgs.path}/.version" + config.system.nixosVersionSuffix); + mkDefault (builtins.readFile "${toString pkgs.path}/.version" + config.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"); # Note: code names must only increase in alphabetical order.