2021-07-14 22:03:04 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, stdenv
|
|
|
|
, installShellFiles
|
|
|
|
, pkg-config
|
|
|
|
, libiconv
|
|
|
|
, openssl
|
2022-03-05 16:20:37 +00:00
|
|
|
, DiskArbitration
|
|
|
|
, Foundation
|
2022-03-30 09:31:56 +00:00
|
|
|
, mandown
|
2021-12-06 16:07:01 +00:00
|
|
|
, zellij
|
2022-04-27 09:35:20 +00:00
|
|
|
, testers
|
2021-07-14 22:03:04 +00:00
|
|
|
}:
|
2021-04-26 19:14:03 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "zellij";
|
2022-08-12 12:06:08 +00:00
|
|
|
version = "0.31.1";
|
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}";
|
2022-08-12 12:06:08 +00:00
|
|
|
sha256 = "sha256-8ISOyfLNtLW244HkCOpB38fhafnxRaOBBezpVz4Mb2o=";
|
2021-04-26 19:14:03 +00:00
|
|
|
};
|
|
|
|
|
2022-08-12 12:06:08 +00:00
|
|
|
cargoSha256 = "sha256-lBmJL7p7mqfly6CmZBFR2FFD4QlAccCAYU251HuI9jY=";
|
2021-04-26 19:14:03 +00:00
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
nativeBuildInputs = [
|
2022-03-30 09:31:56 +00:00
|
|
|
mandown
|
2021-10-01 09:20:50 +00:00
|
|
|
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
|
2022-03-05 16:20:37 +00:00
|
|
|
DiskArbitration
|
|
|
|
Foundation
|
2021-10-01 09:20:50 +00:00
|
|
|
];
|
2021-04-26 19:14:03 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-03-30 09:31:56 +00:00
|
|
|
mandown docs/MANPAGE.md > zellij.1
|
|
|
|
installManPage zellij.1
|
|
|
|
|
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
|
|
|
'';
|
|
|
|
|
2022-04-27 09:35:20 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = zellij; };
|
2021-12-06 16:07:01 +00:00
|
|
|
|
2021-04-26 19:14:03 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A terminal workspace with batteries included";
|
|
|
|
homepage = "https://zellij.dev/";
|
2021-12-06 16:07:01 +00:00
|
|
|
changelog = "https://github.com/zellij-org/zellij/blob/v${version}/Changelog.md";
|
2021-04-26 19:14:03 +00:00
|
|
|
license = with licenses; [ mit ];
|
2022-06-16 17:23:12 +00:00
|
|
|
maintainers = with maintainers; [ therealansh _0x4A6F abbe thehedgeh0g ];
|
2021-04-26 19:14:03 +00:00
|
|
|
};
|
|
|
|
}
|