···
-
name ? repoRevToNameMaybe repo (lib.revOrTag rev tag) "tangled",
-
fetchSubmodules ? false,
-
assert lib.assertMsg (lib.xor (tag != null) (
-
)) "fetchFromTangled requires one of either `rev` or `tag` to be provided (not both).";
-
if args.meta.description or null != null then
-
builtins.unsafeGetAttrPos "description" args.meta
-
else if tag != null then
-
builtins.unsafeGetAttrPos "tag" args
-
builtins.unsafeGetAttrPos "rev" args
-
baseUrl = "https://${domain}/${owner}/${repo}";
-
homepage = meta.homepage or baseUrl;
-
// lib.optionalAttrs (position != null) {
-
# to indicate where derivation originates, similar to make-derivation.nix's mkDerivation
-
position = "${position.file}:${toString position.line}";
-
passthruAttrs = removeAttrs args [
-
fetchSubmodules || leaveDotGit || deepClone || forceFetchGit || fetchLFS || (sparseCheckout != [ ]);
-
# We prefer fetchzip in cases we don't need submodules as the hash
-
# is more stable in that case.
-
# fetchzip may not be overridable when using external tools, for example nix-prefetch
-
else if fetchzip ? override then
-
fetchzip.override { withUnzip = false; }
-
revWithTag = if tag != null then "refs%2Ftags%2F${tag}" else rev;
-
url = "${baseUrl}/archive/${revWithTag}";
-
inherit owner repo tag;
···
+
lib.extendMkDerivation {
+
constructDrv = stdenvNoCC.mkDerivation;
+
# Additional stdenv.mkDerivation arguments from derived fetchers.
+
name ? repoRevToNameMaybe repo (lib.revOrTag rev tag) "tangled",
+
fetchSubmodules ? false,
+
assert lib.assertMsg (lib.xor (tag != null) (
+
)) "fetchFromTangled requires one of either `rev` or `tag` to be provided (not both).";
+
if args.meta.description or null != null then
+
builtins.unsafeGetAttrPos "description" args.meta
+
else if tag != null then
+
builtins.unsafeGetAttrPos "tag" args
+
builtins.unsafeGetAttrPos "rev" args
+
baseUrl = "https://${domain}/${owner}/${repo}";
+
homepage = meta.homepage or baseUrl;
+
// lib.optionalAttrs (position != null) {
+
# to indicate where derivation originates, similar to make-derivation.nix's mkDerivation
+
position = "${position.file}:${toString position.line}";
+
passthruAttrs = removeAttrs args [
+
fetchSubmodules || leaveDotGit || deepClone || forceFetchGit || fetchLFS || (sparseCheckout != [ ]);
+
# We prefer fetchzip in cases we don't need submodules as the hash
+
# is more stable in that case.
+
# fetchzip may not be overridable when using external tools, for example nix-prefetch
+
else if fetchzip ? override then
+
fetchzip.override { withUnzip = false; }
+
revWithTag = if tag != null then "refs%2Ftags%2F${tag}" else rev;
+
url = "${baseUrl}/archive/${revWithTag}";
+
inherit owner repo tag;