gildas: fix update script
The hash needs to be converted to SRI format with `nix-hash`.
This commit is contained in:
committed by
Masum Reza
parent
8ddddcd3c0
commit
cbaab9e818
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user