forked from mirrors/nixpkgs
unstableGitUpdater: Fix support for fetchFromGit{Hub,Lab}
When `fetchFromGitHub` uses `fetchzip` instead of `fetchgit` internally, which is the most common use case, there is no `src.url` attribute so the update will fail. Let’s fix that by falling back to `src.meta.homepage`, which these fetchers set to the repository URL.
This commit is contained in:
parent
0b5085cdb7
commit
30ec84fba3
|
@ -21,7 +21,7 @@ let
|
|||
# By default we set url to src.url
|
||||
if [[ -z "$url" ]]; then
|
||||
url="$(${nix}/bin/nix-instantiate $systemArg --eval -E \
|
||||
"with import ./. {}; $UPDATE_NIX_ATTR_PATH.src.url" \
|
||||
"with import ./. {}; $UPDATE_NIX_ATTR_PATH.src.url or $UPDATE_NIX_ATTR_PATH.src.meta.homepage" \
|
||||
| tr -d '"')"
|
||||
fi
|
||||
|
||||
|
|
Loading…
Reference in a new issue