Commit e610c27
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).1 parent fe19347 commit e610c27
2 files changed
+21
-29
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | 36 | | |
53 | 37 | | |
54 | 38 | | |
| |||
57 | 41 | | |
58 | 42 | | |
59 | 43 | | |
60 | | - | |
61 | | - | |
62 | | - | |
63 | | - | |
64 | | - | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
69 | 60 | | |
70 | 61 | | |
71 | 62 | | |
| |||
85 | 76 | | |
86 | 77 | | |
87 | 78 | | |
88 | | - | |
| 79 | + | |
| 80 | + | |
89 | 81 | | |
90 | 82 | | |
91 | 83 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
5 | 5 | | |
6 | 6 | | |
7 | 7 | | |
8 | | - | |
9 | | - | |
| 8 | + | |
| 9 | + | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
0 commit comments