2021-07-14 22:03:04 +00:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, stdenv
|
|
|
|
, installShellFiles
|
2023-11-16 04:20:00 +00:00
|
|
|
, perl
|
2021-07-14 22:03:04 +00:00
|
|
|
, 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";
|
2024-05-15 15:35:15 +00:00
|
|
|
version = "0.40.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}";
|
2024-05-15 15:35:15 +00:00
|
|
|
hash = "sha256-n8cwsCeKWzTw/psvLL3chBr8EcwGoeKB8JeiLSLna1k=";
|
2021-04-26 19:14:03 +00:00
|
|
|
};
|
|
|
|
|
2024-05-15 15:35:15 +00:00
|
|
|
cargoHash = "sha256-TyIQaovmpiu7USURA//+IQWNT95rrVk0x9TRspXYUNk=";
|
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
|
2023-11-16 04:20:00 +00:00
|
|
|
perl
|
2021-10-01 09:20:50 +00:00
|
|
|
pkg-config
|
|
|
|
];
|
2021-04-26 19:14:03 +00:00
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
buildInputs = [
|
|
|
|
openssl
|
2024-09-26 11:04:55 +00:00
|
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
2021-10-01 09:20:50 +00:00
|
|
|
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
|
|
|
|
|
2024-09-19 14:19:46 +00:00
|
|
|
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
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; {
|
2024-06-20 14:57:18 +00:00
|
|
|
description = "Terminal workspace with batteries included";
|
2021-04-26 19:14:03 +00:00
|
|
|
homepage = "https://zellij.dev/";
|
2022-08-21 13:32:41 +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 ];
|
2024-05-15 15:35:15 +00:00
|
|
|
maintainers = with maintainers; [ therealansh _0x4A6F abbe pyrox0 ];
|
2023-08-22 20:05:09 +00:00
|
|
|
mainProgram = "zellij";
|
2021-04-26 19:14:03 +00:00
|
|
|
};
|
|
|
|
}
|