treewide: replace git with gitMinimal (#370895)

This commit is contained in:
Pol Dellaiera
2025-01-10 08:12:34 +01:00
committed by GitHub
43 changed files with 159 additions and 120 deletions

View File

@@ -2,7 +2,7 @@
lib,
qt5,
stdenv,
git,
gitMinimal,
fetchFromGitHub,
cmake,
alsa-lib,
@@ -27,7 +27,7 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [
cmake
git
gitMinimal
qt5.wrapQtAppsHook
];

View File

@@ -7,7 +7,7 @@
cxx-rs,
db62,
fetchFromGitHub,
git,
gitMinimal,
hexdump,
lib,
libevent,
@@ -48,7 +48,7 @@ rustPlatform.buildRustPackage.override { inherit stdenv; } rec {
autoreconfHook
cargo
cxx-rs
git
gitMinimal
hexdump
makeWrapper
pkg-config

View File

@@ -7,7 +7,7 @@
texinfo,
writeScript,
common-updater-scripts,
git,
gitMinimal,
nix,
nixfmt-classic,
coreutils,
@@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
PATH=${
lib.makeBinPath [
common-updater-scripts
git
gitMinimal
nixfmt-classic
nix
coreutils

View File

@@ -40,7 +40,7 @@
zstandard,
zulip,
# other
git,
gitMinimal,
withPcap ? true,
dpkt,
dnslib,
@@ -121,7 +121,7 @@ buildPythonApplication rec {
++ lib.optional withXclip xclip;
nativeCheckInputs = [
git
gitMinimal
];
# check phase uses the output bin, which is not possible when cross-compiling

View File

@@ -3,7 +3,7 @@
python3,
fetchPypi,
coreutils,
git,
gitMinimal,
mercurial,
}:
@@ -29,7 +29,7 @@ python3.pkgs.buildPythonApplication rec {
nativeCheckInputs =
[
coreutils
git
gitMinimal
mercurial
]
++ (with python3.pkgs; [

View File

@@ -1,6 +1,6 @@
{
runCommand,
git,
gitMinimal,
coccinelle,
python3,
}:
@@ -60,7 +60,7 @@ runCommand "hardcode-gsettings.patch"
{
inherit src patches;
nativeBuildInputs = [
git
gitMinimal
coccinelle
python3 # For patch script
];

View File

@@ -6,7 +6,7 @@
libgit2,
rust-jemalloc-sys,
zlib,
git,
gitMinimal,
}:
rustPlatform.buildRustPackage rec {
pname = "biome";
@@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
zlib
];
nativeCheckInputs = [ git ];
nativeCheckInputs = [ gitMinimal ];
cargoBuildFlags = [ "-p=biome_cli" ];
cargoTestFlags =

View File

@@ -7,7 +7,7 @@
openssl,
stdenv,
darwin,
git,
gitMinimal,
}:
rustPlatform.buildRustPackage rec {
@@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec {
darwin.apple_sdk.frameworks.Security
];
nativeCheckInputs = [ git ];
nativeCheckInputs = [ gitMinimal ];
# disable vendored libgit2 and openssl
buildNoDefaultFeatures = true;

View File

@@ -20,7 +20,7 @@
fetchFromGitHub,
rustPlatform,
llvmPackages_19,
git,
gitMinimal,
}:
let
@@ -70,7 +70,7 @@ rustPlatform.buildRustPackage {
LLVM_PROFDATA = "${llvm}/bin/llvm-profdata";
nativeCheckInputs = [
git
gitMinimal
];
# `cargo-llvm-cov` tests rely on `git ls-files.

View File

@@ -2,7 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
git,
gitMinimal,
python3,
}:
@@ -37,7 +37,7 @@ buildGoModule rec {
]);
nativeCheckInputs = [
git
gitMinimal
(python3.withPackages (
ps: with ps; [
setuptools

View File

@@ -2,7 +2,7 @@
lib,
python3Packages,
fetchFromGitHub,
git,
gitMinimal,
}:
python3Packages.buildPythonApplication rec {
@@ -23,13 +23,13 @@ python3Packages.buildPythonApplication rec {
propagatedBuildInputs = with python3Packages; [
argcomplete
colorama
git
gitMinimal
kaptan
requests
];
nativeCheckInputs = [
git
gitMinimal
];
preCheck = ''

View File

@@ -2,7 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
git,
gitMinimal,
}:
buildGoModule rec {
pname = "git-bug-migration";
@@ -17,7 +17,7 @@ buildGoModule rec {
vendorHash = "sha256-Hid9OK91LNjLmDHam0ZlrVQopVOsqbZ+BH2rfQi5lS0=";
nativeCheckInputs = [ git ];
nativeCheckInputs = [ gitMinimal ];
ldflags = [
"-X main.GitExactTag=${version}"

View File

@@ -8,7 +8,7 @@
zlib,
stdenv,
darwin,
git,
gitMinimal,
}:
rustPlatform.buildRustPackage rec {
@@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec {
];
nativeCheckInputs = [
git
gitMinimal
];
# don't use vendored libgit2

View File

@@ -2,7 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
git,
gitMinimal,
mercurial,
makeWrapper,
nix-update-script,
@@ -27,7 +27,10 @@ stdenv.mkDerivation (finalAttrs: {
})
];
nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [
gitMinimal
makeWrapper
];
buildInputs = [
mercurial.python
mercurial
@@ -48,7 +51,7 @@ stdenv.mkDerivation (finalAttrs: {
for script in $out/bin/*.sh; do
wrapProgram $script \
--prefix PATH : "${git}/bin":"${mercurial.python}/bin":$libexec \
--prefix PATH : "${gitMinimal}/bin":"${mercurial.python}/bin":$libexec \
--prefix PYTHONPATH : "${mercurial}/${mercurial.python.sitePackages}":$sitepackagesPath
done
'';
@@ -56,22 +59,28 @@ stdenv.mkDerivation (finalAttrs: {
doInstallCheck = true;
# deliberately not adding git or hg into nativeInstallCheckInputs - package should
# be able to work without them in runtime env
nativeCheckInputs = [
gitMinimal
mercurial
];
installCheckPhase = ''
mkdir repo-hg
pushd repo-hg
${mercurial}/bin/hg init
hg init
echo foo > bar
${mercurial}/bin/hg add bar
${mercurial}/bin/hg commit --message "baz"
hg add bar
hg commit --message "baz"
popd
mkdir repo-git
pushd repo-git
${git}/bin/git init
${git}/bin/git config core.ignoreCase false # for darwin
git init
git config core.ignoreCase false # for darwin
$out/bin/hg-fast-export.sh -r ../repo-hg/ --hg-hash
for s in "foo" "bar" "baz" ; do
(${git}/bin/git show | grep $s > /dev/null) && echo $s found
(git show | grep $s > /dev/null) && echo $s found
done
popd
'';
@@ -84,5 +93,6 @@ stdenv.mkDerivation (finalAttrs: {
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.koral ];
platforms = lib.platforms.unix;
mainProgram = "hg-fast-export.sh";
};
})

View File

@@ -6,7 +6,7 @@
dotnetCorePackages,
fetchFromGitHub,
fetchpatch,
git,
gitMinimal,
glibc,
glibcLocales,
lib,
@@ -112,7 +112,7 @@ buildDotnetModule (finalAttrs: {
nativeBuildInputs =
[
which
git
gitMinimal
# needed for `uname`
coreutils
]

View File

@@ -3,7 +3,7 @@
lib,
stdenv,
fetchFromGitHub,
git,
gitMinimal,
zsh,
zlib,
runtimeShell,
@@ -77,7 +77,7 @@ stdenv.mkDerivation rec {
# command ran successfully. This tests the binary itself and the zsh
# integration.
nativeInstallCheckInputs = [
git
gitMinimal
zsh
];
doInstallCheck = true;

View File

@@ -2,7 +2,7 @@
lib,
rustPlatform,
fetchFromGitHub,
git,
gitMinimal,
}:
rustPlatform.buildRustPackage rec {
@@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-7JQcY3HCG3UQ0Mfz/+ZZ0axGEpQoH410FT72tjHW7EE=";
nativeCheckInputs = [
git
gitMinimal
];
# tests require it to be in a git repository

View File

@@ -2,7 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
git,
gitMinimal,
ghq,
}:
@@ -22,7 +22,7 @@ buildGoModule rec {
doCheck = false;
nativeBuildInputs = [
git
gitMinimal
ghq
];

View File

@@ -2,7 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
git,
gitMinimal,
installShellFiles,
}:
@@ -35,7 +35,7 @@ buildGoModule rec {
"-skip=TestNewPublisherCanPublish"
];
nativeCheckInputs = [ git ];
nativeCheckInputs = [ gitMinimal ];
preCheck = ''
# Feed in all the tests for testing
# This is because subPackages above limits what is built to just what we

View File

@@ -2,7 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
git,
gitMinimal,
}:
buildGoModule rec {
@@ -19,7 +19,7 @@ buildGoModule rec {
vendorHash = null;
nativeCheckInputs = [
git
gitMinimal
];
preCheck = ''

View File

@@ -8,7 +8,7 @@
zstd,
stdenv,
darwin,
git,
gitMinimal,
}:
let
@@ -45,7 +45,7 @@ rustPlatform.buildRustPackage rec {
];
nativeCheckInputs = [
git
gitMinimal
];
preCheck = ''

View File

@@ -6,13 +6,12 @@
cargo,
coursier,
dotnet-sdk,
git,
gitMinimal,
glibcLocales,
go,
nodejs,
perl,
cabal-install,
testers,
pre-commit,
}:
@@ -50,7 +49,7 @@ buildPythonApplication rec {
cargo
coursier
dotnet-sdk
git
gitMinimal
glibcLocales
go
libiconv # For rust tests on Darwin

View File

@@ -1,5 +1,5 @@
{
git,
gitMinimal,
pre-commit,
runCommand,
testers,
@@ -9,7 +9,7 @@
runCommand "check-meta-hooks"
{
nativeBuildInputs = [
git
gitMinimal
pre-commit
];
}

View File

@@ -5,7 +5,7 @@
fetchFromGitHub,
fetchpatch,
flex,
git,
gitMinimal,
lib,
libtool,
libunwind,
@@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
automake
autoconf
git
gitMinimal
libtool
pkg-config
ripgrep

View File

@@ -10,7 +10,7 @@
nodejs,
pnpm,
python3,
git,
gitMinimal,
jq,
zip,
}:
@@ -49,7 +49,7 @@ stdenv.mkDerivation (finalAttrs: {
customPython
nodejs
pnpm.configHook
git
gitMinimal
jq
zip
];

View File

@@ -1,8 +1,9 @@
{ lib
, buildGoModule
, fetchFromGitHub
, git
, nix-update-script
{
lib,
buildGoModule,
fetchFromGitHub,
gitMinimal,
nix-update-script,
}:
buildGoModule {
@@ -19,7 +20,7 @@ buildGoModule {
vendorHash = "sha256-Dvs8XMOxZEE9moA8aCxuxg947+x/6C8cKtgdcByL4Eo=";
nativeCheckInputs = [
git
gitMinimal
];
preCheck = ''
@@ -28,7 +29,10 @@ buildGoModule {
'';
passthru.updateScript = nix-update-script {
extraArgs = [ "--version" "branch" ];
extraArgs = [
"--version"
"branch"
];
};
meta = {

View File

@@ -38,7 +38,7 @@
ninja,
python312,
python39,
git,
gitMinimal,
version,
flutterVersion,
dartSdkVersion,
@@ -176,7 +176,7 @@ stdenv.mkDerivation (finalAttrs: {
[
python3
(tools.vpython python3)
git
gitMinimal
pkg-config
ninja
dart

View File

@@ -22,7 +22,7 @@
callPackage,
makeWrapper,
darwin,
git,
gitMinimal,
which,
jq,
flutterTools ? null,
@@ -64,7 +64,7 @@ let
nativeBuildInputs = [
makeWrapper
jq
git
gitMinimal
] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.DarwinTools ];
strictDeps = true;

View File

@@ -1,5 +1,5 @@
{
git,
gitMinimal,
runCommand,
}:
@@ -20,7 +20,7 @@
# Convert an ordinary source checkout into a repo with a single commit
repoifySimple =
name: path:
runCommand ''${name}-repoified'' { buildInputs = [ git ]; } ''
runCommand ''${name}-repoified'' { buildInputs = [ gitMinimal ]; } ''
mkdir -p $out
cp -r ${path}/. $out
cd $out
@@ -36,7 +36,7 @@
# Convert an dependency source info into a repo with a single commit
repoifyInfo =
uuid: info:
runCommand ''julia-${info.name}-${info.version}'' { buildInputs = [ git ]; } ''
runCommand ''julia-${info.name}-${info.version}'' { buildInputs = [ gitMinimal ]; } ''
mkdir -p $out
cp -r ${info.src}/. $out
cd $out

View File

@@ -3,7 +3,7 @@
commitizen,
fetchFromGitHub,
buildPythonPackage,
git,
gitMinimal,
pythonOlder,
stdenv,
installShellFiles,
@@ -69,7 +69,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
argcomplete
deprecated
git
gitMinimal
py
pytest-freezer
pytest-mock

View File

@@ -7,7 +7,7 @@
importlib-metadata,
packaging,
pytestCheckHook,
git,
gitMinimal,
}:
buildPythonPackage rec {
@@ -38,7 +38,7 @@ buildPythonPackage rec {
'';
nativeCheckInputs = [
git
gitMinimal
pytestCheckHook
];

View File

@@ -3,7 +3,7 @@
buildPythonPackage,
fetchFromGitHub,
fonttools,
git,
gitMinimal,
gitpython,
pytestCheckHook,
}:
@@ -27,7 +27,7 @@ buildPythonPackage rec {
];
nativeCheckInputs = [
git
gitMinimal
pytestCheckHook
];
preCheck = ''

View File

@@ -16,7 +16,7 @@
freetype-py,
gflanguages,
gfsubsets,
git,
gitMinimal,
glyphsets,
installShellFiles,
jinja2,
@@ -110,7 +110,7 @@ buildPythonPackage rec {
];
nativeCheckInputs = [
git
gitMinimal
pytestCheckHook
pytest-xdist
requests-mock

View File

@@ -6,7 +6,7 @@
fetchFromGitHub,
freezegun,
funcy,
git,
gitMinimal,
pydantic,
pytest-cov-stub,
pytest-mock,
@@ -56,7 +56,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
freezegun
git
gitMinimal
pytest-cov-stub
pytest-mock
pytest-test-utils

View File

@@ -15,7 +15,7 @@
jupyter-server,
jupyter-server-mathjax,
jinja2,
git,
gitMinimal,
pytest-tornado,
pytestCheckHook,
}:
@@ -51,7 +51,7 @@ buildPythonPackage rec {
];
nativeCheckInputs = [
git
gitMinimal
pytest-tornado
pytestCheckHook
];

View File

@@ -9,7 +9,7 @@
# tests
editables,
git,
gitMinimal,
mercurial,
pytestCheckHook,
setuptools,
@@ -35,7 +35,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
editables
git
gitMinimal
mercurial
pytestCheckHook
setuptools

View File

@@ -2,7 +2,7 @@
lib,
buildPythonPackage,
fetchPypi,
git,
gitMinimal,
pytestCheckHook,
setuptools,
}:
@@ -26,7 +26,7 @@ buildPythonPackage rec {
nativeCheckInputs = [
pytestCheckHook
git
gitMinimal
setuptools
];

View File

@@ -3,7 +3,7 @@
stdenv,
auditwheel,
buildPythonPackage,
git,
gitMinimal,
greenlet,
fetchFromGitHub,
pyee,
@@ -71,7 +71,7 @@ buildPythonPackage rec {
'';
nativeBuildInputs = [
git
gitMinimal
setuptools-scm
setuptools
] ++ lib.optionals stdenv.hostPlatform.isLinux [ auditwheel ];

View File

@@ -3,7 +3,7 @@
stdenv,
buildPythonPackage,
fetchFromGitHub,
git,
gitMinimal,
pytestCheckHook,
pythonOlder,
ruamel-yaml,
@@ -27,7 +27,7 @@ buildPythonPackage rec {
propagatedBuildInputs = [ ruamel-yaml ] ++ lib.optionals (pythonOlder "3.11") [ tomli ];
nativeCheckInputs = [
git
gitMinimal
pytestCheckHook
];

View File

@@ -5,7 +5,7 @@
click,
colorama,
fetchPypi,
git,
gitMinimal,
gnugrep,
gnupg,
pbr,
@@ -34,7 +34,7 @@ buildPythonPackage rec {
patches = [
(substituteAll {
src = ./mark-executables.patch;
git_exec = "${git}/bin/git";
git_exec = "${gitMinimal}/bin/git";
grep_exec = "${gnugrep}/bin/grep";
gpg_exec = "${gnupg}/bin/gpg2";
tree_exec = "${tree}/bin/tree";
@@ -57,15 +57,18 @@ buildPythonPackage rec {
pexpect
];
nativeCheckInputs = [ pytestCheckHook ];
nativeCheckInputs = [
gitMinimal
pytestCheckHook
];
# Configuration so that the tests work
preCheck = ''
export HOME=$(mktemp -d)
export GNUPGHOME=pypass/tests/gnupg
${git}/bin/git config --global user.email "nix-builder@nixos.org"
${git}/bin/git config --global user.name "Nix Builder"
${git}/bin/git config --global pull.ff only
git config --global user.email "nix-builder@nixos.org"
git config --global user.name "Nix Builder"
git config --global pull.ff only
make setup_gpg
'';

View File

@@ -19,7 +19,7 @@
yojson,
astring,
opam,
git,
gitMinimal,
findlib,
mercurial,
bzip2,
@@ -34,7 +34,7 @@ let
runtimeInputs = [
opam
findlib
git
gitMinimal
mercurial
bzip2
gnutar
@@ -78,7 +78,10 @@ buildDunePackage rec {
astring
fpath
];
nativeCheckInputs = [ odoc ];
nativeCheckInputs = [
odoc
gitMinimal
];
checkInputs = [ alcotest ] ++ runtimeInputs;
doCheck = true;

View File

@@ -1,15 +1,17 @@
{ lib, stdenv
, fetchFromGitHub
, rustPlatform
, perl
, pkg-config
, SystemConfiguration
, Security
, CoreFoundation
, curl
, libiconv
, openssl
, git
{
lib,
stdenv,
fetchFromGitHub,
rustPlatform,
perl,
pkg-config,
SystemConfiguration,
Security,
CoreFoundation,
curl,
libiconv,
openssl,
gitMinimal,
}:
rustPlatform.buildRustPackage rec {
@@ -31,17 +33,35 @@ rustPlatform.buildRustPackage rec {
git config --global user.email "nobody@example.com"
'';
nativeBuildInputs = [ perl pkg-config ];
nativeBuildInputs = [
perl
pkg-config
];
buildInputs = [ openssl ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ SystemConfiguration Security CoreFoundation libiconv curl ];
buildInputs =
[ openssl ]
++ lib.optionals stdenv.hostPlatform.isDarwin [
SystemConfiguration
Security
CoreFoundation
libiconv
curl
];
nativeCheckInputs = [ git ];
nativeCheckInputs = [ gitMinimal ];
meta = with lib; {
description = "Cryptographically verifiable code review system for the cargo (Rust) package manager";
mainProgram = "cargo-crev";
homepage = "https://github.com/crev-dev/cargo-crev";
license = with licenses; [ asl20 mit mpl20 ];
maintainers = with maintainers; [ b4dm4n matthiasbeyer ];
license = with licenses; [
asl20
mit
mpl20
];
maintainers = with maintainers; [
b4dm4n
matthiasbeyer
];
};
}

View File

@@ -418,7 +418,7 @@ let
dune-private-libs = callPackage ../development/ocaml-modules/dune-private-libs { };
dune-release = callPackage ../development/tools/ocaml/dune-release {
inherit (pkgs) opam git mercurial coreutils gnutar bzip2;
inherit (pkgs) opam gitMinimal mercurial coreutils gnutar bzip2;
};
dune-rpc = callPackage ../development/ocaml-modules/dune-rpc { };