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

47 lines
1.1 KiB
Nix
Raw Normal View History

2021-07-06 06:05:57 +00:00
{ lib
, fetchFromGitHub
, rustPlatform
, stdenv
, installShellFiles
, pkg-config
, libiconv
, openssl
2021-08-31 10:01:16 +00:00
, expect
2021-07-06 06:05:57 +00:00
}:
2021-04-21 19:23:17 +00:00
rustPlatform.buildRustPackage rec {
pname = "zellij";
2021-08-31 10:01:16 +00:00
version = "0.16.0";
2021-04-21 19:23:17 +00:00
src = fetchFromGitHub {
owner = "zellij-org";
2021-07-06 06:05:57 +00:00
repo = "zellij";
2021-04-21 19:23:17 +00:00
rev = "v${version}";
2021-08-31 10:01:16 +00:00
sha256 = "sha256-2DYNgPURQzHaR8wHKEzuXSzubrxsQHpl3H3ko4okY7M=";
2021-04-21 19:23:17 +00:00
};
2021-08-31 10:01:16 +00:00
cargoSha256 = "sha256-AxtXWBfOzdLCpRchaQJbBBs+6rIyF+2ralOflRvkY4k=";
2021-04-21 19:23:17 +00:00
2021-07-06 06:05:57 +00:00
nativeBuildInputs = [ installShellFiles pkg-config ];
2021-04-21 19:23:17 +00:00
2021-07-06 06:05:57 +00:00
buildInputs = [ openssl ] ++ lib.optionals stdenv.isDarwin [ libiconv ];
2021-04-21 19:23:17 +00:00
preCheck = ''
HOME=$TMPDIR
'';
postInstall = ''
installShellCompletion --cmd $pname \
2021-08-31 10:01:16 +00:00
--bash <(${expect}/bin/unbuffer $out/bin/zellij setup --generate-completion bash) \
--fish <(${expect}/bin/unbuffer $out/bin/zellij setup --generate-completion fish) \
--zsh <(${expect}/bin/unbuffer $out/bin/zellij setup --generate-completion zsh)
2021-04-21 19:23:17 +00:00
'';
meta = with lib; {
description = "A terminal workspace with batteries included";
homepage = "https://zellij.dev/";
license = with licenses; [ mit ];
2011-04-30 06:23:14 +00:00
maintainers = with maintainers; [ therealansh _0x4A6F ];
2021-04-21 19:23:17 +00:00
};
}