This reverts commit a27bc8b317. 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.
This reverts commit c153036525. 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.
The cycle:
QuickCheck -> semigroups
semigroups -> hashable
semigroups -> unordered-containers
unordered-containers -> hashable
unordered-containers -> QuickCheck # test suite only
hashable -> QuickCheck # test suite only
This reverts commit fd0e0cdc76.
http-streams test suite is no longer broken, but still needs to be
disabled due to cyclic dependencies (http-streams(test) -> snap ->
http-streams)
This reverts commit 17c5ca9018.
This commit causes an evaluation error due to infinite recursion, which can be
tested by running:
```
$ nix-env -f . -qa \* --meta --xml --drv-path --show-trace > /dev/null
```
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.
`haskell.packages.ghcjs.ghcWithHoogle` failed because the following line:
for docdir in ${ghc.doc}/${docLibGlob}/*; do
failed because `doc` is not an attribute of `ghc` when `ghc` is
substituted for ghcjs.
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.
-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.
The callCabal2nix function cannot reliably determine the appropriate "name" for
the package it's processing. Attempts to derive this information have led to
plenty of evaluation errors, and so I'd like to go for the obvious and reliable
solution now and let the caller specify that bit of information.
Here is an example that demonstrates how to use callCabal2nix.
let
pkgs = import <nixpkgs> {};
src = pkgs.fetchFromGitHub {
owner = "gtk2hs";
repo = "gtk2hs";
rev = "eee61d84edf1dd44f8d380d7d7cae2405de50124";
sha256 = "12i53grimni0dyjqjydl120z5amcn668w4pfhl8dxscjh4a0l5nb";
};
in
pkgs.haskellPackages.callCabal2nix "gtkhs-tools" "${src}/tools" {}