Many nim packages regressed on darwin after 31254120db, which upgrade nim to 1.6.12. The cause of the breakage is that the nim standard library was changed to link against the Security framework when using the system rng on darwin. Notably not *all* nim packages were broken by this, since packages that don't use this part of the standard library don't need the framework to build.
This commit adds the Security framework to the depsTargetTargetPropagated for the compiler wrapper, since the standard library isn't fully functional without it.
Building the bootstrap and the unwrapped compiler in seperate
derivations is still worthwhile because if we patch the compiler
only need to rebuild the second of the two.
The old "csources" repo has been archived a while ago and a newer
csources_v1 repo has been published. The main advantage is that we now
have support for newer platorms (such as Apple M1's) and newer nim
versions in the bootstrap.
The new repository doesn't contain release tags thus I pinned it to the
latest revision that has been published.
isPowerPC is only true on 32 bit machines;
to check the family we should use isPower here
Otherwise, e.g. `pkgsCross.powernv.buildPackages.nim` fails to eval with
`error: evaluation aborted with the following error message: 'no Nim CPU support known for powerpc64le-unknown-linux-gnu'`
* 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
- link sqlite (needed for the the stdlib sqlite module)
- update nodejs to 11.x
- use default phase order (fixes linker errors during test phase)
- substitution in ./test/async/tioselectors.nim not needed anymore
- two more tests need to be disabled
- LD=$CC workaround not needed anymore
- disable unsupported tests on aarch64
- trigger pre and post hooks
- use checkInputs instead of nativeBuildInputs
- don't override patchPhase