git.iko.soy/typeable/nixpkgs
on master help sign in
fetchFromGitHub: allow forcing fetchGit
commit00dc3dcf8bfb3d7806fefa83e1e65d46cd6b5e24 authorSandro Jäckel <sandro.jaeckel@gmail.com> dateSun 26 Sep 2021, 15:41 (5 years ago) parentb9f8421
1 file changed+2−2
pkgs/build-support/fetchgithub/default.nix+2−2
pkgs/build-support/fetchgithub/default.nix+2−2
@@ -2,7 +2,7 @@
22
33{ owner, repo, rev, name ? "source"
44, fetchSubmodules ? false, leaveDotGit ? null
5−, deepClone ? false, private ? false
5+, deepClone ? false, private ? false, forceFetchGit ? false
66, githubBase ? "github.com", varPrefix ? null
77, ... # For hash agility
88}@args:
@@ -10,7 +10,7 @@ let
1010 baseUrl = "https://${githubBase}/${owner}/${repo}";
1111 passthruAttrs = removeAttrs args [ "owner" "repo" "rev" "fetchSubmodules" "private" "githubBase" "varPrefix" ];
1212 varBase = "NIX${if varPrefix == null then "" else "_${varPrefix}"}_GITHUB_PRIVATE_";
13− useFetchGit = fetchSubmodules || (leaveDotGit == true) || deepClone;
13+ useFetchGit = fetchSubmodules || (leaveDotGit == true) || deepClone || forceFetchGit;
1414 # We prefer fetchzip in cases we don't need submodules as the hash
1515 # is more stable in that case.
1616 fetcher = if useFetchGit then fetchgit else fetchzip;