nixpkgs/pkgs/development
Guillaume Bouchard abc4f961b4 haskellPackages.ghcWithPackages: fix for GHC 8.10
This closes #79441.

ghcWithPackages is using `ghc-pkg recache` to build its package
database. By doing so, it overrides the `package.cache[.lock]` files.

Details are unclear, but GHC 8.10 changed a bit the behavior.
Previously, it was unconditionally replacing the files by new ones. Now
it tries to open (for modification) the files. These files are symlinks
to another nix derivation, which is hence read-only.

This commit removes the files before running `ghc-pkg recache`, hence it
will just write the new files.

Tested with `haskellPackages.ghcWithPackages` (i.e. GHC 8.8) and
`haskell.packages.ghc8101.ghcWithPackages` (i.e GHC 8.10) with the
following nix file, at the root of the nixpkgs repository:

```
with import ./. {
  overlays = [
    (
      self: super: {
        haskellPackages = super.haskell.packages.ghc8101.override {
          overrides = selfh: superh: {
             th-lift-instances = super.haskell.lib.doJailbreak superh.th-lift-instances;
             th-expand-syns    = super.haskell.lib.doJailbreak superh.th-expand-syns;
             th-reify-many     = super.haskell.lib.doJailbreak superh.th-reify-many;
             th-orphans        = super.haskell.lib.doJailbreak superh.th-orphans;
             haskell-src-meta  = super.haskell.lib.doJailbreak superh.haskell-src-meta;
          };
        };
      }
  )
  ];
};
haskellPackages.ghcWithPackages(p:[p.PyF])
```

This will test with GHC 8.10. Comment out the `overlays` to test with
GHC 8.8.
2020-04-17 20:50:48 +02:00
..
androidndk-pkgs
arduino Merge pull request #84190 from geistesk/platformio-4.3.1 2020-04-17 11:37:07 +01:00
beam-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
bower-modules/generic
chez-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
compilers ghcHEAD: bump to 8.11.20200403 (#84217) 2020-04-17 20:50:48 +02:00
coq-modules coqPackages.dpdgraph: fix build with OCaml ≥ 4.08 2020-04-13 11:04:26 +02:00
dhall-modules
dotnet-modules/patches
em-modules/generic
go-modules
go-packages buildGoPackage: enable strictDeps 2020-03-28 11:46:38 +00:00
guile-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
haskell-modules haskellPackages.ghcWithPackages: fix for GHC 8.10 2020-04-17 20:50:48 +02:00
idris-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
interpreters Merge pull request #85385 from takikawa/racket-enable-useprefix 2020-04-17 13:17:00 +02:00
java-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
libraries Merge pull request #81955 from r-ryantm/auto-update/poppler-glib 2020-04-17 18:38:20 +02:00
lisp-modules
lua-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
misc Merge pull request #84551 from gnprice/pr-stripDebugList 2020-04-14 15:54:52 +02:00
mobile treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
node-packages postcss-cli: init at 7.1.0 2020-04-17 01:17:07 -04:00
ocaml-modules ocamlPackages.erm_xmpp: 0.3+20180112 -> 0.3+20200317 2020-04-16 15:32:44 +02:00
perl-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
pharo treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
pure-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
python-modules python38.pkgs.python-jsonrpc-server: disable for python38 2020-04-17 11:22:35 +01:00
r-modules R: Update CRAN and bioconductor packages 2020-04-08 10:01:19 -04:00
ruby-modules treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
tools spago: 0.14.0 -> 0.15.1 2020-04-17 20:50:48 +02:00
web nodejs-13_x: 13.12.0 -> 13.13.0 2020-04-14 18:00:00 -05:00