We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 68d2292 + 53af111 commit 09d6847Copy full SHA for 09d6847
tests/nixos/fetchers-substitute.nix
@@ -120,7 +120,9 @@
120
path_info_json = substituter.succeed(f"nix path-info --json {tarball_store_path}").strip()
121
path_info_dict = json.loads(path_info_json)
122
# nix path-info returns a dict with store paths as keys
123
- tarball_hash_sri = path_info_dict[tarball_store_path]["narHash"]
+ narHash_obj = path_info_dict[tarball_store_path]["narHash"]
124
+ # Convert from structured format {"algorithm": "sha256", "format": "base64", "hash": "..."} to SRI string
125
+ tarball_hash_sri = f"{narHash_obj['algorithm']}-{narHash_obj['hash']}"
126
print(f"Tarball NAR hash (SRI): {tarball_hash_sri}")
127
128
# Also get the old format hash for fetchTarball (which uses sha256 parameter)
0 commit comments