Commit graph

53 commits

Author SHA1 Message Date
sternenseemann 9a2e728831 ghcWithPackages: set withLLVM if hostPlatform is not x86_64
We also don't add LLVM on PowerPC as GHC should have the ability to
generate native code for that platform itself.

Resolves #116235.
2021-05-03 10:42:52 +02:00
John Ericson 07ecf87693 treewide: Fix various tools wrappers "with packages"
Now that `buildEnv` is ready, always put `makeWrapper` in
`nativeBuildInputs`, rather than `buildInputs` or (worse) mucking around
with setup hooks by hand.

(C.f. #112276, which didn't catch these because the manual setup hook
sourcing is such a hack to being with!)

Fixes #114687
2021-03-02 22:38:04 +00:00
Malte Brandy ae73fa0d56 haskellPackages.ghc.withPackages: Remove obsolete ghcide wrapper 2020-09-18 21:50:29 +02:00
Malte Brandy af017c431a
haskellPackages.haskell-language-server: 0.2.0 -> 0.3.0
While we are at it I:
* Disable tests, because I can‘t keep up with the speed hls introduces
more tests that cause trouble in nixpkgs.
* Fix builds of fourmolu and retrie
* Remove the wrapper for hls which is obsolete because of improved
package detection in hie-bios. And added a note that this can be removed
for ghcide soon, too.
2020-08-16 13:57:18 +02:00
Malte Brandy ac8c823955 ghc.withPackages: Wrap hls with package lookup env 2020-07-24 13:02:55 +02:00
Malte Brandy 4e67e3da06 ghc.withPackages: Add wrapper for ghcide 2020-06-05 21:58:25 +02:00
Soares Chen 32d2de8e00 haskell: Fix with-packages-wrapper MacOS linker hack for GHC 8.8
`with-packages-wrapper.nix` has a hack to workaround the linker limit
in MacOS Sierra. However that is now broken with GHC 8.8, because of
slight change in the format of the package config.
In short, the package config produced by GHC 8.8 has a new line between
the key and list of values, while earlier versions have them separated
by a single space.

This PR fixes the linker hack by modifying the `grep` and `sed` commands
to pattern match on either space or new line, so that the hack can work
on all versions of GHC.
2020-05-29 22:28:47 +02:00
Guillaume Bouchard abc4f961b4 haskellPackages.ghcWithPackages: fix for GHC 8.10
This closes #79441.

ghcWithPackages is using `ghc-pkg recache` to build its package
database. By doing so, it overrides the `package.cache[.lock]` files.

Details are unclear, but GHC 8.10 changed a bit the behavior.
Previously, it was unconditionally replacing the files by new ones. Now
it tries to open (for modification) the files. These files are symlinks
to another nix derivation, which is hence read-only.

This commit removes the files before running `ghc-pkg recache`, hence it
will just write the new files.

Tested with `haskellPackages.ghcWithPackages` (i.e. GHC 8.8) and
`haskell.packages.ghc8101.ghcWithPackages` (i.e GHC 8.10) with the
following nix file, at the root of the nixpkgs repository:

```
with import ./. {
  overlays = [
    (
      self: super: {
        haskellPackages = super.haskell.packages.ghc8101.override {
          overrides = selfh: superh: {
             th-lift-instances = super.haskell.lib.doJailbreak superh.th-lift-instances;
             th-expand-syns    = super.haskell.lib.doJailbreak superh.th-expand-syns;
             th-reify-many     = super.haskell.lib.doJailbreak superh.th-reify-many;
             th-orphans        = super.haskell.lib.doJailbreak superh.th-orphans;
             haskell-src-meta  = super.haskell.lib.doJailbreak superh.haskell-src-meta;
          };
        };
      }
  )
  ];
};
haskellPackages.ghcWithPackages(p:[p.PyF])
```

This will test with GHC 8.10. Comment out the `overlays` to test with
GHC 8.8.
2020-04-17 20:50:48 +02:00
Peter Simons 4a2aad0d39
Revert "haskell/with-packages-wrapper.nix: install "doc" outputs" 2020-01-10 15:20:08 +01:00
Matthew Bauer 93aabab760 haskell/with-packages-wrapper.nix: remove /bin symlink if it exists
The wrapper need a writable directory to work, so remove the symlink
to a read-only one if it occurs.
2020-01-06 18:25:50 -05:00
Matthew Bauer e915608618 haskell/with-packages-wrapper.nix: install "doc" outputs
We were previously just installing the "out" output which broke when
we recently changed to generating multiple outputs.

Fixes #76837
2020-01-02 16:12:46 -05:00
John Ericson 0828e2d8c3 treewide: Remove usage of remaining redundant platform compatability stuff
Want to get this out of here for 18.09, so it can be deprecated
thereafter.
2018-08-30 17:20:32 -04:00
Matthew Bauer e01db49bfa ghcjs-ng: Move to $out/lib/ghcjs-8.4
This is standard for ghc compilers & much more convenient. This seems
to fix the issues we have been having in ghcjs pkgs.

Fixes #42032
Fixes #42617
2018-06-26 17:43:58 -04:00
Matthew Bauer 34f57ac837 haskell: fix with-packages-wrapper in ghcjs
Fixes #42032
Fixes #42070
2018-06-18 20:17:06 -04:00
Sarah Brofeldt 2956cc8760 haskellPackages.ghcWithPackages: Wrap haddock with GHC lib dir 2018-03-15 20:16:54 +01:00
Peter Simons 13dda44b8b haskell-with-packages-wrapper: don't bother with extraOutputsToInstall
symlinkJoin doesn't recognize this parameter, so this functionality has been
broken ever since 4b77d425aa.
2018-02-09 20:26:35 +01:00
Peter Simons e30ecaa916
Merge pull request #33636 from hamishmack/haskell-internal-libs-darwin2
haskell: Fix depending on libs with internal libs on darwin.
2018-01-12 16:09:56 +01:00
Hamish Mackenzie d3eaa5a4de haskell: Fix depending on libs with internal libs on darwin. 2018-01-09 14:43:13 +13:00
John Ericson ec2f121bed ghcWithPackages: Fix comment URL 2018-01-04 14:49:52 -05:00
John Ericson dea9fceb0b ghcWithPackages: Get rid of unused passthrough
If you want the whole packages set...don't use ghcWithPackages.
2018-01-04 14:49:50 -05:00
John Ericson 6bdf9a7f6d ghcWithPackages: Don't bother with ignoreCollisions cause we don't use buildEnv
SymlinkJoin doesn't know or care about this.
2018-01-04 11:45:36 -05:00
John Ericson 5e31e828f8 ghcWithPackages: Fix cross, and avoid needless C compiler 2018-01-03 01:24:57 -05:00
John Ericson a224dfc253 haskell infra: Fix cross as much as possible without changing hashes 2018-01-02 21:00:13 -05:00
Peter Simons 8d8061ec20
Revert "Revive multiple outputs for Haskell packages." 2017-12-05 09:36:08 +01:00
Nicholas Clarke dc0e594451 Fix 'ghcWithPackages' as per https://github.com/NixOS/nixpkgs/issues/32082 2017-11-27 16:09:03 +00:00
Jude Taylor 737b466031 fix ghcjs socket.io 2017-11-01 12:16:48 +01: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
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
David Johnson 26623240e9 Init HaLVM at 2.4.0 2017-03-10 19:31:12 -06: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 656707ef80 Merge pull request #21916 from Profpatsch/ghcWithPackages-docs
haskell: add doc outputs to with-packages-wrapper.nix
2017-01-16 10:58:06 +01:00
Profpatsch 546d0c0460 haskell: add doc outputs to with-packages-wrapper.nix
We want to have all doc outputs as well (also e.g. ghc documentation).
Adds a bit of documentation to the postInstall script.
2017-01-16 00:13:13 +01:00
Shea Levy a798850675 ghc with-packages-wrapper: Add support for cross-compiling 2017-01-13 21:21:21 -05:00
Profpatsch 499e4e6393 ghc.withPackages: amend the derviation name
Provide a clear difference between the compiler itself and link farms containing
additional packages.
2016-11-17 16:48:53 +01:00
Nikolay Amiantov 8b7ebaffeb replace makeSearchPath tree-wise to take care of possible multiple outputs 2016-04-13 22:09:41 +03:00
Charles Strahan 3859f7bdab haskell-ng: hoogleLocal support 2015-06-11 20:25:31 -04:00
Charles Strahan 929dc4199a ghcjs: properly wrap binaries in environment
This also:

 1  Builds Setup.hs with ghcjs, which (among other things) defines
    __GHCJS__ and ghcjs_HOST_OS during pre-processing.
 2  Fixes ghc-paths to point at ghcjs and use NIX_GHCJS_* env-vars.
 3  Boots ghcjs into $prefix/lib/$compiler.
2015-05-08 11:33:44 -04:00
Peter Simons c449a930aa ghcWithPackages: add postBuild hook so that users can mess with the generated environment
postBuild can be used to execute user-specific commands on the generated $out
environment before finalizing the build. For example, this hook can be used to
generate appropriate 'makeWrapper' script for binaries contained in the
environment.
2015-04-28 13:17:44 +02:00
Charles Strahan 3d60f6401f haskell: fix GHC version check for GHCJS
closes #7137
2015-04-03 18:54:18 -04:00
Nikolay Amiantov 8943ffcd2b ghcWithPackages: restore old style (without 'with') 2015-03-29 13:15:39 +03:00
Peter Simons 028779fb40 ghcWithPackages: fix isGhcjs evaluation even some more
This is harder than I would have thought.
2015-03-29 11:02:31 +02:00
Peter Simons b1e854d660 ghcjs: fix evaluation error in with-packages-wrapper.nix some more 2015-03-29 03:34:04 +02:00
Peter Simons 2502b53743 ghcjs: fix emacs syntax highlighting 2015-03-29 03:34:04 +02:00
Peter Simons 8c16648f56 ghcjs: fix evaluation error in with-packages-wrapper.nix 2015-03-29 03:34:04 +02:00
Charles Strahan d590a0f4b6 ghcjs: support for Haskell-NG
closes #5828
closes #6786
2015-03-29 03:34:04 +02:00
Nikolay Amiantov 49f3c375b5 ghcWithPackages: add withLLVM 2015-03-26 11:29:05 +01:00
Peter Simons aeadb16444 ghcWithPackages: don't re-generate the packages.conf.d cache if there are no actual libraries added to the environment
This change resolves https://github.com/NixOS/nixpkgs/issues/6419.
2015-02-22 22:13:10 +01:00
Peter Simons 54bbfd5440 haskell-generic-builder: re-factor for improved modularity 2015-01-17 20:29:00 +01:00
Peter Simons afca6145d4 haskell-generic-builder: simplify "package.conf.d" management
The builder creates a temporary package.conf.d database in $TMP that
contains everything required to build the current package (i.e. the
transitive closure of the package's propagated build inputs). These
files are no longer installed, however, we just install the package.conf
file for the package we're actually building. This means that
package.conf.d directory in $out won't have collisions anymore, which
simplifies the with-packages-wrapper.nix a bit.
2015-01-10 15:55:47 +01:00