erisPatchHook: use filenames as keys
This commit is contained in:
parent
d6022ce707
commit
d6e8db17f9
|
@ -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))
|
||||
|
|
Loading…
Reference in New Issue
Block a user