about summary refs log tree commit diff
path: root/pkgs/tools/misc/trashy
diff options
context:
space:
mode:
authorbrian <littlebubu.shu@gmail.com>2022-08-23 09:39:30 -0400
committerbrian <littlebubu.shu@gmail.com>2022-08-23 09:39:30 -0400
commit6606e3daddb3b2e2ce73a8b64fd50ed49cfc3c1e (patch)
treeb9419f0469cda223c13d2d1f2354301949a16b42 /pkgs/tools/misc/trashy
parente8a34a3cbfbd0d359bc74b7c3c2eb6f966356a2f (diff)
trashy: init at 1.0.3
Diffstat (limited to 'pkgs/tools/misc/trashy')
-rw-r--r--pkgs/tools/misc/trashy/default.nix31
1 files changed, 31 insertions, 0 deletions
diff --git a/pkgs/tools/misc/trashy/default.nix b/pkgs/tools/misc/trashy/default.nix
new file mode 100644
index 0000000000000..7d3b3952a7ca3
--- /dev/null
+++ b/pkgs/tools/misc/trashy/default.nix
@@ -0,0 +1,31 @@
+{ lib, fetchFromGitHub, rustPlatform, installShellFiles }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "trashy";
+  version = "1.0.3";
+
+  src = fetchFromGitHub {
+    owner = "oberblastmeister";
+    repo = "trashy";
+    rev = "v${version}";
+    sha256 = "sha256-b50Q7knJzXKDfM1kw6wLvXunhgOXVs+zYvZx/NYqMdk=";
+  };
+
+  cargoSha256 = "sha256-2hNNLXuAHd1bquhHimniqryTVMfBmPAOossggICScqQ=";
+
+  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";
+    license = with licenses; [ asl20 /* or */ mit ];
+    maintainers = with maintainers; [ oberblastmeister ];
+  };
+}