From d6e8db17f9a8d97d9e67e5b244cdcd86a21a0b09 Mon Sep 17 00:00:00 2001 From: Emery Hemingway Date: Tue, 24 May 2022 23:06:57 -0500 Subject: [PATCH] erisPatchHook: use filenames as keys --- overlay/eris-patch-hook/eris_patch.nim | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/overlay/eris-patch-hook/eris_patch.nim b/overlay/eris-patch-hook/eris_patch.nim index b714074..0b0c5fb 100644 --- a/overlay/eris-patch-hook/eris_patch.nim +++ b/overlay/eris-patch-hook/eris_patch.nim @@ -118,7 +118,7 @@ proc fileClosure(filePath: string): TableRef[string, string] = if fileExists(manifestPath): let manifest = parseFile(manifestPath) - entry = manifest[filePath] + entry = manifest[filePath.extractFilename] for path, cap in entry["closure"].pairs: result[path] = cap.getStr let otherClosure = fileClosure(path) @@ -179,9 +179,10 @@ while pendingFiles.len != 0: if exitCode != 0: echo "Patchelf failed - ", replaceCmd quit exitCode - outputManifests[pendingFile.outputRoot][filePath] = %* { + outputManifests[pendingFile.outputRoot][filePath.extractFilename] = %* { "cap": fileUrn(filePath), "closure": closure, + "path": filePath } if pendingFiles.len == prevPrevLen: failed = true @@ -199,5 +200,4 @@ for outputRoot, manifest in outputManifests: let supportDir = outputRoot / "nix-support" createDir(supportDir) writeFile(outputRoot / jsonManifestSubPath, $manifest) - for path, attrs in manifest.pairs: - writeFile(supportDir / path.extractFilename & ".eris.dhall", $(attrs.toDhall)) + writeFile(outputRoot / dhallManifestSubPath, $(manifest.toDhall))