Skip to content

Commit 3f06d5d

Browse files
authored
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.
1 parent da5ad64 commit 3f06d5d

File tree

1 file changed

+15
-1
lines changed

1 file changed

+15
-1
lines changed

overlays/haskell.nix

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -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

0 commit comments

Comments
 (0)