Files
nixpkgs/pkgs/by-name/ri/rip2/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

53 lines
1.3 KiB
Nix

{
lib,
rustPlatform,
fetchFromGitHub,
versionCheckHook,
installShellFiles,
stdenv,
nix-update-script,
}:
rustPlatform.buildRustPackage rec {
pname = "rip2";
version = "0.9.5";
src = fetchFromGitHub {
owner = "MilesCranmer";
repo = "rip2";
rev = "v${version}";
hash = "sha256-vYkJlmzysUcX+jULGSs4Omu2RjUs4ZO4blN/zlzDcqc=";
};
cargoHash = "sha256-+8o4PFcJ/jMoMzfEA96tJ8wuH1CTqxnDwvFuegmPcEY=";
nativeBuildInputs = [ installShellFiles ];
# TODO: Unsure why this test fails, but not a major issue so
# skipping for now.
checkFlags = [ "--skip=test_filetypes::file_type_3___fifo__" ];
doInstallCheck = true;
nativeInstallCheckInputs = [ versionCheckHook ];
versionCheckProgram = "${placeholder "out"}/bin/rip";
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd rip \
--bash <($out/bin/rip completions bash) \
--fish <($out/bin/rip completions fish) \
--zsh <($out/bin/rip completions zsh)
'';
passthru.updateScript = nix-update-script { };
meta = {
description = "Safe and ergonomic alternative to rm";
homepage = "https://github.com/MilesCranmer/rip2";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
milescranmer
matthiasbeyer
];
mainProgram = "rip";
};
}