on iko/ghcjs-patch-master help sign in
Fix cleanGit uncached git when cross compiling (#611)

It turns out `git` depends on `gdb` in a round about way: ``` git -> openssh -> libfido2 -> systemd -> python libxml -> Cython -> gdb ``` Somewhere in that chain there should perhaps be a `buildPackages` so that the `gdb` that is used is not the one for debugging code in the `final` (but instead the one for debugging code in `final.buildPackages`). Using `final.buildPackages.git` causes two problems: * Multiple versions of `git` (and that dependency chain to `gdb` are needed when cross compiling). * When `gdb` does not exist for `js`, so when cross compiling with `ghcjs` `final.buildPackages.git` fails to build at all.

commit3f06d5d140fbfd4cf1531200276cf2e1a58f1aa8 authorHamish Mackenzie <Hamish.Mackenzie@iohk.io> dateSun 17 May 2020, 15:44 (6 years ago) parentda5ad64
1 file changed+15−1
overlays/haskell.nix+15−1
overlays/haskell.nix+15−1
@@ -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