|
|
|
@ -10,8 +10,18 @@ |
|
|
|
|
}@args: |
|
|
|
|
|
|
|
|
|
let |
|
|
|
|
|
|
|
|
|
position = (if args.meta.description or null != null |
|
|
|
|
then builtins.unsafeGetAttrPos "description" args.meta |
|
|
|
|
else builtins.unsafeGetAttrPos "rev" args |
|
|
|
|
); |
|
|
|
|
baseUrl = "https://${githubBase}/${owner}/${repo}"; |
|
|
|
|
newMeta = meta // { homepage = meta.homepage or baseUrl; }; |
|
|
|
|
newMeta = meta // { |
|
|
|
|
homepage = meta.homepage or baseUrl; |
|
|
|
|
|
|
|
|
|
# to indicate where derivation originates, similar to make-derivation.nix's mkDerivation |
|
|
|
|
position = "${position.file}:${toString position.line}"; |
|
|
|
|
}; |
|
|
|
|
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 != ""); |
|
|
|
|