From f0f040c3f7f07fa4dc28b32d44e1db78fa3a0cc1 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Sat, 15 Feb 2020 20:15:05 +0100 Subject: nixos/modules/misc/version.nix: Don't parse .git This leads to inconsistent results between local builds and Hydra. Also Nix is not a general purpose language, we shouldn't be parsing .git from inside Nix code. --- nixos/modules/misc/version.nix | 6 ------ 1 file changed, 6 deletions(-) (limited to 'nixos/modules') diff --git a/nixos/modules/misc/version.nix b/nixos/modules/misc/version.nix index c394ff592f49..9557def622d8 100644 --- a/nixos/modules/misc/version.nix +++ b/nixos/modules/misc/version.nix @@ -4,10 +4,6 @@ with lib; let cfg = config.system.nixos; - - gitRepo = "${toString pkgs.path}/.git"; - gitRepoValid = lib.pathIsGitRepo gitRepo; - gitCommitId = lib.substring 0 7 (commitIdFromGitRepo gitRepo); in { @@ -98,8 +94,6 @@ in # These defaults are set here rather than up there so that # changing them would not rebuild the manual version = mkDefault (cfg.release + cfg.versionSuffix); - revision = mkIf gitRepoValid (mkDefault gitCommitId); - versionSuffix = mkIf gitRepoValid (mkDefault (".git." + gitCommitId)); }; # Generate /etc/os-release. See -- cgit 1.4.1