3
0
Fork 0
forked from mirrors/nixpkgs
Commit graph

37 commits

Author SHA1 Message Date
Shea Levy a6c39ed207 haskell-lib: Add overrideSrc helper 2017-04-08 16:21:57 -04:00
Bas van Dijk c865b8e35e haskell: add the linkWithGold function to link packages with ld.gold
Also support linking the double-conversion package with ld.gold.
2017-04-07 09:44:11 +02: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
Domen Kožar db23fe1581
haskell: add justStaticExecutables combinator 2017-03-07 18:13:59 +01:00
Domen Kožar e649974271 Merge pull request #22613 from shajra/fix/9871-3
Haskell infrastructure: fix #9871 (overrideCabal)
2017-02-27 12:54:27 +01:00
Bas van Dijk 8a928708b4 haskell: add support for Haskell Program Coverage (HPC) to the generic builder
A function is added to enable the generation of a HPC report. For example:

  pkgs.haskell.lib.doCoverage drv

will create a HPC report of the Haskell package drv in the directory:

  $out/share/hpc

Closes https://github.com/NixOS/nixpkgs/pull/22797/files.
2017-02-15 16:17:41 +01:00
Sukant Hajra 98617ccb99 Haskell infrastructure: fix #9871 (overrideCabal)
As per the recommendation by @Mathnerd314, this change seems to work
with the testing I did.

It makes sense to me why it works, but I think it's in an important
enough place that someone with much deeper knowledge of Haskell
infrastructure in Nixpkgs should give it a really heavy review.

I also consolidated all the overrideCabal definitions (there were two)
into a single definition in haskell-modules/lib.nix.
2017-02-09 23:07:40 -06:00
Domen Kožar f031f3105a
GHC 8.0.2: use -split-sections
-split-sections replaced -split-objs with following upsides:

1) -split-objs adds considerable overhead to compile time

2) combined with stripping, it causes issues when cross-compiling

For upstream see https://ghc.haskell.org/trac/ghc/ticket/8405

This is supported only for Linux/Windows using ld linker.

GHC master also turns on -split-sections by default.

Example using stack:

Without splitting

  $ du /nix/store/5paayhibayr73zqfaj458g4k4mv108jn-stack-1.3.2
  4       /nix/store/5paayhibayr73zqfaj458g4k4mv108jn-stack-1.3.2/share/bash-completion/completions
  4       /nix/store/5paayhibayr73zqfaj458g4k4mv108jn-stack-1.3.2/share/bash-completion
  4       /nix/store/5paayhibayr73zqfaj458g4k4mv108jn-stack-1.3.2/share
  23416   /nix/store/5paayhibayr73zqfaj458g4k4mv108jn-stack-1.3.2/bin
  23420   /nix/store/5paayhibayr73zqfaj458g4k4mv108jn-stack-1.3.2

With -split-objs

  $ du /nix/store/fypymm529adpx71gdzm0851xz42wdbz0-stack-1.3.2
  20632   /nix/store/fypymm529adpx71gdzm0851xz42wdbz0-stack-1.3.2/bin
  4 /nix/store/fypymm529adpx71gdzm0851xz42wdbz0-stack-1.3.2/share/bash-completion/completions
  4 /nix/store/fypymm529adpx71gdzm0851xz42wdbz0-stack-1.3.2/share/bash-completion
  4       /nix/store/fypymm529adpx71gdzm0851xz42wdbz0-stack-1.3.2/share
  20636   /nix/store/fypymm529adpx71gdzm0851xz42wdbz0-stack-1.3.2

With -split-sections

  $ du /nix/store/40l6krinx1zx41lr87c4m12hxj4ldf3x-stack-1.3.2
  4       /nix/store/40l6krinx1zx41lr87c4m12hxj4ldf3x-stack-1.3.2/share/bash-completion/completions
  4       /nix/store/40l6krinx1zx41lr87c4m12hxj4ldf3x-stack-1.3.2/share/bash-completion
  4       /nix/store/40l6krinx1zx41lr87c4m12hxj4ldf3x-stack-1.3.2/share
  20672   /nix/store/40l6krinx1zx41lr87c4m12hxj4ldf3x-stack-1.3.2/bin
  20676   /nix/store/40l6krinx1zx41lr87c4m12hxj4ldf3x-stack-1.3.2

Note: you currently need following overrides to build stack on 802:

   vector-algorithms = dontCheck super.vector-algorithms;
   path-io = doJailbreak super.path-io;
   stack = doJailbreak super.stack;

Note: Should also work on GHC 8.0.1, but I'm being careful here.
      We could backport later on.
2017-02-07 14:21:54 +01:00
Peter Simons 97fd905823 haskell: add support for 'hardeningDisable' to the generic builder
We also have a new helper function 'disableHardening' to use in
overrides. Fixes https://github.com/NixOS/nixpkgs/issues/14820.
2016-09-15 09:12:03 +02:00
Peter Simons 8d86c8274f callHackage: generate expressions for the appropriate target system and compiler 2016-06-13 23:09:56 +02:00
Peter Simons 52aad6c77d haskell.lib.withHoogle: remove obsolete function 2016-06-12 08:37:06 +02:00
Mathieu Boespflug b1b85ddb81 buildStackPackage: Fix path to generic-stack-builder.nix.
Before:

```
error: getting status of
‘/home/user/nixpkgs/pkgs/development/development/haskell-modules/generic-stack-builder.nix’:
No such file or directory
```
2016-03-06 10:35:25 +01:00
Peter Simons 86d0a9c420 haskell.lib: fix use of callPackage 2016-03-04 22:17:53 +01:00
Mathieu Boespflug 7fedb7c992 Move buildStackProject to haskell.lib. 2016-03-04 21:24:42 +01:00
Peter Simons c58c68a037 haskell.lib.addPkgconfigDepends: fix broken function
The function is supposed to modify pkgconfigDepends, not buildInputs.
2015-12-17 00:32:16 +01:00
Peter Simons 7802f5c793 haskell.lib: add doDistribute function as a dual to dontDistribute 2015-09-15 16:23:46 +02:00
Peter Simons 78f1720532 haskell-lib: make sdistTarball and buildStrictly functions fuzzier to cope with Hydra builds
In Hydra CI environments, the version strings we get from Hydra don't
necessarily match those hard-coded into the Cabal files. To make those builds
succeed anyway, we have to apply some pattern matching.
2015-08-30 15:20:21 +02:00
Jan Malakhovski c80af74a84 haskell-packages: throw withHoogle away from the lib 2015-08-18 19:56:17 +00:00
Jan Malakhovski 0013743845 haskell-packages: make hoogle wrapper much more helpful
* Build most of the stuff on /tmp, not in /nix/store.
* Generate hoogle database for all the dependencies.
* Generate haddock index and contents files.
* Cleanup.
2015-08-18 19:56:17 +00:00
Peter Simons 7bcc1bfc11 haskell: add 'addPkgconfigDepend' combinator to lib.nix 2015-08-07 15:13:13 +02:00
Charles Strahan 3859f7bdab haskell-ng: hoogleLocal support 2015-06-11 20:25:31 -04:00
Peter Simons 0520540018 haskell-bytestring-builder: trigger rebuild with GHC 7.8.x to mitiagate broken library ID 2015-06-07 00:09:06 +02:00
Peter Simons ba809cf9a3 haskell: add three new helper functions to the lib module
- sdistTarball transforms a normal Haskell build into one that produces a
   release tarball by running "sdist". For example:

     $ nix-shell -p "haskell.lib.sdistTarball haskellPackages.mtl" --command 'tar tfv $nativeBuildInputs/*tar.gz'

 - buildFromSdist transforms a normal Haskell build into one that compiles the
   package the an sdist release tarball created by Nix. For example:

     $ nix-shell -p "haskell.lib.buildFromSdist haskellPackages.mtl" --command "exit 0"

 - buildStrictly transforms a normal Haskell build into one that (a) compiles
   the source code with "-Wall -Werror" flags and (b) uses as input a locally
   generated sdist release tarball. For example:

     $ nix-shell -p "haskell.lib.buildStrictly haskellPackages.mtl" --command "exit 0"

   This function is particularly useful for continuous Hydra builds of Haskell
   packages.
2015-06-02 14:17:16 +02:00
Peter Simons 36a2361976 haskell-ng-lib: add combinators for enabling/disabling source hyper-linking 2015-04-01 22:54:45 +02:00
Peter Simons f145201b35 git-annex: disable shared linking for this executable
git-annex has literally dozens of dependencies, and loading all of them
at run-time can be slow (https://github.com/NixOS/nixpkgs/issues/4239).
2015-02-06 13:59:57 +01:00
Peter Simons 353e276937 haskell-mikmod: fix build 2015-02-03 12:46:39 +01:00
Peter Simons d49671c924 haskell-ng.lib: add markBrokenVersion and appendPatch helper functions 2015-01-23 11:32:48 +01:00
Peter Simons 1d6d5932cd haskell-streaming-commons: fix build on older GHC versions some more 2015-01-20 23:56:56 +01:00
Peter Simons f8710f9d81 haskell-ng: fix several builds with old versions of GHC 2015-01-19 23:15:29 +01:00
Peter Simons 380114738f haskell-ng: rename "noHaddock" attribute to "doHaddock"
This makes the attribute (a) consistent with "doCheck" and friends and (b)
avoids the double negation "noHaddock = false" meaning "doHaddock = true".

Fixes https://github.com/NixOS/cabal2nix/issues/63.
2015-01-18 12:58:31 +01:00
Peter Simons e4a68f0b98 haskell-ng: add more tools to our help function library 2015-01-13 12:44:53 +01:00
Shea Levy d30e9082bb D'oh 2015-01-12 12:20:42 -05:00
Shea Levy 3f714f32ac overrideCabal: Preserve overrideScope attr 2015-01-12 12:18:46 -05:00
Peter Simons 36b5b900db haskell-modules-lib: add 'markBroken' helper function 2015-01-12 16:35:14 +01:00
Peter Simons 87eba920fa haskell-lib.nix: fix doCheck helper 2015-01-12 01:28:15 +01:00
Peter Simons 55003ca34b pkgs/development/haskell-modules/lib.nix: add funky helper function for overriding 2015-01-10 23:36:59 +01:00
Peter Simons 54baa53df1 Say hello to our brand-new Haskell infrastructure. 2015-01-07 23:45:21 +01:00