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
44 lines
1011 B
Nix
44 lines
1011 B
Nix
{
|
|
lib,
|
|
rustPlatform,
|
|
fetchgit,
|
|
coreutils,
|
|
installShellFiles,
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "safe-rm";
|
|
version = "1.1.0";
|
|
|
|
src = fetchgit {
|
|
url = "https://git.launchpad.net/safe-rm";
|
|
rev = "refs/tags/${pname}-${version}";
|
|
sha256 = "sha256-7+4XwsjzLBCQmHDYNwhlN4Yg3eL43GUEbq8ROtuP2Kw=";
|
|
};
|
|
|
|
cargoHash = "sha256-6mPx7qgrsUtjDiFMIL4NTmG9jeC3mBlsQIf/TUB4SQM=";
|
|
|
|
postPatch = ''
|
|
substituteInPlace src/main.rs \
|
|
--replace-fail "/bin/rm" "${coreutils}/bin/rm"
|
|
'';
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
# uses lots of absolute paths outside of the sandbox
|
|
doCheck = false;
|
|
|
|
postInstall = ''
|
|
installManPage safe-rm.1
|
|
'';
|
|
|
|
meta = with lib; {
|
|
description = "Tool intended to prevent the accidental deletion of important files";
|
|
homepage = "https://launchpad.net/safe-rm";
|
|
license = licenses.gpl3Plus;
|
|
platforms = platforms.all;
|
|
maintainers = with maintainers; [ SuperSandro2000 ];
|
|
mainProgram = "safe-rm";
|
|
};
|
|
}
|