mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-01-19 03:14:03 +00:00
fetchFromGitHub: Always add meta.homepage to the derivation
The attribute meta.homepage was only added if "fetchFromGitHub = false" which might be unexpected. Now, it will be set unconditionally.
This commit is contained in:
parent
f27feb5481
commit
49d64a9d53
@ -198,7 +198,7 @@ with pkgs;
|
||||
baseUrl = "https://${githubBase}/${owner}/${repo}";
|
||||
passthruAttrs = removeAttrs args [ "owner" "repo" "rev" "fetchSubmodules" "private" "githubBase" "varPrefix" ];
|
||||
varBase = "NIX${if varPrefix == null then "" else "_${varPrefix}"}_GITHUB_PRIVATE_";
|
||||
in if fetchSubmodules then
|
||||
in (if fetchSubmodules then
|
||||
fetchgit ({
|
||||
inherit name rev fetchSubmodules;
|
||||
url = "${baseUrl}.git";
|
||||
@ -209,7 +209,6 @@ with pkgs;
|
||||
fetchzip ({
|
||||
inherit name;
|
||||
url = "${baseUrl}/archive/${rev}.tar.gz";
|
||||
meta.homepage = "${baseUrl}/";
|
||||
} // lib.optionalAttrs private {
|
||||
netrcPhase = ''
|
||||
if [ -z "''$${varBase}USERNAME" -o -z "''$${varBase}PASSWORD" ]; then
|
||||
@ -223,7 +222,8 @@ with pkgs;
|
||||
EOF
|
||||
'';
|
||||
netrcImpureEnvVars = [ "${varBase}USERNAME" "${varBase}PASSWORD" ];
|
||||
} // passthruAttrs) // { inherit rev; };
|
||||
} // passthruAttrs) // { inherit rev; })
|
||||
// { meta.homepage = baseUrl; };
|
||||
|
||||
fetchFromBitbucket = {
|
||||
owner, repo, rev, name ? gitRepoToName repo rev,
|
||||
|
Loading…
Reference in New Issue
Block a user