diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix index 45c7599b1c74e..50cbe03a7aab9 100644 --- a/pkgs/build-support/fetchgit/default.nix +++ b/pkgs/build-support/fetchgit/default.nix @@ -68,6 +68,8 @@ lib.makeOverridable ( rootDir ? "", # GIT_CONFIG_GLOBAL (as a file) gitConfigFile ? config.gitConfigFile, + # Passthrough attributes + passthru ? { }, }: /* @@ -195,7 +197,8 @@ lib.makeOverridable ( passthru = { gitRepoUrl = url; inherit tag; - }; + } + // passthru; } ) ) diff --git a/pkgs/build-support/fetchgithub/default.nix b/pkgs/build-support/fetchgithub/default.nix index dfe210f32c412..5cf84bc623bb3 100644 --- a/pkgs/build-support/fetchgithub/default.nix +++ b/pkgs/build-support/fetchgithub/default.nix @@ -124,6 +124,16 @@ lib.makeOverridable ( fetchLFS ; url = gitRepoUrl; + passthru = (args.passthru or { }) // { + inherit + gitRepoUrl + owner + repo + tag + ; + rev = revWithTag; + }; + meta = newMeta; } // lib.optionalAttrs (leaveDotGit != null) { inherit leaveDotGit; } else @@ -146,9 +156,16 @@ lib.makeOverridable ( "${baseUrl}/archive/${revWithTag}.tar.gz"; extension = "tar.gz"; - passthru = { - inherit gitRepoUrl; + passthru = (args.passthru or { }) // { + inherit + gitRepoUrl + owner + repo + tag + ; + rev = revWithTag; }; + meta = newMeta; } ) // privateAttrs