From 847c87de24b991b6dacf9eb8fe8c2cd0b89d4c96 Mon Sep 17 00:00:00 2001 From: Adam Dinwoodie Date: Sun, 27 Sep 2026 13:54:56 +0200 Subject: [PATCH] git: add `withBreakingChanges` override parameter Git v3.0 is currently being planned upstream, and will include a variety of breaking changes. To allow those changes to be tested, add a `withBreakingChanges` argument to the `git` package definition. This flag isn't used anywhere in Nixpkgs: it's purely a convenience flag for people like me who want to start testing the potentially breaking changes before they're finally released with downstream overrides or overlays. --- pkgs/by-name/gi/git/package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/gi/git/package.nix b/pkgs/by-name/gi/git/package.nix index f20fdd8eaf3e..9c656cbfa85a 100644 --- a/pkgs/by-name/gi/git/package.nix +++ b/pkgs/by-name/gi/git/package.nix @@ -56,6 +56,7 @@ cargo, rustc, nix-update-script, + withBreakingChanges ? false, }: assert osxkeychainSupport -> stdenv.hostPlatform.isDarwin; @@ -269,7 +270,8 @@ stdenv.mkDerivation (finalAttrs: { # See https://github.com/Homebrew/homebrew-core/commit/dfa3ccf1e7d3901e371b5140b935839ba9d8b706 ++ lib.optional stdenv.hostPlatform.isDarwin "TKFRAMEWORK=/nonexistent" # Starting with future Git version 3.0.0, rust will be mandatory. For now, it's optional. - ++ lib.optional (!rustSupport) "NO_RUST=YesPlease"; + ++ lib.optional (!rustSupport) "NO_RUST=YesPlease" + ++ lib.optional withBreakingChanges "WITH_BREAKING_CHANGES=YesPlease"; disallowedReferences = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ stdenv.shellPackage