git: use Rust where possible

Future versions of Git are going to require Rust, and Rust was added as
a "test balloon" in v2.52.0 so downstream distributions -- such as
ourselves -- can start ironing out the problems.  Support for this was
added as an option in #476300 / 0869356f40 (git: add rust opt-in,
2025-12-31), but the default packaging wasn't changed at that time.

To get as much exposure for that as possible, default to enabling
compilation with Rust where possible.  There are two exceptions that
don't currently work:

- gitMinimal, which is currently required to build Rust, so cannot
  depend on it without creating a circular dependency.  Fixing that
  bootstrap issue is a future project.
- Platforms that don't have any support for Rust.  There's not much we
  can do about those!
This commit is contained in:
Adam Dinwoodie
2026-01-26 09:09:13 +00:00
parent c5296fdd05
commit 5fbf35aed7
2 changed files with 2 additions and 1 deletions

View File

@@ -51,7 +51,7 @@
deterministic-host-uname, # trick Makefile into targeting the host platform when cross-compiling
doInstallCheck ? !stdenv.hostPlatform.isDarwin, # extremely slow on darwin
tests,
rustSupport ? false,
rustSupport ? lib.meta.availableOn stdenv.hostPlatform rustc,
cargo,
rustc,
}:

View File

@@ -1147,6 +1147,7 @@ with pkgs;
osxkeychainSupport = false;
pythonSupport = false;
perlSupport = false;
rustSupport = false; # Needed for bootstrap
withpcre2 = false;
};