summary refs log tree commit diff
path: root/pkgs/build-support/fetchgit
diff options
context:
space:
mode:
authorRick van Schijndel <Mindavi@users.noreply.github.com>2023-06-05 22:53:19 +0200
committerGitHub <noreply@github.com>2023-06-05 22:53:19 +0200
commit6cdf7259d0bf59a68694a48c0ac58b5c9082f10b (patch)
tree6711f83fa009a549e77a5dda60718a09f835ac9c /pkgs/build-support/fetchgit
parentd929ec331e229ee6d2a07666b55e47056bacddf1 (diff)
parent52f3a1c42ce20135eb7074e2d325daa09126d83f (diff)
downloadnixpkgs-6cdf7259d0bf59a68694a48c0ac58b5c9082f10b.tar
nixpkgs-6cdf7259d0bf59a68694a48c0ac58b5c9082f10b.tar.gz
nixpkgs-6cdf7259d0bf59a68694a48c0ac58b5c9082f10b.tar.bz2
nixpkgs-6cdf7259d0bf59a68694a48c0ac58b5c9082f10b.tar.lz
nixpkgs-6cdf7259d0bf59a68694a48c0ac58b5c9082f10b.tar.xz
nixpkgs-6cdf7259d0bf59a68694a48c0ac58b5c9082f10b.tar.zst
nixpkgs-6cdf7259d0bf59a68694a48c0ac58b5c9082f10b.zip
Merge pull request #235898 from panicgh/fetchgit-sparse-checkout-failhard
fetchgit: require sparseCheckout be a list of strings
Diffstat (limited to 'pkgs/build-support/fetchgit')
-rw-r--r--pkgs/build-support/fetchgit/default.nix10
1 files changed, 5 insertions, 5 deletions
diff --git a/pkgs/build-support/fetchgit/default.nix b/pkgs/build-support/fetchgit/default.nix
index abd9fb23e05..3d73eae9821 100644
--- a/pkgs/build-support/fetchgit/default.nix
+++ b/pkgs/build-support/fetchgit/default.nix
@@ -54,16 +54,16 @@ lib.makeOverridable (
 */
 
 assert deepClone -> leaveDotGit;
-assert nonConeMode -> !(sparseCheckout == "" || sparseCheckout == []);
+assert nonConeMode -> (sparseCheckout != []);
 
 if md5 != "" then
   throw "fetchgit does not support md5 anymore, please use sha256"
 else if hash != "" && sha256 != "" then
   throw "Only one of sha256 or hash can be set"
+else if builtins.isString sparseCheckout then
+  # Changed to throw on 2023-06-04
+  throw "Please provide directories/patterns for sparse checkout as a list of strings. Passing a (multi-line) string is not supported any more."
 else
-# Added 2022-11-12
-lib.warnIf (builtins.isString sparseCheckout)
-  "Please provide directories/patterns for sparse checkout as a list of strings. Support for passing a (multi-line) string is deprecated and will be removed in the next release."
 stdenvNoCC.mkDerivation {
   inherit name;
   builder = ./builder.sh;
@@ -84,7 +84,7 @@ stdenvNoCC.mkDerivation {
   # git-sparse-checkout(1) says:
   # > When the --stdin option is provided, the directories or patterns are read
   # > from standard in as a newline-delimited list instead of from the arguments.
-  sparseCheckout = if builtins.isString sparseCheckout then sparseCheckout else builtins.concatStringsSep "\n" sparseCheckout;
+  sparseCheckout = builtins.concatStringsSep "\n" sparseCheckout;
 
   inherit url rev leaveDotGit fetchLFS fetchSubmodules deepClone branchName nonConeMode postFetch;