mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 08:23:09 +00:00
nim: patch compiler to emit native file/line info format
This commit is contained in:
parent
a323570a26
commit
3cfbadec99
@ -114,7 +114,7 @@ in {
|
||||
|
||||
./nixbuild.patch
|
||||
# Load libraries at runtime by absolute path
|
||||
];
|
||||
] ++ lib.optional (!stdenv.hostPlatform.isWindows) ./toLocation.patch;
|
||||
|
||||
configurePhase = ''
|
||||
runHook preConfigure
|
||||
|
20
pkgs/development/compilers/nim/toLocation.patch
Normal file
20
pkgs/development/compilers/nim/toLocation.patch
Normal file
@ -0,0 +1,20 @@
|
||||
diff --git a/lib/std/private/miscdollars.nim b/lib/std/private/miscdollars.nim
|
||||
index a41cf1bc1..5b92c696a 100644
|
||||
--- a/lib/std/private/miscdollars.nim
|
||||
+++ b/lib/std/private/miscdollars.nim
|
||||
@@ -4,12 +4,12 @@ template toLocation*(result: var string, file: string | cstring, line: int, col:
|
||||
# it can be done in a single place.
|
||||
result.add file
|
||||
if line > 0:
|
||||
- result.add "("
|
||||
+ result.add ':'
|
||||
# simplify this after moving moving `include strmantle` above import assertions`
|
||||
when declared(addInt): result.addInt line
|
||||
else: result.add $line
|
||||
if col > 0:
|
||||
- result.add ", "
|
||||
+ result.add ':'
|
||||
when declared(addInt): result.addInt col
|
||||
else: result.add $col
|
||||
- result.add ")"
|
||||
+ result.add ':'
|
Loading…
Reference in New Issue
Block a user