haskell: Fix with-packages-wrapper MacOS linker hack for GHC 8.8#89156
Conversation
|
@soareschen Is this related to #87881 or #78738? It seems like this is similar to #78738, but I don't understand why this PR is so much simpler than #78738. If these are related, it is quite unfortunate we missed updating Is there some sort of common functionality between those two nix files you could factor out into a separate file? |
|
@cdepillabout yes I think this fixes the same issue as #78738 (didn't know about it) but in Nix shells.
This is probably because I gone around Stack Overflow trying to do multi-line pattern matching in |
|
I merged the PR just now. I just trust that you know what you are doing. :-) |
Motivation for this change
with-packages-wrapper.nixhas a hack to workaround the linker limit in MacOS Sierra. However that is now broken with GHC 8.8, because of slight change in the format of the package config. In short, the package config produced by GHC 8.8 has a new line between the key and list of values, while earlier versions have them separated by a single space.For example, in GHC 8.6 the entry is formatted as:
While in GHC 8.8, the entry is formatted as:
This PR fixes the linker hack by modifying the
grepandsedcommands to pattern match on either space or new line, so that the hack can work on all versions of GHC.Things done
sandboxinnix.confon non-NixOS linux)nix-shell -p nixpkgs-review --run "nixpkgs-review wip"./result/bin/)nix path-info -Sbefore and after)This change is