nixpkgs/pkgs/tools/misc/zellij/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

67 lines
1.4 KiB
Nix
Raw Normal View History

2021-07-06 08:05:57 +02:00
{ lib
, fetchFromGitHub
, rustPlatform
, stdenv
, installShellFiles
, pkg-config
, libiconv
, openssl
, DiskArbitration
, Foundation
, mandown
, zellij
, testers
2021-07-06 08:05:57 +02:00
}:
2021-04-21 21:23:17 +02:00
rustPlatform.buildRustPackage rec {
pname = "zellij";
2022-06-08 14:27:08 +02:00
version = "0.30.0";
2021-04-21 21:23:17 +02:00
src = fetchFromGitHub {
owner = "zellij-org";
2021-07-06 08:05:57 +02:00
repo = "zellij";
2021-04-21 21:23:17 +02:00
rev = "v${version}";
2022-06-08 14:27:08 +02:00
sha256 = "sha256-T2mkkE7z6AhHnn/77HcrvbY+32EOwE8jjh+veVOE1CY=";
2021-04-21 21:23:17 +02:00
};
2022-06-08 14:27:08 +02:00
cargoSha256 = "sha256-XTaQbMK7R43CE03niUaBzlYN4xRo7pUFdNYvUeA+MwA=";
2021-04-21 21:23:17 +02:00
2021-09-29 21:46:59 +02:00
nativeBuildInputs = [
mandown
2021-09-29 21:46:59 +02:00
installShellFiles
pkg-config
];
2021-04-21 21:23:17 +02:00
2021-09-29 21:46:59 +02:00
buildInputs = [
openssl
] ++ lib.optionals stdenv.isDarwin [
libiconv
DiskArbitration
Foundation
2021-09-29 21:46:59 +02:00
];
2021-04-21 21:23:17 +02:00
preCheck = ''
HOME=$TMPDIR
'';
postInstall = ''
mandown docs/MANPAGE.md > zellij.1
installManPage zellij.1
installShellCompletion --cmd $pname \
2021-09-15 17:38:04 +02: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 21:23:17 +02:00
'';
passthru.tests.version = testers.testVersion { package = zellij; };
2021-11-29 23:00:43 +01:00
2021-04-21 21:23:17 +02:00
meta = with lib; {
description = "A terminal workspace with batteries included";
homepage = "https://zellij.dev/";
2021-11-29 23:00:43 +01:00
changelog = "https://github.com/zellij-org/zellij/blob/v${version}/Changelog.md";
2021-04-21 21:23:17 +02:00
license = with licenses; [ mit ];
2022-06-08 14:27:08 +02:00
maintainers = with maintainers; [ therealansh _0x4A6F abbe thehedgeh0g ];
2021-04-21 21:23:17 +02:00
};
}