Skip to content

Commit

Permalink
treewide: replace git with gitMinimal (#370895)
Browse files Browse the repository at this point in the history
  • Loading branch information
drupol authored Jan 10, 2025
2 parents ebc587c + 756d00c commit fd862b3
Show file tree
Hide file tree
Showing 43 changed files with 159 additions and 120 deletions.
4 changes: 2 additions & 2 deletions pkgs/applications/audio/lpd8editor/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
qt5,
stdenv,
git,
gitMinimal,
fetchFromGitHub,
cmake,
alsa-lib,
Expand All @@ -27,7 +27,7 @@ stdenv.mkDerivation rec {

nativeBuildInputs = [
cmake
git
gitMinimal
qt5.wrapQtAppsHook
];

Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/blockchains/zcash/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
cxx-rs,
db62,
fetchFromGitHub,
git,
gitMinimal,
hexdump,
lib,
libevent,
Expand Down Expand Up @@ -48,7 +48,7 @@ rustPlatform.buildRustPackage.override { inherit stdenv; } rec {
autoreconfHook
cargo
cxx-rs
git
gitMinimal
hexdump
makeWrapper
pkg-config
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/editors/nano/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
texinfo,
writeScript,
common-updater-scripts,
git,
gitMinimal,
nix,
nixfmt-classic,
coreutils,
Expand Down Expand Up @@ -74,7 +74,7 @@ stdenv.mkDerivation rec {
PATH=${
lib.makeBinPath [
common-updater-scripts
git
gitMinimal
nixfmt-classic
nix
coreutils
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/misc/visidata/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
zstandard,
zulip,
# other
git,
gitMinimal,
withPcap ? true,
dpkt,
dnslib,
Expand Down Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions pkgs/applications/version-management/nbstripout/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
python3,
fetchPypi,
coreutils,
git,
gitMinimal,
mercurial,
}:

Expand All @@ -29,7 +29,7 @@ python3.pkgs.buildPythonApplication rec {
nativeCheckInputs =
[
coreutils
git
gitMinimal
mercurial
]
++ (with python3.pkgs; [
Expand Down
4 changes: 2 additions & 2 deletions pkgs/build-support/make-hardcode-gsettings-patch/default.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
runCommand,
git,
gitMinimal,
coccinelle,
python3,
}:
Expand Down Expand Up @@ -60,7 +60,7 @@ runCommand "hardcode-gsettings.patch"
{
inherit src patches;
nativeBuildInputs = [
git
gitMinimal
coccinelle
python3 # For patch script
];
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/bi/biome/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
libgit2,
rust-jemalloc-sys,
zlib,
git,
gitMinimal,
}:
rustPlatform.buildRustPackage rec {
pname = "biome";
Expand All @@ -29,7 +29,7 @@ rustPlatform.buildRustPackage rec {
zlib
];

nativeCheckInputs = [ git ];
nativeCheckInputs = [ gitMinimal ];

cargoBuildFlags = [ "-p=biome_cli" ];
cargoTestFlags =
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/ca/cargo-generate/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
openssl,
stdenv,
darwin,
git,
gitMinimal,
}:

rustPlatform.buildRustPackage rec {
Expand All @@ -34,7 +34,7 @@ rustPlatform.buildRustPackage rec {
darwin.apple_sdk.frameworks.Security
];

nativeCheckInputs = [ git ];
nativeCheckInputs = [ gitMinimal ];

# disable vendored libgit2 and openssl
buildNoDefaultFeatures = true;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/ca/cargo-llvm-cov/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
fetchFromGitHub,
rustPlatform,
llvmPackages_19,
git,
gitMinimal,
}:

let
Expand Down Expand Up @@ -70,7 +70,7 @@ rustPlatform.buildRustPackage {
LLVM_PROFDATA = "${llvm}/bin/llvm-profdata";

nativeCheckInputs = [
git
gitMinimal
];

# `cargo-llvm-cov` tests rely on `git ls-files.
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/da/databricks-cli/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
git,
gitMinimal,
python3,
}:

Expand Down Expand Up @@ -37,7 +37,7 @@ buildGoModule rec {
]);

nativeCheckInputs = [
git
gitMinimal
(python3.withPackages (
ps: with ps; [
setuptools
Expand Down
6 changes: 3 additions & 3 deletions pkgs/by-name/gi/git-aggregator/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
python3Packages,
fetchFromGitHub,
git,
gitMinimal,
}:

python3Packages.buildPythonApplication rec {
Expand All @@ -23,13 +23,13 @@ python3Packages.buildPythonApplication rec {
propagatedBuildInputs = with python3Packages; [
argcomplete
colorama
git
gitMinimal
kaptan
requests
];

nativeCheckInputs = [
git
gitMinimal
];

preCheck = ''
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/gi/git-bug-migration/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
git,
gitMinimal,
}:
buildGoModule rec {
pname = "git-bug-migration";
Expand All @@ -17,7 +17,7 @@ buildGoModule rec {

vendorHash = "sha256-Hid9OK91LNjLmDHam0ZlrVQopVOsqbZ+BH2rfQi5lS0=";

nativeCheckInputs = [ git ];
nativeCheckInputs = [ gitMinimal ];

ldflags = [
"-X main.GitExactTag=${version}"
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/gi/git-dive/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
zlib,
stdenv,
darwin,
git,
gitMinimal,
}:

rustPlatform.buildRustPackage rec {
Expand Down Expand Up @@ -39,7 +39,7 @@ rustPlatform.buildRustPackage rec {
];

nativeCheckInputs = [
git
gitMinimal
];

# don't use vendored libgit2
Expand Down
28 changes: 19 additions & 9 deletions pkgs/by-name/gi/git-fast-export/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
stdenv,
fetchFromGitHub,
git,
gitMinimal,
mercurial,
makeWrapper,
nix-update-script,
Expand All @@ -27,7 +27,10 @@ stdenv.mkDerivation (finalAttrs: {
})
];

nativeBuildInputs = [ makeWrapper ];
nativeBuildInputs = [
gitMinimal
makeWrapper
];
buildInputs = [
mercurial.python
mercurial
Expand All @@ -48,30 +51,36 @@ 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
'';

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
'';
Expand All @@ -84,5 +93,6 @@ stdenv.mkDerivation (finalAttrs: {
license = lib.licenses.gpl2;
maintainers = [ lib.maintainers.koral ];
platforms = lib.platforms.unix;
mainProgram = "hg-fast-export.sh";
};
})
4 changes: 2 additions & 2 deletions pkgs/by-name/gi/github-runner/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
dotnetCorePackages,
fetchFromGitHub,
fetchpatch,
git,
gitMinimal,
glibc,
glibcLocales,
lib,
Expand Down Expand Up @@ -112,7 +112,7 @@ buildDotnetModule (finalAttrs: {
nativeBuildInputs =
[
which
git
gitMinimal
# needed for `uname`
coreutils
]
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/gi/gitstatus/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
lib,
stdenv,
fetchFromGitHub,
git,
gitMinimal,
zsh,
zlib,
runtimeShell,
Expand Down Expand Up @@ -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;
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/gl/glitter/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
rustPlatform,
fetchFromGitHub,
git,
gitMinimal,
}:

rustPlatform.buildRustPackage rec {
Expand All @@ -19,7 +19,7 @@ rustPlatform.buildRustPackage rec {
cargoHash = "sha256-7JQcY3HCG3UQ0Mfz/+ZZ0axGEpQoH410FT72tjHW7EE=";

nativeCheckInputs = [
git
gitMinimal
];

# tests require it to be in a git repository
Expand Down
4 changes: 2 additions & 2 deletions pkgs/by-name/gs/gst/package.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
lib,
buildGoModule,
fetchFromGitHub,
git,
gitMinimal,
ghq,
}:

Expand All @@ -22,7 +22,7 @@ buildGoModule rec {
doCheck = false;

nativeBuildInputs = [
git
gitMinimal
ghq
];

Expand Down
Loading

0 comments on commit fd862b3

Please sign in to comment.