depot/third_party/nixpkgs/pkgs/tools/misc/trashy/default.nix
Default email 4d5a95770c Project import generated by Copybara.
GitOrigin-RevId: 3c5319ad3aa51551182ac82ea17ab1c6b0f0df89
2023-03-04 15:14:45 +03:00

31 lines
984 B
Nix

{ lib, rustPlatform, fetchCrate, installShellFiles }:
rustPlatform.buildRustPackage rec {
pname = "trashy";
version = "2.0.0";
src = fetchCrate {
inherit pname version;
hash = "sha256-1xHyhAV8hpgMngQdamRzEliyG60t+I3KfsDJi0+180o=";
};
cargoHash = "sha256-ZWqWtWzb+CLH1ravBb/oV+aPxplEyiC1wEFhvchcLqg=";
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; {
description = "A 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 licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ oberblastmeister ];
mainProgram = "trash";
};
}