nixpkgs-suyu/pkgs
Michael Peyton Jones 387c513d12 generic Haskell builder: don't copy packages from GHC
In order to build the package databases that we will use when compiling
a Haskell package, we iterate over the relevant dependencies, and if
they contain a package db, we copy its contents over.

So far so good, except when one of those dependencies is GHC. This
doesn't happen ordinarily, but it will happen when we construct the
package database for compiling `Setup.hs`.  This is compiled for the
build architecture, so we get the build deps, including both the native
and the cross GHC (if there is one).

In this case, we end up copying the packages from the GHC's package
database. This is at best unnecessary, since we will get those packages
from the GHC when we compile with it.

At worst, however, this is semantically questionable. We can end up
having multiple copies of e.g. Cabal with the same version, but
(potentially) different contents. At the moment, GHC will expose one of
these at semi-random depending on which one it looks at "first".
However, there is a MR open [in
GHC](https://gitlab.haskell.org/ghc/ghc/merge_requests/545) which as a
side effect will instead expose both, leading to ambiguous module
warnings (which is not unreasonable, since it *is* ambiguous).

So what can we do about it? The simplest solution is just to not copy
the package databases from GHC. GHC is special in this regard, so I
think it's okay to treat it specially.

This PR should have no effect on anything now, but will prevent any
breakage when/if the GHC patch lands.

Closes https://github.com/NixOS/nixpkgs/pull/57706.
2019-03-17 09:21:20 +01:00
..
applications Merge pull request #57761 from dtzWill/update/radiotray-ng-0.2.5 2019-03-17 01:49:15 -05:00
build-support bazel-remote: init at 2019-01-12 2019-03-11 11:10:59 +01:00
common-updater
data ibm-plex: 1.2.3 -> 1.3.0 2019-03-15 00:47:53 -05:00
desktops treewide: stdenv.config -> config 2019-03-14 14:01:21 +00:00
development generic Haskell builder: don't copy packages from GHC 2019-03-17 09:21:20 +01:00
games hedgewars: disable broken build 2019-03-16 20:31:23 +01:00
misc Merge pull request #57553 from Kiwi/vim-plugins-fix 2019-03-14 20:00:02 +01:00
os-specific linux_hardkernel_4_14: 4.14.94-155 -> 4.14.102-156 (#57082) 2019-03-16 00:01:39 +01:00
servers cadvisor: 0.32.0 -> 0.33.0 (#56606) 2019-03-15 21:20:35 +01:00
shells mksh: 56c -> 57 2019-03-10 17:46:59 -07:00
stdenv pkgs/stdenv/booter.nix: fix a typo 2019-03-14 14:01:20 +00:00
test
tools Merge pull request #57540 from dtzWill/update/sqlite-replication-and-dqlite 2019-03-17 00:48:18 -05:00
top-level Merge pull request #57540 from dtzWill/update/sqlite-replication-and-dqlite 2019-03-17 00:48:18 -05:00