Commit cbaab9e8 authored by Sébastien Maret's avatar Sébastien Maret Committed by Masum Reza
Browse files

gildas: fix update script

The hash needs to be converted to SRI format with `nix-hash`.
parent 8ddddcd3
Loading
Loading
Loading
Loading
+7 −4
Original line number Diff line number Diff line
@@ -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):