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