summary refs log tree commit diff
diff options
context:
space:
mode:
authorJonathan Ringer <jonringer117@gmail.com>2022-02-09 16:25:42 -0800
committerJonathan Ringer <jonringer@users.noreply.github.com>2022-02-10 10:18:16 -0800
commit665684a981edbdc1de4f374363b2c3923249caa6 (patch)
tree9c1df7cf30e3ec548d5fa76b471a16c633dc6f92
parentafa9bb4d3a12d49d5ae9a7c1f33a92946250cd5f (diff)
downloadnixpkgs-665684a981edbdc1de4f374363b2c3923249caa6.tar
nixpkgs-665684a981edbdc1de4f374363b2c3923249caa6.tar.gz
nixpkgs-665684a981edbdc1de4f374363b2c3923249caa6.tar.bz2
nixpkgs-665684a981edbdc1de4f374363b2c3923249caa6.tar.lz
nixpkgs-665684a981edbdc1de4f374363b2c3923249caa6.tar.xz
nixpkgs-665684a981edbdc1de4f374363b2c3923249caa6.tar.zst
nixpkgs-665684a981edbdc1de4f374363b2c3923249caa6.zip
fetchFromGitHub: don't overwrite meta
-rw-r--r--pkgs/build-support/fetchgithub/default.nix5
1 files changed, 4 insertions, 1 deletions
diff --git a/pkgs/build-support/fetchgithub/default.nix b/pkgs/build-support/fetchgithub/default.nix
index 4e4162368b9..d03d344dbb2 100644
--- a/pkgs/build-support/fetchgithub/default.nix
+++ b/pkgs/build-support/fetchgithub/default.nix
@@ -5,10 +5,13 @@
 , deepClone ? false, private ? false, forceFetchGit ? false
 , sparseCheckout ? ""
 , githubBase ? "github.com", varPrefix ? null
+, meta ? { }
 , ... # For hash agility
 }@args:
+
 let
   baseUrl = "https://${githubBase}/${owner}/${repo}";
+  newMeta = meta // { homepage = meta.homepage or baseUrl; };
   passthruAttrs = removeAttrs args [ "owner" "repo" "rev" "fetchSubmodules" "forceFetchGit" "private" "githubBase" "varPrefix" ];
   varBase = "NIX${if varPrefix == null then "" else "_${varPrefix}"}_GITHUB_PRIVATE_";
   useFetchGit = fetchSubmodules || (leaveDotGit == true) || deepClone || forceFetchGit || (sparseCheckout != "");
@@ -37,4 +40,4 @@ let
   ) // privateAttrs // passthruAttrs // { inherit name; };
 in
 
-fetcher fetcherArgs // { meta.homepage = baseUrl; inherit rev; }
+fetcher fetcherArgs // { meta = newMeta; inherit rev; }