2021-07-06 06:05:57 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, stdenv
|
|
|
|
, installShellFiles
|
2023-11-07 09:21:03 +00:00
|
|
|
, perl
|
2021-07-06 06:05:57 +00:00
|
|
|
, pkg-config
|
|
|
|
, libiconv
|
|
|
|
, openssl
|
2022-02-22 16:58:40 +00:00
|
|
|
, DiskArbitration
|
|
|
|
, Foundation
|
2022-03-11 22:42:57 +00:00
|
|
|
, mandown
|
2022-02-23 05:20:33 +00:00
|
|
|
, zellij
|
2022-04-20 14:40:48 +00:00
|
|
|
, testers
|
2021-07-06 06:05:57 +00:00
|
|
|
}:
|
2021-04-21 19:23:17 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "zellij";
|
2023-11-29 11:03:10 +00:00
|
|
|
version = "0.39.2";
|
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}";
|
2023-11-29 11:03:10 +00:00
|
|
|
hash = "sha256-FSLbRfxSWY0a9H9iHT3oQ2SXwB70AwyH0Cm8sDZGaUk=";
|
2021-04-21 19:23:17 +00:00
|
|
|
};
|
|
|
|
|
2023-11-29 11:03:10 +00:00
|
|
|
cargoHash = "sha256-a5dFtK5czOGqE6mKeeI0kkY2da1kS3IRZ1NTluZ9Syc=";
|
2021-04-21 19:23:17 +00:00
|
|
|
|
2021-09-29 19:46:59 +00:00
|
|
|
nativeBuildInputs = [
|
2022-03-11 22:42:57 +00:00
|
|
|
mandown
|
2021-09-29 19:46:59 +00:00
|
|
|
installShellFiles
|
2023-11-07 09:21:03 +00:00
|
|
|
perl
|
2021-09-29 19:46:59 +00:00
|
|
|
pkg-config
|
|
|
|
];
|
2021-04-21 19:23:17 +00:00
|
|
|
|
2021-09-29 19:46:59 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
libiconv
|
2022-02-22 16:58:40 +00:00
|
|
|
DiskArbitration
|
|
|
|
Foundation
|
2021-09-29 19:46:59 +00:00
|
|
|
];
|
2021-04-21 19:23:17 +00:00
|
|
|
|
|
|
|
preCheck = ''
|
|
|
|
HOME=$TMPDIR
|
|
|
|
'';
|
|
|
|
|
|
|
|
postInstall = ''
|
2022-03-11 22:42:57 +00:00
|
|
|
mandown docs/MANPAGE.md > zellij.1
|
|
|
|
installManPage zellij.1
|
|
|
|
|
2021-04-29 18:50:26 +00:00
|
|
|
installShellCompletion --cmd $pname \
|
2021-09-15 15:38:04 +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-21 19:23:17 +00:00
|
|
|
'';
|
|
|
|
|
2022-04-20 14:40:48 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = zellij; };
|
2021-11-29 22:00:43 +00:00
|
|
|
|
2021-04-21 19:23:17 +00:00
|
|
|
meta = with lib; {
|
|
|
|
description = "A terminal workspace with batteries included";
|
|
|
|
homepage = "https://zellij.dev/";
|
2022-08-18 05:51:12 +00:00
|
|
|
changelog = "https://github.com/zellij-org/zellij/blob/v${version}/CHANGELOG.md";
|
2021-04-21 19:23:17 +00:00
|
|
|
license = with licenses; [ mit ];
|
2022-06-08 12:27:08 +00:00
|
|
|
maintainers = with maintainers; [ therealansh _0x4A6F abbe thehedgeh0g ];
|
2023-08-20 19:50:57 +00:00
|
|
|
mainProgram = "zellij";
|
2021-04-21 19:23:17 +00:00
|
|
|
};
|
|
|
|
}
|