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

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

62 lines
1.3 KiB
Nix
Raw Normal View History

2021-07-06 09:05:57 +03:00
{ lib
, fetchFromGitHub
, rustPlatform
, stdenv
, installShellFiles
, pkg-config
, libiconv
, openssl
, DiskArbitration
, Foundation
, zellij
, testVersion
2021-07-06 09:05:57 +03:00
}:
2021-04-21 22:23:17 +03:00
rustPlatform.buildRustPackage rec {
pname = "zellij";
2022-02-22 19:39:17 +03:00
version = "0.25.0";
2021-04-21 22:23:17 +03:00
src = fetchFromGitHub {
owner = "zellij-org";
2021-07-06 09:05:57 +03:00
repo = "zellij";
2021-04-21 22:23:17 +03:00
rev = "v${version}";
2022-02-22 19:39:17 +03:00
sha256 = "sha256-MTSM8fYAcNcmjg6bkOEN+U5+WilaEy52EJOfyoIy3Zg=";
2021-04-21 22:23:17 +03:00
};
2022-02-22 19:39:17 +03:00
cargoSha256 = "sha256-2QEDrxTz7I9hF+WfVKkGLXHWZjQ5by/zuO16NGOJSKk=";
2021-04-21 22:23:17 +03:00
2021-09-29 22:46:59 +03:00
nativeBuildInputs = [
installShellFiles
pkg-config
];
2021-04-21 22:23:17 +03:00
2021-09-29 22:46:59 +03:00
buildInputs = [
openssl
] ++ lib.optionals stdenv.isDarwin [
libiconv
DiskArbitration
Foundation
2021-09-29 22:46:59 +03:00
];
2021-04-21 22:23:17 +03:00
preCheck = ''
HOME=$TMPDIR
'';
postInstall = ''
installShellCompletion --cmd $pname \
2021-09-15 18:38:04 +03: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 22:23:17 +03:00
'';
2021-11-30 01:00:43 +03:00
passthru.tests.version = testVersion { package = zellij; };
2021-04-21 22:23:17 +03:00
meta = with lib; {
description = "A terminal workspace with batteries included";
homepage = "https://zellij.dev/";
2021-11-30 01:00:43 +03:00
changelog = "https://github.com/zellij-org/zellij/blob/v${version}/Changelog.md";
2021-04-21 22:23:17 +03:00
license = with licenses; [ mit ];
2022-02-22 22:38:22 +03:00
maintainers = with maintainers; [ therealansh _0x4A6F abbe ];
2021-04-21 22:23:17 +03:00
};
}