diff options
author | Jan Tojnar <jtojnar@gmail.com> | 2022-02-18 07:58:54 +0100 |
---|---|---|
committer | Jan Tojnar <jtojnar@gmail.com> | 2022-02-18 07:59:02 +0100 |
commit | 30ec84fba39777e7e0af7352d89ba1271e5cf45e (patch) | |
tree | 0b80bad0922d9b20d60f813c93fc0e52224f1cce /pkgs/common-updater | |
parent | 0b5085cdb7fc51eb3f27b9c48e0ad8212734c397 (diff) |
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.
Diffstat (limited to 'pkgs/common-updater')
-rw-r--r-- | pkgs/common-updater/unstable-updater.nix | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/common-updater/unstable-updater.nix b/pkgs/common-updater/unstable-updater.nix index 01f8ae2533e6f..ded31e1ddb9c2 100644 --- a/pkgs/common-updater/unstable-updater.nix +++ b/pkgs/common-updater/unstable-updater.nix @@ -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 |