Commit aede4d20 authored by Yueh-Shun Li's avatar Yueh-Shun Li
Browse files

fetchFromGitHub: pass rev uniformly

parent 3754cf57
Loading
Loading
Loading
Loading
+8 −5
Original line number Diff line number Diff line
@@ -110,8 +110,6 @@ lib.makeOverridable (

    gitRepoUrl = "${baseUrl}.git";

    revWithTag = if tag != null then "refs/tags/${tag}" else rev;

    fetcherArgs =
      finalAttrs:
      passthruAttrs
@@ -137,6 +135,9 @@ lib.makeOverridable (
          }
          // lib.optionalAttrs (leaveDotGit != null) { inherit leaveDotGit; }
        else
          let
            revWithTag = finalAttrs.rev;
          in
          {
            # Use the API endpoint for private repos, as the archive URI doesn't
            # support access with GitHub's fine-grained access tokens.
@@ -161,6 +162,11 @@ lib.makeOverridable (
                repo
                tag
                ;
              rev = fetchgit.getRevWithTag {
                inherit (finalAttrs) tag;
                rev = finalAttrs.revCustom;
              };
              revCustom = rev;
            };
            passthru = {
              inherit gitRepoUrl;
@@ -176,7 +182,4 @@ lib.makeOverridable (
  in

  fetcher fetcherArgs
  // {
    rev = revWithTag;
  }
)