nixpkgs/pkgs
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
..
applications sv-kalendar: fix meta 2020-04-17 19:03:26 +01:00
build-support Merge pull request #85172 from andir/buildRustCrate-proc-macro 2020-04-13 23:35:19 +02:00
common-updater common-updater: add update script to all-packages 2020-04-15 23:02:33 -03:00
data fira-code: 3 -> 3.1 2020-04-15 21:15:38 -07:00
desktops Merge pull request #85304 from romildo/common-updater 2020-04-16 08:05:18 -03:00
development haskellPackages.ghcWithPackages: fix for GHC 8.10 2020-04-17 20:50:48 +02:00
games Merge pull request #85284 from andersk/system-syzygy 2020-04-16 02:23:33 -04:00
misc higan: 106 -> 110 2020-04-15 12:27:44 -03:00
os-specific linux: 5.4.32 -> 5.4.33 2020-04-17 08:34:01 -04:00
servers mautrix-whatsapp: 2020-04-02 -> 2020-04-12 2020-04-17 00:28:13 +02:00
shells nix-zsh-completions: 0.4.3 -> 0.4.4 (#85267) 2020-04-15 12:00:14 +02:00
stdenv treewide: Per RFC45, remove all unquoted URLs 2020-04-10 17:54:53 +01:00
test
tools Merge pull request #81955 from r-ryantm/auto-update/poppler-glib 2020-04-17 18:38:20 +02:00
top-level ghcHEAD: bump to 8.11.20200403 (#84217) 2020-04-17 20:50:48 +02:00