2021-07-14 22:03:04 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, stdenv
|
|
|
|
, installShellFiles
|
|
|
|
, pkg-config
|
|
|
|
, libiconv
|
|
|
|
, openssl
|
|
|
|
}:
|
2021-04-26 19:14:03 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "zellij";
|
2021-10-28 06:52:43 +00:00
|
|
|
version = "0.19.0";
|
2021-04-26 19:14:03 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "zellij-org";
|
2021-07-14 22:03:04 +00:00
|
|
|
repo = "zellij";
|
2021-04-26 19:14:03 +00:00
|
|
|
rev = "v${version}";
|
2021-10-28 06:52:43 +00:00
|
|
|
sha256 = "sha256-/1ngmthzWp9K7pBBOBiSMUv0yC66K3Tg2g2PoBskpTU=";
|
2021-04-26 19:14:03 +00:00
|
|
|
};
|
|
|
|
|
2021-10-28 06:52:43 +00:00
|
|
|
cargoSha256 = "sha256-eFWsqjXO6QFTO26ppZ4tiJXc/PEYD+5ZdbTBMoDoLFI=";
|
2021-04-26 19:14:03 +00:00
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
installShellFiles
|
|
|
|
pkg-config
|
|
|
|
];
|
2021-04-26 19:14:03 +00:00
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
libiconv
|
|
|
|
];
|
2021-04-26 19:14:03 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2021-05-03 20:48:10 +00:00
|
|
|
installShellCompletion --cmd $pname \
|
2021-05-20 23:08:51 +00: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-26 19:14:03 +00:00
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A terminal workspace with batteries included";
|
|
|
|
homepage = "https://zellij.dev/";
|
|
|
|
license = with licenses; [ mit ];
|
2021-05-03 20:48:10 +00:00
|
|
|
maintainers = with maintainers; [ therealansh _0x4A6F ];
|
2021-04-26 19:14:03 +00:00
|
|
|
};
|
|
|
|
}
|