nixpkgs/pkgs/tools/misc/trashy/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

34 lines
1.1 KiB
Nix
Raw Normal View History

2023-02-26 05:14:15 +00:00
{ lib, rustPlatform, fetchCrate, installShellFiles }:
2022-08-23 13:39:30 +00:00
rustPlatform.buildRustPackage rec {
pname = "trashy";
2023-01-25 02:48:59 +00:00
version = "2.0.0";
2022-08-23 13:39:30 +00:00
2023-02-26 05:14:15 +00:00
src = fetchCrate {
inherit pname version;
hash = "sha256-1xHyhAV8hpgMngQdamRzEliyG60t+I3KfsDJi0+180o=";
2022-08-23 13:39:30 +00:00
};
2023-02-26 05:14:15 +00:00
cargoHash = "sha256-ZWqWtWzb+CLH1ravBb/oV+aPxplEyiC1wEFhvchcLqg=";
2022-08-23 13:39:30 +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-02-26 05:14:15 +00:00
description = "A simple, fast, and featureful alternative to rm and trash-cli";
2022-08-23 13:39:30 +00:00
homepage = "https://github.com/oberblastmeister/trashy";
2023-02-26 05:14:15 +00:00
changelog = "https://github.com/oberblastmeister/trashy/blob/v${version}/CHANGELOG.md";
2022-08-23 13:39:30 +00:00
license = with licenses; [ asl20 /* or */ mit ];
maintainers = with maintainers; [ oberblastmeister ];
2023-02-26 05:14:15 +00:00
mainProgram = "trash";
2023-05-14 20:49:43 +00:00
# darwin is unsupported due to https://github.com/Byron/trash-rs/issues/8
platforms = platforms.linux;
2022-08-23 13:39:30 +00:00
};
}