diff options
author | Eelco Dolstra <edolstra@gmail.com> | 2020-02-15 20:15:05 +0100 |
---|---|---|
committer | Eelco Dolstra <edolstra@gmail.com> | 2020-02-15 20:16:14 +0100 |
commit | f0f040c3f7f07fa4dc28b32d44e1db78fa3a0cc1 (patch) | |
tree | e59e7d99ac101eab753acd9257037a4c6cce5de8 /nixos/modules | |
parent | a5f883e5359ca97fb946dade25418d5732e3cdf7 (diff) |
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.
Diffstat (limited to 'nixos/modules')
-rw-r--r-- | nixos/modules/misc/version.nix | 6 |
1 files changed, 0 insertions, 6 deletions
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 |