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.
I thought that [1] could be fixed by ensuring that ncurses is available in the
environment (because ghc exports it as a propagateBuildInput), and indeed that
change fixed *some* build failures we've had before. However, the same error
still occurs with other packages, like hledger [2] and Agda [3]. Frankly, I
have no idea why those packages fail and others don't. But clearly the fix was
inadequate, so I'm reverting commit a8076c76.
[1] https://github.com/NixOS/nixpkgs/issues/5616
[2] http://hydra.cryp.to/build/372451/nixlog/1/raw
[2] http://hydra.cryp.to/build/373161/nixlog/1/raw
Required adding a flag to the generic builder to build Setup.hs with
core packages even if there is an override in buildInputs, to break
circular dependencies.
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.