2023-03-04 12:14:45 +00:00
|
|
|
{ lib, rustPlatform, fetchCrate, installShellFiles }:
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "trashy";
|
2023-02-02 18:25:31 +00:00
|
|
|
version = "2.0.0";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
src = fetchCrate {
|
|
|
|
inherit pname version;
|
|
|
|
hash = "sha256-1xHyhAV8hpgMngQdamRzEliyG60t+I3KfsDJi0+180o=";
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
|
2023-03-04 12:14:45 +00:00
|
|
|
cargoHash = "sha256-ZWqWtWzb+CLH1ravBb/oV+aPxplEyiC1wEFhvchcLqg=";
|
2022-09-09 14:08:57 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ installShellFiles ];
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
installShellCompletion --cmd trash \
|
|
|
|
--bash <($out/bin/trash completions bash) \
|
|
|
|
--fish <($out/bin/trash completions fish) \
|
|
|
|
--zsh <($out/bin/trash completions zsh) \
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
2023-03-04 12:14:45 +00:00
|
|
|
description = "A simple, fast, and featureful alternative to rm and trash-cli";
|
2022-09-09 14:08:57 +00:00
|
|
|
homepage = "https://github.com/oberblastmeister/trashy";
|
2023-03-04 12:14:45 +00:00
|
|
|
changelog = "https://github.com/oberblastmeister/trashy/blob/v${version}/CHANGELOG.md";
|
2022-09-09 14:08:57 +00:00
|
|
|
license = with licenses; [ asl20 /* or */ mit ];
|
|
|
|
maintainers = with maintainers; [ oberblastmeister ];
|
2023-03-04 12:14:45 +00:00
|
|
|
mainProgram = "trash";
|
2023-05-24 13:37:59 +00:00
|
|
|
# darwin is unsupported due to https://github.com/Byron/trash-rs/issues/8
|
|
|
|
platforms = platforms.linux;
|
2022-09-09 14:08:57 +00:00
|
|
|
};
|
|
|
|
}
|