Open
Conversation
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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
gitMinimalto all 4 shell definitions (dynamic.nix,static.nix,cross-js.nix,cross-windows.nix) sogitis available on PATH in every devx shellgitindynamic.nix'swithGHCToolingblock with the now-universalgitMinimalCabal-6666("The program 'git' is required but it could not be found") for projects usingsource-repository-packagestanzasMotivation
IntersectMBO/cardano-db-sync#2085 has 6 failing CI jobs because Cabal cannot find
gitto fetchsource-repository-packagedependencies. The devx shells only includedgitin the-ghc(GHC tooling) variant — all other shells were missing it.Why
gitMinimalgitMinimalgit(default)Nixpkgs itself uses
gitMinimalforfetchgit— the identical use case. The 10x smaller closure matters for container images built from devx shells.Test plan
nix evalondevShellssucceeds (no syntax/eval errors)nix develop .#ghc96-iog -c which git→/nix/store/...-git-minimal-2.51.2/bin/git