Files
nixpkgs/pkgs/by-name/gi/git-wait/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

51 lines
1.3 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
stdenv,
git,
}:
rustPlatform.buildRustPackage {
pname = "git-wait";
version = "0.4.0-unstable-2024-12-01";
src = fetchFromGitHub {
owner = "darshanparajuli";
repo = "git-wait";
# no tags upstream
rev = "1d610f694dd1cd4a0970e97b886053ffc7c76244";
hash = "sha256-Va917eD9M3oUVmLrDab6cx/LvmBlk95U4mRHqPpBB5I=";
};
cargoHash = "sha256-tA0WjghBB2K71IlZ1u9K67tZWGe9VNFOfI2YdrqCUw0=";
checkFlags = lib.optionals stdenv.hostPlatform.isDarwin [
"--skip=tests::wait_if_index_lock_is_present"
];
# versionCheckHook is too complex to use here
doInstallCheck = true;
nativeInstallCheckInputs = [ git ];
installCheckPhase = ''
runHook preInstallCheck
stdout=$(set -x; $out/bin/git-wait -v 2>&1)
if ! grep <<<"$stdout" -q ${lib.escapeShellArg git.version}; then
>&2 echo "ERROR: version check failed!" ${lib.escapeShellArg git.version} "was not found."
>&2 echo "Output was"
>&2 echo "$stdout"
fi
runHook postInstallCheck
'';
meta = {
description = "Simple git wrapper that waits until index.lock file is removed when present before running the command";
homepage = "https://github.com/darshanparajuli/git-wait";
license = lib.licenses.mit;
maintainers = with lib.maintainers; [ pbsds ];
mainProgram = "git-wait";
};
}