@@ -2,7 +2,26 @@
3# for hygenic reasons we'll use haskell-nix as a prefix.
3# for hygenic reasons we'll use haskell-nix as a prefix.
4# Using haskell.nix in nix is awkward as I needs to be quoted.
4# Using haskell.nix in nix is awkward as I needs to be quoted.
5−final: prev: {
5+final: prev:
7+ # Why `final.buildPackages.buildPackages.git`?
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`).
16+ # Using `final.buildPackages.git` causes two problems:
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
23+ inherit (final.buildPackages.buildPackages) git nix-prefetch-git;
6 haskell-nix = with final.haskell-nix; {
25 haskell-nix = with final.haskell-nix; {
8 # Default modules, these will always be included.
27 # Default modules, these will always be included.
@@ -60,21 +79,7 @@ final: prev: {
60 # Utility functions for working with the component builder.
79 # Utility functions for working with the component builder.
61 haskellLib = let hl = import ../lib {
80 haskellLib = let hl = import ../lib {
62 inherit (final) stdenv lib runCommand recurseIntoAttrs srcOnly;
81 inherit (final) stdenv lib runCommand recurseIntoAttrs srcOnly;
63− # It turns out `git` depends on `gdb` in a round about way:
82+ inherit git;
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`).
70− # Using `final.buildPackages.git` causes two problems:
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
77− inherit (final.buildPackages.buildPackages) git;
78 haskellLib = hl;
83 haskellLib = hl;
@@ -180,8 +185,8 @@ final: prev: {
180 # We probably never want to actually cross compile nix-tools on
185 # We probably never want to actually cross compile nix-tools on
181 # it's own.
186 # it's own.
182 nix-tools-cross-compiled = final.lib.makeOverridable (import ../nix-tools) {
187 nix-tools-cross-compiled = final.lib.makeOverridable (import ../nix-tools) {
183− inherit (final) pkgs lib symlinkJoin makeWrapper
188+ inherit (final) pkgs lib symlinkJoin makeWrapper nix;
184− git nix nix-prefetch-git;
189+ inherit git nix-prefetch-git;
185 inherit (final.haskell-nix) fetchExternal cleanSourceHaskell mkCabalProjectPkgSet;
190 inherit (final.haskell-nix) fetchExternal cleanSourceHaskell mkCabalProjectPkgSet;
186 hpack = null; # nix-tools does not use hpack project files
191 hpack = null; # nix-tools does not use hpack project files