|
2 | 2 | #
|
3 | 3 | # for hygenic reasons we'll use haskell-nix as a prefix.
|
4 | 4 | # Using haskell.nix in nix is awkward as I needs to be quoted.
|
5 |
| -final: prev: { |
| 5 | +final: prev: |
| 6 | +let |
| 7 | + # Why `final.buildPackages.buildPackages.git`? |
| 8 | + # |
| 9 | + # It turns out `git` depends on `gdb` in a round about way: |
| 10 | + # git -> openssh -> libfido2 -> systemd -> python libxml -> Cython -> gdb |
| 11 | + # Somewhere in that chain there should perhaps be a `buildPackages` so |
| 12 | + # that the `gdb` that is used is not the one for debugging code in |
| 13 | + # the `final` (but instead the one for debugging code in |
| 14 | + # `final.buildPackages`). |
| 15 | + # |
| 16 | + # Using `final.buildPackages.git` causes two problems: |
| 17 | + # |
| 18 | + # * Multiple versions of `git` (and that dependency chain |
| 19 | + # to `gdb` are needed when cross compiling). |
| 20 | + # * When `gdb` does not exist for `js`, so when cross |
| 21 | + # compiling with ghcjs `final.buildPackages.git` fails |
| 22 | + # to build at all. |
| 23 | + inherit (final.buildPackages.buildPackages) git nix-prefetch-git; |
| 24 | +in { |
6 | 25 | haskell-nix = with final.haskell-nix; {
|
7 | 26 |
|
8 | 27 | # Default modules, these will always be included.
|
@@ -60,21 +79,7 @@ final: prev: {
|
60 | 79 | # Utility functions for working with the component builder.
|
61 | 80 | haskellLib = let hl = import ../lib {
|
62 | 81 | inherit (final) stdenv lib runCommand recurseIntoAttrs srcOnly;
|
63 |
| - # It turns out `git` depends on `gdb` in a round about way: |
64 |
| - # git -> openssh -> libfido2 -> systemd -> python libxml -> Cython -> gdb |
65 |
| - # Somewhere in that chain there should perhaps be a `buildPackages` so |
66 |
| - # that the `gdb` that is used is not the one for debugging code in |
67 |
| - # the `final` (but instead the one for debugging code in |
68 |
| - # `final.buildPackages`). |
69 |
| - # |
70 |
| - # Using `final.buildPackages.git` causes two problems: |
71 |
| - # |
72 |
| - # * Multiple versions of `git` (and that dependency chain |
73 |
| - # to `gdb` are needed when cross compiling). |
74 |
| - # * When `gdb` does not exist for `js`, so when cross |
75 |
| - # compiling with ghcjs `final.buildPackages.git` fails |
76 |
| - # to build at all. |
77 |
| - inherit (final.buildPackages.buildPackages) git; |
| 82 | + inherit git; |
78 | 83 | haskellLib = hl;
|
79 | 84 | }; in hl;
|
80 | 85 |
|
@@ -180,8 +185,8 @@ final: prev: {
|
180 | 185 | # We probably never want to actually cross compile nix-tools on
|
181 | 186 | # it's own.
|
182 | 187 | nix-tools-cross-compiled = final.lib.makeOverridable (import ../nix-tools) {
|
183 |
| - inherit (final) pkgs lib symlinkJoin makeWrapper |
184 |
| - git nix nix-prefetch-git; |
| 188 | + inherit (final) pkgs lib symlinkJoin makeWrapper nix; |
| 189 | + inherit git nix-prefetch-git; |
185 | 190 | inherit (final.haskell-nix) fetchExternal cleanSourceHaskell mkCabalProjectPkgSet;
|
186 | 191 | hpack = null; # nix-tools does not use hpack project files
|
187 | 192 | };
|
|
0 commit comments