Skip to content

Commit

Permalink
mkBinaryCache: fix FileHashes
Browse files Browse the repository at this point in the history
  • Loading branch information
ryantrinkle committed Dec 22, 2024
1 parent 4989a24 commit 173de32
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkgs/build-support/binary-cache/make-binary-cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def dropPrefix(path):
with open(xzFile, "w") as f:
subprocess.run("nix-store --dump %s | xz -c" % item["path"], stdout=f, shell=True)

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

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

0 comments on commit 173de32

Please sign in to comment.