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):
|
if fileExists(manifestPath):
|
||||||
let
|
let
|
||||||
manifest = parseFile(manifestPath)
|
manifest = parseFile(manifestPath)
|
||||||
entry = manifest[filePath]
|
entry = manifest[filePath.extractFilename]
|
||||||
for path, cap in entry["closure"].pairs:
|
for path, cap in entry["closure"].pairs:
|
||||||
result[path] = cap.getStr
|
result[path] = cap.getStr
|
||||||
let otherClosure = fileClosure(path)
|
let otherClosure = fileClosure(path)
|
||||||
|
@ -179,9 +179,10 @@ while pendingFiles.len != 0:
|
||||||
if exitCode != 0:
|
if exitCode != 0:
|
||||||
echo "Patchelf failed - ", replaceCmd
|
echo "Patchelf failed - ", replaceCmd
|
||||||
quit exitCode
|
quit exitCode
|
||||||
outputManifests[pendingFile.outputRoot][filePath] = %* {
|
outputManifests[pendingFile.outputRoot][filePath.extractFilename] = %* {
|
||||||
"cap": fileUrn(filePath),
|
"cap": fileUrn(filePath),
|
||||||
"closure": closure,
|
"closure": closure,
|
||||||
|
"path": filePath
|
||||||
}
|
}
|
||||||
if pendingFiles.len == prevPrevLen:
|
if pendingFiles.len == prevPrevLen:
|
||||||
failed = true
|
failed = true
|
||||||
|
@ -199,5 +200,4 @@ for outputRoot, manifest in outputManifests:
|
||||||
let supportDir = outputRoot / "nix-support"
|
let supportDir = outputRoot / "nix-support"
|
||||||
createDir(supportDir)
|
createDir(supportDir)
|
||||||
writeFile(outputRoot / jsonManifestSubPath, $manifest)
|
writeFile(outputRoot / jsonManifestSubPath, $manifest)
|
||||||
for path, attrs in manifest.pairs:
|
writeFile(outputRoot / dhallManifestSubPath, $(manifest.toDhall))
|
||||||
writeFile(supportDir / path.extractFilename & ".eris.dhall", $(attrs.toDhall))
|
|
||||||
|
|
Loading…
Reference in New Issue