fetchFromGitHub: fix compatibility issue with nix-prefetch

+5 -1
+5 -1
pkgs/build-support/fetchgithub/default.nix
··· 28 useFetchGit = fetchSubmodules || (leaveDotGit == true) || deepClone || forceFetchGit || (sparseCheckout != []); 29 # We prefer fetchzip in cases we don't need submodules as the hash 30 # is more stable in that case. 31 - fetcher = if useFetchGit then fetchgit else fetchzip.override { withUnzip = false; }; 32 privateAttrs = lib.optionalAttrs private { 33 netrcPhase = '' 34 if [ -z "''$${varBase}USERNAME" -o -z "''$${varBase}PASSWORD" ]; then
··· 28 useFetchGit = fetchSubmodules || (leaveDotGit == true) || deepClone || forceFetchGit || (sparseCheckout != []); 29 # We prefer fetchzip in cases we don't need submodules as the hash 30 # is more stable in that case. 31 + fetcher = 32 + if useFetchGit then fetchgit 33 + # fetchzip may not be overridable when using external tools, for example nix-prefetch 34 + else if fetchzip ? override then fetchzip.override { withUnzip = false; } 35 + else fetchzip; 36 privateAttrs = lib.optionalAttrs private { 37 netrcPhase = '' 38 if [ -z "''$${varBase}USERNAME" -o -z "''$${varBase}PASSWORD" ]; then