about summary refs log tree commit diff
path: root/nixpkgs/pkgs/tools/misc/zellij/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/tools/misc/zellij/default.nix')
-rw-r--r--nixpkgs/pkgs/tools/misc/zellij/default.nix34
1 files changed, 34 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/tools/misc/zellij/default.nix b/nixpkgs/pkgs/tools/misc/zellij/default.nix
new file mode 100644
index 000000000000..2f5f22193466
--- /dev/null
+++ b/nixpkgs/pkgs/tools/misc/zellij/default.nix
@@ -0,0 +1,34 @@
+{ lib, fetchFromGitHub, rustPlatform, stdenv, installShellFiles, libiconv }:
+
+rustPlatform.buildRustPackage rec {
+  pname = "zellij";
+  version = "0.5.1";
+
+  src = fetchFromGitHub {
+    owner = "zellij-org";
+    repo = pname;
+    rev = "v${version}";
+    sha256 = "102zw4napzx05rpmx6scl6il55syf3lw1gzmy1y66cg1f70sij4d";
+  };
+
+  cargoSha256 = "121fsch0an6d2hqaq0ws9cm7g5ppzfrycmmhajfacfg6wbiax1m5";
+
+  nativeBuildInputs = [ installShellFiles ];
+
+  buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
+
+  preCheck = ''
+    HOME=$TMPDIR
+  '';
+
+  postInstall = ''
+    installShellCompletion assets/completions/zellij.{bash,fish} --zsh assets/completions/_zellij
+  '';
+
+  meta = with lib; {
+    description = "A terminal workspace with batteries included";
+    homepage = "https://zellij.dev/";
+    license = with licenses; [ mit ];
+    maintainers = with maintainers; [ therealansh ];
+  };
+}