mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-20 04:19:00 +02:00
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
|
# By default we set url to src.url
|
||||||
if [[ -z "$url" ]]; then
|
if [[ -z "$url" ]]; then
|
||||||
url="$(${nix}/bin/nix-instantiate $systemArg --eval -E \
|
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 '"')"
|
| tr -d '"')"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue