diff --git a/pkgs/by-name/gi/gildas/update.py b/pkgs/by-name/gi/gildas/update.py index 19e0d09294b1..7f832232326e 100755 --- a/pkgs/by-name/gi/gildas/update.py +++ b/pkgs/by-name/gi/gildas/update.py @@ -85,11 +85,14 @@ def get_hash(srcVersion): """ url = f"http://www.iram.fr/~gildas/dist/gildas-src-{srcVersion}.tar.xz" - srcHash = ( - subprocess.check_output(["nix-prefetch-url", url, "--unpack"]).decode().strip() + srcHash = subprocess.check_output(["nix-prefetch-url", url]).decode().strip() + # Convert to SRI representation + srcSRIHash = ( + subprocess.check_output(["nix-hash", "--to-sri", "--type", "sha256", srcHash]) + .decode() + .strip() ) - - return f"sha256:{srcHash}" + return srcSRIHash def get_package_attribute(attr):