mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-07-14 14:10:33 +03:00
mkBinaryCache: add missing .nar extension
Flagged in https://github.com/NixOS/nixpkgs/pull/376365#discussion_r1976613767. This now properly restores the .nar extension.
This commit is contained in:
parent
bdb539f1ed
commit
18e84362b6
1 changed files with 2 additions and 2 deletions
|
@ -16,7 +16,7 @@ def processItem(
|
||||||
):
|
):
|
||||||
narInfoHash = dropPrefix(item["path"], nixPrefix).split("-")[0]
|
narInfoHash = dropPrefix(item["path"], nixPrefix).split("-")[0]
|
||||||
|
|
||||||
narFile = outDir / "nar" / f"{narInfoHash}{compressionExtension}"
|
narFile = outDir / "nar" / f"{narInfoHash}.nar{compressionExtension}"
|
||||||
with open(narFile, "wb") as f:
|
with open(narFile, "wb") as f:
|
||||||
subprocess.run(
|
subprocess.run(
|
||||||
f"nix-store --dump {item['path']} {compressionCommand}",
|
f"nix-store --dump {item['path']} {compressionCommand}",
|
||||||
|
@ -36,7 +36,7 @@ def processItem(
|
||||||
)
|
)
|
||||||
fileSize = os.path.getsize(narFile)
|
fileSize = os.path.getsize(narFile)
|
||||||
|
|
||||||
finalNarFileName = Path("nar") / f"{fileHash}{compressionExtension}"
|
finalNarFileName = Path("nar") / f"{fileHash}.nar{compressionExtension}"
|
||||||
os.rename(narFile, outDir / finalNarFileName)
|
os.rename(narFile, outDir / finalNarFileName)
|
||||||
|
|
||||||
with open(outDir / f"{narInfoHash}.narinfo", "wt") as f:
|
with open(outDir / f"{narInfoHash}.narinfo", "wt") as f:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue