7e47f3658e
GitOrigin-RevId: 1925c603f17fc89f4c8f6bf6f631a802ad85d784
70 lines
1.6 KiB
Nix
70 lines
1.6 KiB
Nix
{ lib
|
|
, fetchFromGitHub
|
|
, rustPlatform
|
|
, stdenv
|
|
, installShellFiles
|
|
, perl
|
|
, pkg-config
|
|
, libiconv
|
|
, openssl
|
|
, DiskArbitration
|
|
, Foundation
|
|
, mandown
|
|
, zellij
|
|
, testers
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "zellij";
|
|
version = "0.40.1";
|
|
|
|
src = fetchFromGitHub {
|
|
owner = "zellij-org";
|
|
repo = "zellij";
|
|
rev = "v${version}";
|
|
hash = "sha256-n8cwsCeKWzTw/psvLL3chBr8EcwGoeKB8JeiLSLna1k=";
|
|
};
|
|
|
|
cargoHash = "sha256-TyIQaovmpiu7USURA//+IQWNT95rrVk0x9TRspXYUNk=";
|
|
|
|
nativeBuildInputs = [
|
|
mandown
|
|
installShellFiles
|
|
perl
|
|
pkg-config
|
|
];
|
|
|
|
buildInputs = [
|
|
openssl
|
|
] ++ lib.optionals stdenv.hostPlatform.isDarwin [
|
|
libiconv
|
|
DiskArbitration
|
|
Foundation
|
|
];
|
|
|
|
preCheck = ''
|
|
HOME=$TMPDIR
|
|
'';
|
|
|
|
postInstall = ''
|
|
mandown docs/MANPAGE.md > zellij.1
|
|
installManPage zellij.1
|
|
|
|
'' + lib.optionalString (stdenv.buildPlatform.canExecute stdenv.hostPlatform) ''
|
|
installShellCompletion --cmd $pname \
|
|
--bash <($out/bin/zellij setup --generate-completion bash) \
|
|
--fish <($out/bin/zellij setup --generate-completion fish) \
|
|
--zsh <($out/bin/zellij setup --generate-completion zsh)
|
|
'';
|
|
|
|
passthru.tests.version = testers.testVersion { package = zellij; };
|
|
|
|
meta = with lib; {
|
|
description = "Terminal workspace with batteries included";
|
|
homepage = "https://zellij.dev/";
|
|
changelog = "https://github.com/zellij-org/zellij/blob/v${version}/CHANGELOG.md";
|
|
license = with licenses; [ mit ];
|
|
maintainers = with maintainers; [ therealansh _0x4A6F abbe pyrox0 ];
|
|
mainProgram = "zellij";
|
|
};
|
|
}
|