diff --git a/recipes/tools/xz/recipe.toml b/recipes/tools/xz/recipe.toml
index d36b3a7af97c8af29d1633b4d1c825361667a96f..87eb02ea35c6e83ca21cb0df6e7bef51933d6877 100644
--- a/recipes/tools/xz/recipe.toml
+++ b/recipes/tools/xz/recipe.toml
@@ -1,13 +1,12 @@
 [source]
-tar = "https://tukaani.org/xz/xz-5.4.3.tar.xz"
-blake3 = "4b1b814bcf3794973fe9076d549a0edfbee01d2fd57821fe3280537ef6c7deae"
-script = """
-./autogen.sh
-"""
+git = "https://git.tukaani.org/xz.git"
+# v5.2.5
+rev = "2327a461e1afce862c22269b80d3517801103c1b"
 
 [build]
 template = "custom"
 script = """
+(cd ${COOKBOOK_SOURCE} && ./autogen.sh)
 export CFLAGS="-static"
 COOKBOOK_CONFIGURE_FLAGS=(
     --host="${TARGET}"