Skip to content

Commit f36a6aa

Browse files
committed
Add gitMinimal to all shell environments
Cabal needs git on PATH for source-repository-package stanzas in cabal.project files. Without it, builds fail with Cabal-6666. This was observed in IntersectMBO/cardano-db-sync#2085 where 6 out of 9 failing CI jobs reported "The program 'git' is required but it could not be found." Add gitMinimal (146 MiB closure) instead of git (1.5 GiB) to all four shell definitions — the same package nixpkgs uses for fetchgit. The 10x smaller closure matters for container images built from devx shells. - dynamic.nix: add gitMinimal to buildInputs, drop redundant git from withGHCTooling (gitMinimal now covers it) - static.nix: add gitMinimal to nativeBuildInputs - cross-js.nix: add gitMinimal to nativeBuildInputs - cross-windows.nix: add pkgsBuildBuild.gitMinimal to nativeBuildInputs
1 parent a621faa commit f36a6aa

4 files changed

Lines changed: 5 additions & 1 deletion

File tree

cross-js.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,7 @@ pkgs.mkShell ({
104104
perl
105105
stdenv.cc.cc.lib
106106
which
107+
gitMinimal
107108
]) ++ (with pkgs.buildPackages; [
108109
])
109110
++ builtins.attrValues haskell-tools

cross-windows.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,7 @@ pkgs.pkgsBuildBuild.mkShell ({
211211
pkgsBuildBuild.perl
212212
stdenv.cc.cc.lib
213213
pkgsBuildBuild.which
214+
pkgsBuildBuild.gitMinimal
214215
])
215216
++ map pkgs.lib.getDev (with pkgs; [
216217
zlib pcre openssl

dynamic.nix

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,6 +125,7 @@ pkgs.mkShell {
125125
pcre
126126
pkg-config
127127
which
128+
gitMinimal
128129
zlib
129130
])
130131
++ optional stdenv.hostPlatform.isLinux pkgs.systemd
@@ -135,7 +136,7 @@ pkgs.mkShell {
135136
)
136137
++ attrValues haskell-tools
137138
++ optionals withGHCTooling (
138-
with pkgs; [ python3 automake autoconf alex happy git libffi.dev ]
139+
with pkgs; [ python3 automake autoconf alex happy libffi.dev ]
139140
)
140141
;
141142

static.nix

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -161,6 +161,7 @@ pkgs.mkShell (rec {
161161
perl
162162
stdenv.cc.cc.lib
163163
which
164+
gitMinimal
164165
]) ++ (with pkgs.buildPackages; [
165166
])
166167
++ builtins.attrValues haskell-tools

0 commit comments

Comments
 (0)