treewide: make sparseCheckout a list of strings

This commit is contained in:
Nicolas Benes 2022-11-07 19:44:08 +01:00
parent f6b07f0e2f
commit c95d7d5a8c
6 changed files with 12 additions and 12 deletions

View File

@ -9,10 +9,10 @@ python3Packages.buildPythonApplication rec {
owner = "ryanoasis";
repo = "nerd-fonts";
rev = "v${version}";
sparseCheckout = ''
font-patcher
/src/glyphs
'';
sparseCheckout = [
"font-patcher"
"/src/glyphs"
];
sha256 = "sha256-boZUd1PM8puc9BTgOwCJpkfk6VMdXLsIyp+fQmW/ZqI=";
};

View File

@ -3,7 +3,7 @@
{ owner, repo, rev, name ? "source"
, fetchSubmodules ? false, leaveDotGit ? null
, deepClone ? false, private ? false, forceFetchGit ? false
, sparseCheckout ? ""
, sparseCheckout ? []
, githubBase ? "github.com", varPrefix ? null
, meta ? { }
, ... # For hash agility
@ -24,7 +24,7 @@ let
};
passthruAttrs = removeAttrs args [ "owner" "repo" "rev" "fetchSubmodules" "forceFetchGit" "private" "githubBase" "varPrefix" ];
varBase = "NIX${if varPrefix == null then "" else "_${varPrefix}"}_GITHUB_PRIVATE_";
useFetchGit = fetchSubmodules || (leaveDotGit == true) || deepClone || forceFetchGit || (sparseCheckout != "");
useFetchGit = fetchSubmodules || (leaveDotGit == true) || deepClone || forceFetchGit || !(sparseCheckout == "" || sparseCheckout == []);
# We prefer fetchzip in cases we don't need submodules as the hash
# is more stable in that case.
fetcher = if useFetchGit then fetchgit else fetchzip;

View File

@ -71,7 +71,7 @@ let
owner = "googlefonts";
repo = "noto-cjk";
inherit rev sha256;
sparseCheckout = "${typeface}/Variable/OTC";
sparseCheckout = [ "${typeface}/Variable/OTC" ];
};
installPhase = ''

View File

@ -18,9 +18,9 @@ stdenvNoCC.mkDerivation rec {
owner = "gvolpe";
repo = pname;
rev = version;
sparseCheckout = ''
BeautyLine-V3
'';
sparseCheckout = [
"BeautyLine-V3"
];
sha256 = "sha256-IkkypAj250+OXbf19TampCnqYsSbJVIjeYlxJoyhpzk=";
};

View File

@ -12,7 +12,7 @@ stdenvNoCC.mkDerivation rec {
repo = "mod-dh";
rev = "e846a5bd24d59ed15ba70b3a9d5363a38ca51d09";
sha256 = "sha256-RFOpN+tIMfakb7AZN0ock9eq2mytvL0DWedvQV67+ks=";
sparseCheckout = "console";
sparseCheckout = [ "console" ];
};
phases = [ "unpackPhase" "installPhase" ];

View File

@ -41,7 +41,7 @@ stdenvNoCC.mkDerivation rec {
repo = pname;
rev = "v${version}";
hash = "sha256-DZBmf8fe0zw5uiQjNKXw8g/vU2hjNDa87z/7XuhyXog=";
inherit sparseCheckout;
sparseCheckout = [ sparseCheckout ];
} + sparseCheckout;
nativeBuildInputs = [ copyDesktopItems makeWrapper ];