Commit Graph

195 Commits

Author SHA1 Message Date
John Ericson
f8ec07e836 haskell generic-builder: Always use separate pkg db for custom setup
This decreases complexity and ensures setup dependencies are properly
specified with `setup-depends` as they should be. Testing will say if
this is a reasonable change.
2018-06-18 14:07:37 -04:00
John Ericson
529a0f74ed haskell generic-builder: Use separate setup db in more cases
Use for cross and GHCJS whether or not there are setup depends.
2018-06-13 11:34:25 -04:00
John Ericson
eeeaab8d5e haskell generic-builder: Fix setup depends
I was referring to the wrong package db in a few places. Thanks
@ElvishJerricco for catching.
2018-06-12 14:07:33 -04:00
Matthew Bauer
e4e8967269 haskell: fixup merge of c425a1fc50
This was accidentally included even though setupHaskellDepends is
already listed above.
2018-05-31 14:06:56 -04:00
Ryan Trinkle
c425a1fc50 haskell: add *FrameworkDepends arguments 2018-05-31 14:04:10 -04:00
Ryan Mulligan
e8c5d867a1 use https for default Hackage homepage 2018-05-28 12:48:16 -07:00
Jan Malakhovski
ad35019501 Merge branch 'master' into staging
Fixed conflicts:
- lib/systems/for-meta.nix: in favor of staging
- pkgs/os-specific/darwin/xcode/default.nix: in favor of master
2018-05-26 00:20:17 +00:00
John Ericson
2e70a75b12 haskell generic-builder: Limit usage of --extra-framework-dirs for compat 2018-05-25 14:52:58 -04:00
John Ericson
d7144e708b Merge remote-tracking branch 'upstream/master' into staging 2018-05-23 16:00:04 -04:00
Moritz Angermann
87afa66a63 haskell infra: Adds buildFlags logic 2018-05-23 10:27:42 -04:00
Moritz Angermann
affeb0cb80 haskell generic builder: Do the links dance only if shared is enabled. 2018-05-23 10:27:41 -04:00
Moritz Angermann
a4d5dbd45d haskell generic builder: Disable static libs on Windows because no -staticlib
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.
2018-05-23 10:27:41 -04:00
Moritz Angermann
38fbdcc726 haskell generic builder: Use setup package database for setup-depends
Adapted from b69f420121 by @Ericson2314
2018-05-23 10:27:41 -04:00
John Ericson
e1b9419dec haskell generic builder: setupHaskellDepends should be `nativeBuildInputs
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 8a8f0408cd, but
reverted in e69c7f5641 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.
2018-05-23 10:27:39 -04:00
John Ericson
513cd3de0e haskell-generic-builder: Add extra framework dirs
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.
2018-05-23 10:26:57 -04:00
John Ericson
3394c96655 haskell generic-builder: Tiny changes that preserve hases
These bring us closer to staging at no cost
2018-05-23 10:23:06 -04:00
John Ericson
446cb32ea1 haskell generic-builder: Remove merge conflict
I forgot this in 17316643fd
2018-05-23 10:11:03 -04:00
John Ericson
18742471af Merge remote-tracking branch 'upstream/master' into staging
Use newer vagrant from master
2018-05-23 09:40:37 -04:00
Peter Simons
5db3a9df5e
Revert "ghc, haskell infra: #40642 direct to master" 2018-05-23 09:36:16 +02:00
John Ericson
d6ecbbe921
Merge branch 'staging' into feature/clean-ghc 2018-05-21 17:43:30 -04:00
Moritz Angermann
82a847a04b haskell infra: Adds buildFlags logic 2018-05-21 15:11:11 -04:00
Moritz Angermann
5e589a4049 haskell generic builder: Do the links dance only if shared is enabled. 2018-05-21 15:11:11 -04:00
Moritz Angermann
4ea33def46 haskell generic builder: Disable static libs on Windows because no -staticlib
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.
2018-05-21 15:11:11 -04:00
Moritz Angermann
15759df660 haskell generic builder: Use setup package database for setup-depends
Adapted from b69f420121 by @Ericson2314
2018-05-21 15:11:10 -04:00
John Ericson
900862ea3b haskell generic builder: setupHaskellDepends should be `nativeBuildInputs
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 8a8f0408cd, but
reverted in e69c7f5641 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.
2018-05-21 15:09:51 -04:00
John Ericson
2241dedbe6
Merge pull request #40442 from obsidiansystems/cabal-frameworks
haskell-generic-builder: Add extra framework dirs
2018-05-18 18:08:20 -04:00
John Ericson
c6f742b770 haskell-generic-builder: Add extra framework dirs
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.
2018-05-18 17:49:41 -04:00
Matthew Justin Bauer
eeb016e8f0
Merge branch 'staging' into fix-ncurses-darwin-extensions 2018-05-02 15:40:38 -05:00
Jan Malakhovski
9345fc51d1 haskell-generic-builder: be explicit about doCheck, cleanup 2018-04-26 20:22:44 +00:00
John Ericson
ba52ae5048 treewide: isArm -> isAarch32
Following legacy packing conventions, `isArm` was defined just for
32-bit ARM instruction set. This is confusing to non packagers though,
because Aarch64 is an ARM instruction set.

The official ARM overview for ARMv8[1] is surprisingly not confusing,
given the overall state of affairs for ARM naming conventions, and
offers us a solution. It divides the nomenclature into three levels:

```
ISA:             ARMv8   {-A, -R, -M}
                 /    \
Mode:     Aarch32     Aarch64
             |         /   \
Encoding:   A64      A32   T32
```

At the top is the overall v8 instruction set archicture. Second are the
two modes, defined by bitwidth but differing in other semantics too, and
buttom are the encodings, (hopefully?) isomorphic if they encode the
same mode.

The 32 bit encodings are mostly backwards compatible with previous
non-Thumb and Thumb encodings, and if so we can pun the mode names to
instead mean "sets of compatable or isomorphic encodings", and then
voilà we have nice names for 32-bit and 64-bit arm instruction sets
which do not use the word ARM so as to not confused either laymen or
experienced ARM packages.

[1]: https://developer.arm.com/products/architecture/a-profile
2018-04-25 15:28:55 -04:00
Will Fancher
0879138cb7 GHC: Don't use --profiling-detail on GHC < 8.0.2 2018-03-29 00:28:05 -04:00
Will Fancher
0a8359f18c GHCJS: Fix autogenerated node executables 2018-03-25 20:43:23 -04:00
Jude Taylor
d6a0652d6d
Merge pull request #37509 from pikajude/darwin-hs-dynamic
Haskell: fix static libs on darwin
2018-03-21 14:36:08 -07:00
Will Dietz
2a30ab3865
Merge pull request #37486 from dtzWill/fix/ghc-glibcLocales
haskell: only use glibcLocales when using glibc
2018-03-20 22:55:44 -05:00
Jude Taylor
0458c7b885 fix static libs on darwin 2018-03-20 15:26:00 -07:00
Will Dietz
8727284a4b haskell: only use glibcLocales when using glibc
Fixes eval w/musl.

Possible alternative would be using glibcLocales
when it is non-null, to avoid duplicating the logic.
2018-03-20 14:38:40 -05:00
Moritz Angermann
918edbe485 haskell-generic-builder: Add enableHsc2hsViaAsm for Windows cross compilation 2018-03-20 15:27:02 -04:00
John Ericson
65e24f22e6 haskell-generic-builder: Default to window + unix platforms,
Since GHC is a cross compiler, it's perfectly possible to make haskell
binaries on platforms without GHCs. `windows ++ unix` seems good enough
for now.

Also don't default `hydraPlatforms` to `platforms`. The former must be a
list of systems (strings), but the latter is a list of systems or
patterns.
2018-03-20 13:02:53 -04:00
Peter Simons
f3f5d68ca3 haskell-generic-builder: cosmetic 2018-03-17 08:21:23 +01:00
Peter Simons
1978fa444d haskell-generic-builder: disable shared executable linking by default
This change raises the question of whether we should disable building of shared
libraries altogether (since we don't link them). Unfortunately, we can't,
because GHC expects shared libraries to be around when building and running
test suites, and no amount of passing --disable-shared flags at configure time
changes the fact. I *guess* that's related to the DYNAMIC_GHC_PROGRAMS = YES
flag we set when building GHC itself, but I haven't investigated it further
yet.

Closes https://github.com/NixOS/nixpkgs/issues/29011.
2018-03-17 08:21:23 +01:00
Peter Simons
db5be10a4a haskell-generic-builder: fix confusion about --enable-static vs. --enable-library-vanilla 2018-03-17 08:21:23 +01:00
Peter Simons
d7beae33dc haskell-generic-builder: always compile with --enable-library-for-ghci 2018-03-17 08:21:23 +01:00
Peter Simons
a62b24be6d haskell-generic-builder: drop obsolete splitObjs function argument 2018-03-17 08:21:23 +01:00
Peter Simons
7f5fba75e2 haskell-generic-builder: compile profiling library variants by default
Unless specified otherwise, the default package set compiles library variants
for profiling with profiling-detail "all-functions". Executables, however, are
not built with profiling enabled.

This change increases the closure size for many Haskell programs, but the
practical advantage of having stack traces and performance measurements easily
available during development seems to outweigh that cost.

Closes https://github.com/NixOS/nixpkgs/issues/22340.
2018-03-17 08:21:22 +01:00
Peter Simons
1b0c67259e haskell: cosmetic changes to the generic builder 2018-03-05 16:44:23 +01:00
Peter Simons
25ee2516c2 haskell-generic-builder: simplify outputs attribute logic
The arguments cannot contain outputs, so the if-then-else here is pointless.
2018-02-16 16:54:16 +01:00
Peter Simons
2c13435734 haskell-generic-builder: revert "set LD_LIBRARY_PATH in shellHook"
This reverts commit e73e5c884f. Please don't
set $LD_LIBRARY_PATH! Instead, pass appropriate --extra-include-dir and
--extra-lib-dir arguments to "cabal configure" to ensure that Cabal knows
about system dependencies.
2018-02-09 19:56:20 +01:00
Peter Simons
bd3379c443 haskell-generic-builder: include build-tool dependencies in shell environments
For a Haskell package "foo" the environment foo.env now contains the build tool
dependencies required for compiling the package in $PATH.

Fixes https://github.com/NixOS/cabal2nix/issues/331.
2018-02-09 19:56:20 +01:00
John Ericson
81553124cf haskell infra: nativeGhc != ghc.bootPkgs.ghc
There's no reason to wait for non-binary native to *build* cross ghc,
but we want a nix-built GHC for Setup.hs or things won't work.
2018-01-21 23:31:04 -05:00
John Ericson
54ead73271 generic-builder: Make GHC a proper dependency
Rather than just sticking it on the PATH
2018-01-21 23:27:38 -05:00