nixpkgs/pkgs/tools/misc/zellij/default.nix
2021-05-08 09:03:32 +09:00

38 lines
1016 B
Nix

{ lib, fetchFromGitHub, rustPlatform, stdenv, installShellFiles, libiconv }:
rustPlatform.buildRustPackage rec {
pname = "zellij";
version = "0.8.0";
src = fetchFromGitHub {
owner = "zellij-org";
repo = pname;
rev = "v${version}";
sha256 = "sha256-armEkYiRQ2RvKFUtNlnMejkNSLJOEQpFzUPduNJatMo=";
};
cargoSha256 = "sha256-68UfDlQ1KuGZwcuSNeOCwULxS+Ei16lEydrO4CssD3Y=";
nativeBuildInputs = [ installShellFiles ];
buildInputs = lib.optionals stdenv.isDarwin [ libiconv ];
preCheck = ''
HOME=$TMPDIR
'';
postInstall = ''
installShellCompletion --cmd $pname \
--bash <($out/bin/zellij generate-completion bash) \
--fish <($out/bin/zellij generate-completion fish) \
--zsh <($out/bin/zellij generate-completion zsh)
'';
meta = with lib; {
description = "A terminal workspace with batteries included";
homepage = "https://zellij.dev/";
license = with licenses; [ mit ];
maintainers = with maintainers; [ therealansh _0x4A6F ];
};
}