The reason why this does not work is not that we can't built static
objects, we can, but we can't use `-staticlib` on GHC on windows.
`-staticlib` rolls all dependencies into a combined archive. While this
would work on windows if we used gnu ar and MRI script, GHC can't rely
on GNU ar, and as such has a quick archive concatenation module for GNU
and BSD archives only.
This is because they are just for Setup.hs, so they are just used at build time
and completely isolated from the normal components' dependencies.
This was previous implemented in 8a8f0408cd9b7fdda1095718107c800057658c44, but
reverted in e69c7f56419589c0d3296e81f47032fa813cca4b because it broken
setup-depends non-cross in haskell shell environments (custom Setup.hs in cross
shell environments has never worked). This version adds a special native
exception to avoid that breakage.
Just like with the other `--extra-*` flags, cc/ld-wrapper already handles
this, but we need to make Cabal aware so that the haskell builds have
the correct metadata.
The reason why this does not work is not that we can't built static
objects, we can, but we can't use `-staticlib` on GHC on windows.
`-staticlib` rolls all dependencies into a combined archive. While this
would work on windows if we used gnu ar and MRI script, GHC can't rely
on GNU ar, and as such has a quick archive concatenation module for GNU
and BSD archives only.
This is because they are just for Setup.hs, so they are just used at build time
and completely isolated from the normal components' dependencies.
This was previous implemented in 8a8f0408cd9b7fdda1095718107c800057658c44, but
reverted in e69c7f56419589c0d3296e81f47032fa813cca4b because it broken
setup-depends non-cross in haskell shell environments (custom Setup.hs in cross
shell environments has never worked). This version adds a special native
exception to avoid that breakage.
Just like with the other `--extra-*` flags, cc/ld-wrapper already handles
this, but we need to make Cabal aware so that the haskell builds have
the correct metadata.
The purpose of this argument is to allow you to get at the derivation (rather
than it's env) even when in the evaluation context of a nix-shell invocation.
Some of the new tests need the `nix` executable on `PATH`.
One also needs `hpack`, but we really don’t want to embiggen (heh) the closure
because of that.
We need to add the STACK_IN_NIX_EXTRA_ARGS hook in configurePhase also to ensure we get the right args when calling ```nix-build``` (as opposed to nix-shell).
The `haskell-gi` build fails its doctests because of a missing
library; I'm not 100% convinced that setting it to `dontCheck` is the
right thing to do, but I don't have a better idea at the moment.
The `gi-gdkx11` build fails because, surprise, Gdk-X11 isn't found; by
looking around in my store, I found that that that library seems to
live in gtk3 these days; this override is just a stop-gap, though,
I've also submitted the change to cabal2nix that I believe will fix
the automatic generation of the package in the future.