about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/system/tre-command
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/system/tre-command')
-rw-r--r--nixpkgs/pkgs/tools/system/tre-command/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/system/tre-command/default.nix b/nixpkgs/pkgs/tools/system/tre-command/default.nix
new file mode 100644
index 000000000000..f79c1625fbf2
--- /dev/null
+++ b/nixpkgs/pkgs/tools/system/tre-command/default.nix
@@ -0,0 +1,34 @@
+{ rustPlatform, fetchFromGitHub, lib, installShellFiles }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "tre-command";
+  version = "0.4.0";
+
+  src = fetchFromGitHub {
+    owner = "dduan";
+    repo = "tre";
+    rev = "v${version}";
+    sha256 = "sha256-JlkONhXMWLzxAf3SYoLkSvXw4bFYBnsCyyj0TUsezwg=";
+  };
+
+  cargoSha256 = "sha256-b3fScJMG/CIkMrahbELLQp1otmT5En+p8kQsip05SOc=";
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  preFixup = ''
+    installManPage manual/tre.1
+    installShellCompletion scripts/completion/tre.{bash,fish}
+    installShellCompletion --zsh scripts/completion/_tre
+  '';
+
+  # this test requires package to be in a git repo to succeed
+  checkFlags = "--skip respect_git_ignore";
+
+  meta = with lib; {
+    description = "Tree command, improved";
+    homepage = "https://github.com/dduan/tre";
+    license = licenses.mit;
+    maintainers = [ maintainers.dduan ];
+    mainProgram = "tre";
+  };
+}