From 30ec84fba39777e7e0af7352d89ba1271e5cf45e Mon Sep 17 00:00:00 2001 From: Jan Tojnar Date: Fri, 18 Feb 2022 07:58:54 +0100 Subject: [PATCH] unstableGitUpdater: Fix support for fetchFromGit{Hub,Lab} MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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. --- pkgs/common-updater/unstable-updater.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/common-updater/unstable-updater.nix b/pkgs/common-updater/unstable-updater.nix index 01f8ae2533e6..ded31e1ddb9c 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