nim: cross-compilation fixes

* Import with callPackages
* Use buildPackages for building a cross-compiler
* Patch-out potential conflicts in nim.cfg
* Generate a configuration with toolchain detection
* Build with strictDeps enabled
This commit is contained in:
Emery Hemingway
2021-03-05 15:00:03 +01:00
parent c8d2f4a3a8
commit 56592ea293
4 changed files with 285 additions and 174 deletions

View File

@@ -31,7 +31,7 @@ stdenv.mkDerivation rec {
export HOME=$TMPDIR
nim -d:release -p:${astpatternmatching}/src -p:${jsonschema}/src \
c --threads:on -d:nimcore -d:nimsuggest -d:debugCommunication \
-d:debugLogging -d:explicitSourcePath=${srcOnly nim.unwrapped} -d:tempDir=/tmp src/nimlsp
-d:debugLogging -d:explicitSourcePath=${srcOnly nim.passthru.nim} -d:tempDir=/tmp src/nimlsp
'';
installPhase = ''