Files
nixpkgs/pkgs/by-name/tr/trashy/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

43 lines
1.2 KiB
Nix

{
lib,
rustPlatform,
fetchCrate,
installShellFiles,
stdenv,
}:
rustPlatform.buildRustPackage rec {
pname = "trashy";
version = "2.0.0";
src = fetchCrate {
inherit pname version;
hash = "sha256-1xHyhAV8hpgMngQdamRzEliyG60t+I3KfsDJi0+180o=";
};
cargoHash = "sha256-tlz8WeFOxNPJxCqwqH98S/JkU7MZSDj/OaPvNkf6iwg=";
nativeBuildInputs = [ installShellFiles ];
postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
installShellCompletion --cmd trash \
--bash <($out/bin/trash completions bash) \
--fish <($out/bin/trash completions fish) \
--zsh <($out/bin/trash completions zsh) \
'';
meta = {
description = "Simple, fast, and featureful alternative to rm and trash-cli";
homepage = "https://github.com/oberblastmeister/trashy";
changelog = "https://github.com/oberblastmeister/trashy/blob/v${version}/CHANGELOG.md";
license = with lib.licenses; [
asl20 # or
mit
];
maintainers = with lib.maintainers; [ oberblastmeister ];
mainProgram = "trash";
# darwin is unsupported due to https://github.com/Byron/trash-rs/issues/8
platforms = lib.platforms.linux;
};
}