Skip to content

Commit 3833178

Browse files
authored
mkBinaryCache: fix FileHashes (NixOS#367241)
2 parents 31f1c93 + 173de32 commit 3833178

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

pkgs/build-support/binary-cache/make-binary-cache.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def dropPrefix(path):
2323
with open(xzFile, "w") as f:
2424
subprocess.run("nix-store --dump %s | xz -c" % item["path"], stdout=f, shell=True)
2525

26-
fileHash = subprocess.run(["nix-hash", "--base32", "--type", "sha256", item["path"]], capture_output=True).stdout.decode().strip()
26+
fileHash = subprocess.run(["nix-hash", "--base32", "--type", "sha256", "--flat", xzFile], capture_output=True).stdout.decode().strip()
2727
fileSize = os.path.getsize(xzFile)
2828

2929
# Rename the .nar.xz file to its own hash to match "nix copy" behavior

0 commit comments

Comments
 (0)