nixpkgs/pkgs/development/haskell-modules
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
..
patches haskellPackages.xattr: fix build with attr-2.4.48 (see ##53716) 2019-03-09 17:37:46 +01:00
configuration-common.nix haskell-pandoc: update overrides for the new 2.7.1 version 2019-03-16 20:31:23 +01:00
configuration-ghc-8.2.x.nix ghc-8.4.4: use sphinx 1.7.x to build the documentation 2019-02-27 21:08:49 +01:00
configuration-ghc-8.4.x.nix purescript: fix build compiling with ghc 8.4.4 2019-03-06 08:36:52 +01:00
configuration-ghc-8.6.x.nix Merge pull request #56138 from jacereda/psqueues-check-86 2019-02-21 11:53:05 +01:00
configuration-ghc-head.nix Merge pull request #56137 from jacereda/cereal-check-head 2019-02-21 11:54:11 +01:00
configuration-ghcjs.nix haskell-stm: update overrides for the new 2.5.x version 2018-09-24 21:19:35 +02:00
configuration-hackage2nix.yaml LTS Haskell 13.13 2019-03-16 20:30:58 +01:00
configuration-nix.nix Merge branch 'master' into staging-next 2019-02-22 17:51:01 +01:00
configuration-tensorflow.nix haskellPackages.tensorflow-mnist: fix missing dependency on tensorflow-mnist-input-data 2018-09-06 09:15:56 +02:00
default.nix haskell: have a dedicated file for non Hackage packages 2018-10-12 14:12:29 +02:00
generic-builder.nix generic Haskell builder: don't copy packages from GHC 2019-03-17 09:21:20 +01:00
generic-stack-builder.nix haskell.buildStackProject: use setup hook 2019-01-07 21:28:53 -06:00
hackage-packages.nix hackage-packages.nix: automatic Haskell package set update 2019-03-16 20:31:23 +01:00
hoogle-local-wrapper.sh
hoogle.nix [bot] treewide: remove unused 'inherit' in let blocks 2018-07-20 19:38:19 +00:00
initial-packages.nix Remove HIE package set until automation can be put in place. 2018-03-23 10:06:58 -04:00
lib.nix haskell generic builder: Add flag to allow inconsistent dependencies. 2018-12-15 13:31:08 -05:00
make-package-set.nix Overrides can be passed to callHackageDirect 2019-01-27 12:28:01 -05:00
non-hackage-packages.nix futhark: remove obsolete non-hackage package 2019-01-06 22:56:29 +01:00
stack-hook.sh stack-hook: deduplicate better 2019-03-02 02:21:32 -05:00
with-packages-wrapper.nix treewide: Remove usage of remaining redundant platform compatability stuff 2018-08-30 17:20:32 -04:00