diff options
| author | Sebastian Wild <sebastian@wild-siena.com> | 2020-01-14 21:51:15 +0100 |
|---|---|---|
| committer | Sebastian Wild <sebastian@wild-siena.com> | 2020-01-15 09:17:33 +0100 |
| commit | 78f931cb53554ecfd23fccdb250eba4e82d466a1 (patch) | |
| tree | a6b719b098f9070a760dc2b03e7d78b5c5dc778a /modules/system/version.nix | |
| parent | 3ec36dd6673198a8a6fcd433866654e4155c7eb6 (diff) | |
Remove trailing slash from path
A change of `commitIdFromGitRepo` in nixpkgs/lib/sources.nix
resulted in the error message
"attribute '.git' missing at nixpkgs/lib/sources.nix:7:32" when
executing darwin-rebuils switch.
The commit with the change is
https://github.com/NixOS/nixpkgs/commit/c9214c394b248e1f26e45dbe1be2bd82363af3a6
Removing the trailing slash resolves the error.
Diffstat (limited to 'modules/system/version.nix')
| -rw-r--r-- | modules/system/version.nix | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modules/system/version.nix b/modules/system/version.nix index c967084..46291d6 100644 --- a/modules/system/version.nix +++ b/modules/system/version.nix @@ -8,8 +8,8 @@ let defaultStateVersion = options.system.stateVersion.default; parseGit = path: - if pathExists "${path}/.git/" then rec { - rev = commitIdFromGitRepo "${path}/.git/"; + if pathExists "${path}/.git" then rec { + rev = commitIdFromGitRepo "${path}/.git"; shortRev = substring 0 7 rev; } else if pathExists "${path}/.git-revision" then rec { |
