1 { lib, rustPlatform, fetchCrate, installShellFiles, stdenv }:
3 rustPlatform.buildRustPackage rec {
9 hash = "sha256-1xHyhAV8hpgMngQdamRzEliyG60t+I3KfsDJi0+180o=";
12 cargoHash = "sha256-ZWqWtWzb+CLH1ravBb/oV+aPxplEyiC1wEFhvchcLqg=";
14 nativeBuildInputs = [ installShellFiles ];
16 postInstall = lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
17 installShellCompletion --cmd trash \
18 --bash <($out/bin/trash completions bash) \
19 --fish <($out/bin/trash completions fish) \
20 --zsh <($out/bin/trash completions zsh) \
24 description = "Simple, fast, and featureful alternative to rm and trash-cli";
25 homepage = "https://github.com/oberblastmeister/trashy";
26 changelog = "https://github.com/oberblastmeister/trashy/blob/v${version}/CHANGELOG.md";
27 license = with licenses; [ asl20 /* or */ mit ];
28 maintainers = with maintainers; [ oberblastmeister ];
29 mainProgram = "trash";
30 # darwin is unsupported due to https://github.com/Byron/trash-rs/issues/8
31 platforms = platforms.linux;