Commit Graph

136 Commits

Author SHA1 Message Date
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 65138e8a411244c81aefa21be280323d30010b96.
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 d545ef3fa11198f12e525b641aeb33887694f97f. 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 89f5d52cf44baec14a7f542a605243777b16e7a5.
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 8788bfe762ab30952b67e09be2c001a9c022e1e3.
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 dfb0f254844150d05d34150a975e6479b883d409, reversing
changes made to 7f8ff024372f985e96b438fa5591d9b43fc6e7bd. 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 3cb745d5a69018829ac15f7d5a508135f6bda123.

[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 00892b7e4ed2e8eb52227db8e8312a06bd1d6699
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
Charles Strahan
132b503aac
GHCJS packages: avoid inode explosion
As noted in #25595, a change introduced in 4b77d425aa597 causes an
explosion of inodes due to the constructions of many, many `ghcEnv`
symlink forests. This commit undoes that change.

To discuss reworking the support for GHCJS plugins, please see: #26192

Fixes #25595
2017-05-28 14:36:37 -04:00
Judah Jacobson
3ef04024d9 Remove unused local command. 2017-05-07 16:39:50 -07:00
Judah Jacobson
2caa7b88ae Fix use of isDarwin conditionals. 2017-05-05 09:53:08 -07:00
Judah Jacobson
7131e06214 haskell: work around linker limits on Mac OS X Sierra.
The Sierra linker added a limit on the number of paths that any one
dynamic library (`*.dylib`) can reference.  This causes problems when
a Haskell library has many immediate dependencies (#22810).

We follow a similar fix as GHC/Cabal/Stack: for each derivation,
create a new directory with symlinks to all the dylibs of its immediate
dependencies, and patch its package DB to reference that directory
using the new `dynamic-library-dirs` field.

Note that this change is a no-op for older versions of GHC, i.e., they will
continue to fail on some packages as before.

Also note that this change causes the bootstrapped versions of GHC to be
recompiled, since they depend on `hscolour` which is built by
`generic-builder.nix`.

Tested by building the `stack` binary as described in #22810.
2017-05-05 09:26:58 -07:00
Leon Isenberg
e73e5c884f haskell: set LD_LIBRARY_PATH in shellHook
LD_LIBRARY_PATH is considered by GHCI.
Previously e.g. `cabal repl` failed on packages with
system library dependencies.
2017-05-03 15:18:45 +02:00
Jörg Thalheim
26f5fa8f97 Merge pull request #24922 from phunehehe/haskell-shell-hook
haskell-modules: fix shell hook
2017-04-15 12:34:41 +02:00
Hoang Xuan Phu
2fde20e271 haskell-modules: fix shell hook
26623240e93f8454ac69f66a3a025d98a7e94b71 lacks a newline
2017-04-15 16:33:07 +08:00
David Johnson
6f69681dad Add hardening, bump hash to HaLVM 2017-04-14 00:34:02 -05:00
Shea Levy
5e984362f6 haskell generic builder: Use ghcjs's hsc2hs.
This is required when using ghcjs to compile Setup.hs, which we do since #23614.

See comments on c35350a212
2017-04-06 03:16:00 -04:00
Leon Isenberg
2553ceb982 haskell: use GHCJS to build Setup.hs for GHCJS packages
Closes https://github.com/NixOS/nixpkgs/pull/23614.
2017-03-29 20:30:28 +02:00
Jörg Thalheim
d0922896be Merge pull request #23097 from dmjio/halvm
Initial commit of HaLVM support
2017-03-12 18:31:29 +01:00
David Johnson
26623240e9 Init HaLVM at 2.4.0 2017-03-10 19:31:12 -06:00
Peter Simons
060f7cb94d haskell-generic-builder: remove unused nodePackages argument 2017-03-08 09:38:12 +01:00
3noch
4b77d425aa
Fix GHCJS HEAD patch; support GHCJS libdir link; use full ghcEnv for GHCJS
Original:
f3110651c8

(With some tweaks from @cstrahan)

closes #23199
2017-03-02 11:35:11 -05:00
Peter Simons
feffadefed haskell generic-builder: Revert "Pass through the ghcEnv."
This reverts commit a27bc8b3174fa1847b5ca9f85d921c3e472cbeb1. Please don't add
random stuff to the interface provided by the generic builder without
coordinating with others. There is a proper effort underway to provide that
information in https://github.com/NixOS/nixpkgs/pull/23023.
2017-03-01 19:57:40 +01:00
Peter Simons
3001b821c9 haskell generic-builder: Revert "Pass through the list of haskell build inputs."
This reverts commit c153036525575d046fc808a4805d023e3e2e9e75. Please don't add
random stuff to the interface provided by the generic builder without
coordinating with others. There is a proper effort underway to provide that
information in https://github.com/NixOS/nixpkgs/pull/23023.
2017-03-01 19:57:18 +01:00
Shea Levy
c153036525 haskell generic-builder: Pass through the list of haskell build inputs.
Useful for building custom envs.
2017-03-01 13:00:57 -05:00
Shea Levy
a27bc8b317 haskell generic-builder: Pass through the ghcEnv.
Will be useful for nix-buffer
2017-03-01 11:05:50 -05:00