From 7ee611b07f8cd0dcb68c2aa32374c82d7199f44a Mon Sep 17 00:00:00 2001 From: Philip Taron Date: Mon, 2 Jun 2025 10:51:02 -0700 Subject: [PATCH] tests.fetchgit.fetchTags: fix flaky test by removing .git directory after getting tags Closes #412967 --- pkgs/build-support/fetchgit/tests.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/build-support/fetchgit/tests.nix b/pkgs/build-support/fetchgit/tests.nix index ce733347cfa0..fd6aebc335f7 100644 --- a/pkgs/build-support/fetchgit/tests.nix +++ b/pkgs/build-support/fetchgit/tests.nix @@ -90,9 +90,11 @@ rev = "9d9dbe6ed05854e03811c361a3380e09183f4f4a"; fetchTags = true; leaveDotGit = true; - sha256 = "sha256-2vfZnYjZlnC8ODz6B6aOqAqtb1Wbjojnn/5TmzwUrmo="; + sha256 = "sha256-y7l+46lVP2pzJwGON5qEV0EoxWofRoWAym5q9VXvpc8="; postFetch = '' cd $out && git describe --tags --always > describe-output.txt 2>&1 || echo "git describe failed" > describe-output.txt + # See https://github.com/NixOS/nixpkgs/issues/412967#issuecomment-2927452118 + rm -rf .git ''; }; }