@@ -60,7 +60,21 @@ final: prev: {
6060 # Utility functions for working with the component builder.
6161 haskellLib = let hl = import ../lib {
6262 inherit (final) stdenv lib runCommand recurseIntoAttrs srcOnly;
63− inherit (final.buildPackages) git;
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;
6478 haskellLib = hl;
6579 }; in hl;
6680