summary refs log tree commit diff
path: root/pkgs/common-updater/unstable-updater.nix
diff options
context:
space:
mode:
authorJan Tojnar <jtojnar@gmail.com>2022-02-18 07:58:54 +0100
committerJan Tojnar <jtojnar@gmail.com>2022-02-18 07:59:02 +0100
commit30ec84fba39777e7e0af7352d89ba1271e5cf45e (patch)
tree0b80bad0922d9b20d60f813c93fc0e52224f1cce /pkgs/common-updater/unstable-updater.nix
parent0b5085cdb7fc51eb3f27b9c48e0ad8212734c397 (diff)
downloadnixpkgs-30ec84fba39777e7e0af7352d89ba1271e5cf45e.tar
nixpkgs-30ec84fba39777e7e0af7352d89ba1271e5cf45e.tar.gz
nixpkgs-30ec84fba39777e7e0af7352d89ba1271e5cf45e.tar.bz2
nixpkgs-30ec84fba39777e7e0af7352d89ba1271e5cf45e.tar.lz
nixpkgs-30ec84fba39777e7e0af7352d89ba1271e5cf45e.tar.xz
nixpkgs-30ec84fba39777e7e0af7352d89ba1271e5cf45e.tar.zst
nixpkgs-30ec84fba39777e7e0af7352d89ba1271e5cf45e.zip
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/unstable-updater.nix')
-rw-r--r--pkgs/common-updater/unstable-updater.nix2
1 files changed, 1 insertions, 1 deletions
diff --git a/pkgs/common-updater/unstable-updater.nix b/pkgs/common-updater/unstable-updater.nix
index 01f8ae2533e..ded31e1ddb9 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