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

38 lines
1 KiB
Nix
Raw Normal View History

2021-04-21 21:23:17 +02:00
{ lib, fetchFromGitHub, rustPlatform, stdenv, installShellFiles, libiconv }:
rustPlatform.buildRustPackage rec {
pname = "zellij";
2021-06-04 23:32:44 +02:00
version = "0.13.0";
2021-04-21 21:23:17 +02:00
src = fetchFromGitHub {
owner = "zellij-org";
repo = pname;
rev = "v${version}";
2021-06-04 23:32:44 +02:00
sha256 = "sha256-m7rAlFMhkX6+l+OceZ/RnusdhGew+Rjp7AmZ7vo2wr0=";
2021-04-21 21:23:17 +02:00
};
2021-06-04 23:32:44 +02:00
cargoSha256 = "sha256-iTPOlbS3gWlJ8E2VB7z/kOsOJcngPGof7R5cH3Z0xk0=";
2021-04-21 21:23:17 +02:00
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
preCheck = ''
HOME=$TMPDIR
'';
postInstall = ''
installShellCompletion --cmd $pname \
2021-05-15 18:59:42 +02:00
--bash <($out/bin/zellij setup --generate-completion bash) \
--fish <($out/bin/zellij setup --generate-completion fish) \
--zsh <($out/bin/zellij setup --generate-completion zsh)
2021-04-21 21:23:17 +02:00
'';
meta = with lib; {
description = "A terminal workspace with batteries included";
homepage = "https://zellij.dev/";
license = with licenses; [ mit ];
2011-04-30 08:23:14 +02:00
maintainers = with maintainers; [ therealansh _0x4A6F ];
2021-04-21 21:23:17 +02:00
};
}