Without this patch, attempts to install at least some of the packages
that start to use setupHaskellDepends (mostly gtk-related packages)
results in collisions:
building path(s) ‘/nix/store/63k5smns43f5r2ad8wcc242x0gwd70m3-ghc-8.0.1’
collision between `/nix/store/k18i1nm5hgnb82y9w2g9hmlwhk3szjld-ghc-8.0.1/lib/ghc-8.0.1/Cabal-1.24.0.0/Distribution/Compat/Binary.dyn_hi' and `/nix/store/0rwhbwsg9kmywgbrib2bs29p2hmi80za-Cabal-1.24.0.0/lib/ghc-8.0.1/Cabal-1.24.0.0/Distribution/Compat/Binary.dyn_hi'
builder for ‘/nix/store/vrjkfpm8sb96m9i5k74h8vn0rwddgy4v-ghc-8.0.1.drv’ failed with exit code 25
This would appear to me to be a consequence of setupHaskellDepends
entries being added to propagateBuildInputs. It is sufficient in the
cases I'm familiar with (taffyBar), and I think correct, to simply add
it to the otherBuildInputs.
hydraPlatforms now defaults to the value of meta.platforms rather than
defaulting to ghc.meta.hydraPlatforms. This solution is, in fact, still
sub-optimal. See https://github.com/NixOS/nixpkgs/issues/9608 for further
details.
A derivation of the Hackage package "foo" is called "haskell-foo" if it is a
library, but only "foo" if it is an executable (without a library). This
distinction used to be fine when Haskell packages where visible to operations
like "nix-env -qa" or "nix-env -i", but after our switch to Haskell NG it has
no more purpose. Consequently, this patch removes the name prefix from all
Haskell packages -- every Haskell package is now called exactly like it's
called on Hackage.
Closes https://github.com/NixOS/nixpkgs/pull/9538.
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.
hydra.nixos.org serves broken binaries because of our favorite non-deterministic
package IDs in GHC bug. :-( Re-building everything from scratch seems like the
easiest way to recover.
We disabled this to prevent users from accidentally running nix-build on
an 'env' attribute, but in fact the ability to use those in combination
with "nix-shell -p" is quite useful, so the restriction is lifted.
The updated and jailbroken Cabal file must be in place before the
'patchPhase' hook is run, otherwise we cannot use that hook to patch the
Cabal file! Resolves https://github.com/NixOS/nixpkgs/issues/5922.
As an added bonus, this change makes the "jailbreakPhase" obsolete.
Packages that provide 32 and 64-bit libraries in the same store path are rare
and usually require manual overrides anyway. It seems pointless to try and
guess proper settings for them. The effect is that we'll end up with bogus
settings that take more effort to correct that it takes to configure proper
settings in the first place. Point in case: haskell-cuda and it's configuration
for "cudatools".
Fixes https://github.com/NixOS/nixpkgs/issues/6564.
The presence of this attribute allows us to recognize Haskell derivations.
Furthermore, we can use it to distinguish libraries from executables (which is
useful for the code that's generating the wrapper).
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.