Skip to content

Add gitMinimal to all shell environments#245

Open
angerman wants to merge 1 commit intomainfrom
add-git-minimal-to-shells
Open

Add gitMinimal to all shell environments#245
angerman wants to merge 1 commit intomainfrom
add-git-minimal-to-shells

Conversation

@angerman
Copy link
Collaborator

Summary

  • Add gitMinimal to all 4 shell definitions (dynamic.nix, static.nix, cross-js.nix, cross-windows.nix) so git is available on PATH in every devx shell
  • Replace the full git in dynamic.nix's withGHCTooling block with the now-universal gitMinimal
  • Fixes Cabal-6666 ("The program 'git' is required but it could not be found") for projects using source-repository-package stanzas

Motivation

IntersectMBO/cardano-db-sync#2085 has 6 failing CI jobs because Cabal cannot find git to fetch source-repository-package dependencies. The devx shells only included git in the -ghc (GHC tooling) variant — all other shells were missing it.

Why gitMinimal

gitMinimal git (default)
Closure size 146 MiB 1.5 GiB
Closure deps 30 104
Core git ops All present All present

Nixpkgs itself uses gitMinimal for fetchgit — the identical use case. The 10x smaller closure matters for container images built from devx shells.

Test plan

  • nix eval on devShells succeeds (no syntax/eval errors)
  • nix develop .#ghc96-iog -c which git/nix/store/...-git-minimal-2.51.2/bin/git
  • Hydra eval + env-test jobs pass

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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant