diff --git a/pkgs/by-name/gi/git/package.nix b/pkgs/by-name/gi/git/package.nix index b154bde10d0d..c4a4bd7e8334 100644 --- a/pkgs/by-name/gi/git/package.nix +++ b/pkgs/by-name/gi/git/package.nix @@ -51,6 +51,9 @@ deterministic-host-uname, # trick Makefile into targeting the host platform when cross-compiling doInstallCheck ? !stdenv.hostPlatform.isDarwin, # extremely slow on darwin tests, + rustSupport ? false, + cargo, + rustc, }: assert osxkeychainSupport -> stdenv.hostPlatform.isDarwin; @@ -186,6 +189,10 @@ stdenv.mkDerivation (finalAttrs: { ++ lib.optionals withLibsecret [ glib libsecret + ] + ++ lib.optionals rustSupport [ + cargo + rustc ]; # required to support pthread_cancel() @@ -234,7 +241,9 @@ stdenv.mkDerivation (finalAttrs: { # acceptable version. # # See https://github.com/Homebrew/homebrew-core/commit/dfa3ccf1e7d3901e371b5140b935839ba9d8b706 - ++ lib.optional stdenv.hostPlatform.isDarwin "TKFRAMEWORK=/nonexistent"; + ++ 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 "WITH_RUST=YesPlease"; disallowedReferences = lib.optionals (stdenv.buildPlatform != stdenv.hostPlatform) [ stdenv.shellPackage