Commit Graph

154 Commits

Author SHA1 Message Date
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
Drew Hess
e4f3fe051e ghc, haskell-modules: ARM cross build fixes.
As requested in #33405.
2018-01-11 10:45:44 -05:00
Drew Hess
260749cf5d
haskell-modules: split-objs is not supported on ARM. 2018-01-03 16:00:26 -08:00
John Ericson
bc066466fb haskell generic-builder: Don't use absolute path to tools, and also track strip 2018-01-02 21:04:14 -05:00
John Ericson
a224dfc253 haskell infra: Fix cross as much as possible without changing hashes 2018-01-02 21:00:13 -05:00
Frederik Rietdijk
804285f589 Merge remote-tracking branch 'upstream/staging' into HEAD 2018-01-02 19:10:45 +01:00
Shea Levy
34a91b7922
haskell: Fix depending on libs with internal libs on darwin.
Thanks to @hamishmack for the pointer.

Fixes #33149.
2018-01-02 11:37:54 -05:00
John Ericson
4d2b763817
Merge pull request #26805 from obsidiansystems/cross-elegant
Make cross compilation elegant
2017-12-30 22:58:02 -05:00
John Ericson
e0f1739c75 treewide: Don't use nativePkgs or crossPkgs anymore 2017-12-30 22:04:22 -05:00
Peter Simons
016aa581a7 haskell: extend generic builder to recognize mis-configured Cabal 2.x builds
Cabal 1.x says:

 | Warning: This package indirectly depends on multiple versions of the same
 | package. This is highly likely to cause a compile failure.

But in version 2.x, that warning is split into two lines differently:

 | Warning:
 |     This package indirectly depends on multiple versions of the same package. This is very likely to cause a compile failure.

This commit modifies the call to "egrep" to recognize both versions by virtue
of the "-z" flag, which essentially interprets the whole configure-time output
as one long line.
2017-12-30 13:53:05 +01:00
Peter Simons
4a01a175a3
Merge pull request #33158 from shlevy/hslib-haskell-build-inputs-again
Revert "Revert "hslib: Function to extract the haskell build inputs of a package.""
2017-12-29 20:51:24 +01:00
Shea Levy
1ee61d8f23
Revert "Revert "hslib: Function to extract the haskell build inputs of a package.""
Trying again, without changing the generic builder.

This reverts commit 65138e8a41.
2017-12-29 14:37:24 -05:00
Peter Simons
65138e8a41 Revert "hslib: Function to extract the haskell build inputs of a package."
This reverts commit d545ef3fa1. Please don't
commit substantial changes to the generic Haskell builder without giving me a
chance to review them.
2017-12-28 19:23:41 +01:00
Shea Levy
d545ef3fa1
hslib: Function to extract the haskell build inputs of a package.
This works by extracting out some logic from generic-builder.nix to
make it possible to get at the relevant information by overriding
mkDerivation for the haskell package.
2017-12-23 11:44:18 -05:00
Shea Levy
b6d215aa79
haskell generic-builder: Support installing internal libs.
Fixes #32980.
2017-12-22 19:44:37 -05:00
Thomas Tuegel
86311030cf
haskell: set buildInputs in nix-shell env
systemBuildInputs goes in buildInputs (instead of nativeBuildInputs) so that
NIX_CFLAGS_* is set correctly and gcc works.
2017-12-18 13:49:18 -06:00
Peter Simons
8d8061ec20
Revert "Revive multiple outputs for Haskell packages." 2017-12-05 09:36:08 +01:00
Nicholas Clarke
d90165c7db Revert "Revert "Merge pull request #27209 from nc6/nc/haskell-multiple-out""
This reverts commit 89f5d52cf4.
2017-11-27 16:05:22 +00:00
Jude Taylor
737b466031 fix ghcjs socket.io 2017-11-01 12:16:48 +01:00
John Ericson
139b4cd0e3 haskell generic-builder: Fix pkg-config dependency
It should be a nativeBuidInput
2017-09-21 15:49:55 -04:00
Peter Simons
33e34aa95b haskell-generic-builder: rename withBenchmarkDepends argument to doBenchmark
This partially undoes the change from 8788bfe762.
The 'doBenchmark' name is more consistent with the naming scheme used for
other phases, like 'doCheck', 'doHaddock', etc.
2017-09-19 15:42:51 +02:00
Peter Simons
89f5d52cf4 Revert "Merge pull request #27209 from nc6/nc/haskell-multiple-out"
This reverts commit dfb0f25484, reversing
changes made to 7f8ff02437. These changes broke
the ghcWithPackages wrapper:

    nix-shell -p "haskellPackages.ghcWithPackages (ps: [ps.mtl])" --run "ghc-pkg list mtl"
    /nix/store/szz84j5k1dy3jdashis6ws28d8l8zxxb-ghc-8.0.2-with-packages/lib/ghc-8.0.2/package.conf.d
        (no packages)
2017-09-06 10:19:18 +02:00
Nicholas Clarke
be90e9aa31 Fix broken rebase. 2017-09-04 12:35:58 +01:00
Nicholas Clarke
8c642d5937 Provide hscolour, happy, alex bin to buildInputs.
Use stdenv.lib.getBin instead of `.bin`
2017-09-04 12:35:57 +01:00
Nicholas Clarke
676362494d Enable multiple outputs for Haskell packages. 2017-09-04 12:35:57 +01:00
Peter Simons
5468d5c662 Merge pull request #27991 from Profpatsch/hoogleLocal-fix
Fix the `ghcWithHoogle` function to cope with the presence of separate `doc` outputs.
2017-08-19 16:26:30 +02:00
davidak
3270aa896b replace "Mac OS X" and "OS X" with "macOS"
as it is the official name since 2016

https://en.wikipedia.org/wiki/Macintosh_operating_systems#Desktop

exception are parts refering to older versions of macOS like

"GUI support for Mac OS X 10.6 - 10.12. Note that Emacs 23 and later [...]"
2017-08-07 21:41:30 +02:00
Profpatsch
e9e25ec5fe pkgs/haskell-modules: expose haddockDir as passthru variable
WIP

If the `hoogle.nix` file wants to have any sane chance of finding haddock
outputs, the packages need to export the haddock folders as an identifier.

A few TODOs still stand, like passing self to the package instead of needing to
pass it to `haddockDir`. Maybe the exported identifier should be integrated into
the fixpoint somehow instead of using `passthru`?
2017-08-06 21:48:22 +02:00
Profpatsch
3f27a36912 pkgs/haskell-modules: two small vanity fixes 2017-08-06 21:46:49 +02:00
Franz Pletz
b116fa5ff2
Merge branch 'master' into staging 2017-07-28 16:08:30 +02:00
michael bishop
be63b1994d enable split-output builds for all haskellPackages 2017-07-27 09:12:06 +02:00
John Ericson
9be40841ea Merge remote-tracking branch 'upstream/master' into staging-base
Conflicts:
	pkgs/build-support/cc-wrapper/default.nix
	pkgs/build-support/gcc-wrapper-old/builder.sh
	pkgs/build-support/trivial-builders.nix
	pkgs/desktops/kde-4.14/kde-package/default.nix
	pkgs/development/compilers/openjdk-darwin/8.nix
	pkgs/development/compilers/openjdk-darwin/default.nix
	pkgs/development/compilers/openjdk/7.nix
	pkgs/development/compilers/openjdk/8.nix
	pkgs/development/compilers/oraclejdk/jdk-linux-base.nix
	pkgs/development/compilers/zulu/default.nix
	pkgs/development/haskell-modules/generic-builder.nix
	pkgs/misc/misc.nix
	pkgs/stdenv/generic/builder.sh
	pkgs/stdenv/generic/setup.sh
2017-07-26 13:46:04 -04:00
John Ericson
ea7d13cf1a stdenv-setup and misc hooks: Work with bash-3.4 for MacOS nix-shell
This is a temporary measure until this impurity is removed from Nix.
2017-07-26 09:08:01 -04:00
John Ericson
f6f40e3fe5 stdenv-setup and misc pkgs: Revert to space-deliminated propagated-* files
We cannot switch to line-delimited yet, because certain Nix commands do
not read in the entire file, but just the first line.
2017-07-26 09:07:55 -04:00
Peter Simons
27ca0cb3d4 haskell-generic-builder: fix syntax high-lightning in Emacs 2017-07-26 10:17:48 +02:00
Peter Simons
e69c7f5641 haskell-generic-builder: include setupHaskellDepends in the generated "env" attribute
We achieve this by moving setupHaskellDepends from the buildInputs attribute
into "otherBuildInputs", which is the attribute the builder uses to construct
the build inputs in both the actual build as well as the "env" attribute.
2017-07-26 10:17:48 +02:00
John Ericson
b087618ac0 Revert "stdenv: Store one package per line in nix-support/propagated-*"
As @oxij points out in [1], this breakage is especially serious because
it changes the contents of built environments without a corresonding
change in their hashes. Also, the revert is easier than I thought.

This reverts commit 3cb745d5a6.

[1]: https://github.com/NixOS/nixpkgs/pull/27427#issuecomment-317293040
2017-07-24 01:05:30 -04:00
John Ericson
8d76effc17 stdenv-setup: Make the package accumulators associative arrays instead of strings
This is generally cleaner: less eval, less worrying about separators,
and probably also faster. I got the idea from that python wrapper
script.
2017-07-12 15:30:56 -04:00
John Ericson
3cb745d5a6 stdenv: Store one package per line in nix-support/propagated-*
This makes those files a bit easier to read. Also, for what it's worth,
it brings us one baby step closer to handling spaces in store paths.

Also, I optimized handling of many transitive deps with read. Probably,
not very beneficial, but nice to enforce the pkg-per-line structure.
Doing so let me find much dubious code and fix it.

Two misc notes:

 - `propagated-user-env-packages` also needed to be adjusted as
   sometimes it is copied to/from the propagated input files.

 - `local fd` should ensure that file descriptors aren't clobbered
   during recursion.
2017-07-10 13:32:13 -04:00
Peter Simons
8ddaef6ddf haskell: fix logic error in generic builder introduced in 00892b7e4e
Closes https://github.com/NixOS/nixpkgs/issues/26760.
2017-06-23 12:49:36 +02:00
John Ericson
8a8f0408cd generic-builder: use buildInputs for Haskell dependencies
This actually will matter when I (soon) land cross-compilation support,
and native deps are compiled for the build, instead of host, platform.
But even now, it's good style do this, and one less thing to review
later.

The use of `$nativePkgs` is unfortunate, as it will need to be
swapped out for `$crossPkgs` for build != host builds. This will just a
temporarily cause pain, however, as eventually I will change stdenv to
use a `$runPkgs` (or moral equivalent) in both case.

Closes https://github.com/NixOS/nixpkgs/pull/26480.
2017-06-16 20:18:38 +02:00
David Johnson
00892b7e4e generic-builder.nix: Update doHaddock
By default, `ghcjs` haddocks are precluded from being built. I see no reason to disallow building haddocks on projects built with `ghc` and `ghcjs` (someone can correct me here). `HaLVM` currently does not support `haddock` since it's a Stage 1 `GHC`. https://github.com/GaloisInc/HaLVM/blob/master/src/misc/build.mk.in#L20

Currently, building `haddocks` for `ghcjs` projects requires altering the derivation, which doesn't allow users to take advantage of the cache. This change will relieve that.
2017-06-09 10:04:34 -07:00