-
Notifications
You must be signed in to change notification settings - Fork 86
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Update haskell.nix and fix windows cross
Currently the use of nonReinstallablePkgs to make the Win32 reinstallable breaks cross compilation of any package using a custom-setup. This is because nonReinstallablePkgs is applied unconditionally and therefor applies to the "build" packages that are used for compiling the setup executables. The work around has been to add `buildType - lib.mkForce "Simple"` to any packages that use a custom setup executable. Maintaining this list is annoying and difficult (in part because the error message given when a package needs to be added a long way from clear). It turns out the correct fix is to make the override for nonReinstallablePkgs conditional and the correct way to do that is to use `pkgs` from the module arguments to detect when the `hostPlatform.isWindows`. We also need to use `mkIf` to avoid infinite recursion. So the windows specific module is now wrapped in: ``` ({ pkgs, ... }: lib.mkIf pkgs.stdenv.hostPlatform.isWindows {...}) ``` This change also updates to a more recent `haskell.nix` commit and removes the references to the `.all` components (they have been removed from haskell.nix).
- Loading branch information
1 parent
ad3fb7b
commit b511a57
Showing
2 changed files
with
21 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters