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

53 lines
1.1 KiB
Nix
Raw Normal View History

2021-07-06 07:05:57 +01:00
{ lib
, fetchFromGitHub
, rustPlatform
, stdenv
, installShellFiles
, pkg-config
, libiconv
, openssl
}:
2021-04-21 20:23:17 +01:00
rustPlatform.buildRustPackage rec {
pname = "zellij";
2021-11-10 17:33:57 +00:00
version = "0.20.1";
2021-04-21 20:23:17 +01:00
src = fetchFromGitHub {
owner = "zellij-org";
2021-07-06 07:05:57 +01:00
repo = "zellij";
2021-04-21 20:23:17 +01:00
rev = "v${version}";
2021-11-10 17:33:57 +00:00
sha256 = "sha256-VeFKUNAOhNvNAqIp4yg0dulIVC6vCvD3ClYjMg1vM1g=";
2021-04-21 20:23:17 +01:00
};
2021-11-10 17:33:57 +00:00
cargoSha256 = "sha256-qZjyl+irC5Cj3tpUs97jLxs1UB+7E1xZKbnF3TPFhKE=";
2021-04-21 20:23:17 +01:00
2021-09-29 20:46:59 +01:00
nativeBuildInputs = [
installShellFiles
pkg-config
];
2021-04-21 20:23:17 +01:00
2021-09-29 20:46:59 +01:00
buildInputs = [
openssl
] ++ lib.optionals stdenv.isDarwin [
libiconv
];
2021-04-21 20:23:17 +01:00
preCheck = ''
HOME=$TMPDIR
'';
postInstall = ''
installShellCompletion --cmd $pname \
2021-09-15 16:38:04 +01: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 20:23:17 +01:00
'';
meta = with lib; {
description = "A terminal workspace with batteries included";
homepage = "https://zellij.dev/";
license = with licenses; [ mit ];
2011-04-30 07:23:14 +01:00
maintainers = with maintainers; [ therealansh _0x4A6F ];
2021-04-21 20:23:17 +01:00
};
}