1
0
Fork 0
mirror of https://github.com/LnL7/nix-darwin.git synced 2025-03-28 18:57:08 +00:00

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
c9214c394b

Removing the trailing slash resolves the error.
This commit is contained in:
Sebastian Wild 2020-01-14 21:51:15 +01:00
parent 3ec36dd667
commit 78f931cb53
No known key found for this signature in database
GPG key ID: 366A2940479A06FC

View file

@ -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 {