2021-09-24 10:45:42 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, oniguruma
|
|
|
|
, CoreServices
|
|
|
|
, installShellFiles
|
|
|
|
, libsass
|
2021-12-08 21:29:35 +00:00
|
|
|
, zola
|
2022-04-20 14:40:48 +00:00
|
|
|
, testers
|
2021-09-24 10:45:42 +00:00
|
|
|
}:
|
2017-12-29 06:13:47 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-03-25 21:26:07 +00:00
|
|
|
pname = "zola";
|
2023-03-21 09:37:00 +00:00
|
|
|
version = "0.17.2";
|
2017-12-29 06:13:47 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-11-17 22:53:15 +00:00
|
|
|
owner = "getzola";
|
2021-12-05 21:06:58 +00:00
|
|
|
repo = "zola";
|
2021-08-08 11:00:00 +00:00
|
|
|
rev = "v${version}";
|
2023-03-21 09:37:00 +00:00
|
|
|
hash = "sha256-br7VpxkVMZ/TgwMaFbnVMOw9RemNjur/UYnloMoDzHs=";
|
2017-12-29 06:13:47 +00:00
|
|
|
};
|
|
|
|
|
2023-03-21 09:37:00 +00:00
|
|
|
cargoHash = "sha256-AAub8UwAvX3zNX+SM/T9biyNxFTgfqUQG/MUGfwWuno=";
|
2020-02-14 02:00:26 +00:00
|
|
|
|
2021-09-24 10:45:42 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
oniguruma
|
|
|
|
libsass
|
2021-09-29 19:56:51 +00:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
CoreServices
|
2021-09-24 10:45:42 +00:00
|
|
|
];
|
2017-12-29 06:13:47 +00:00
|
|
|
|
2020-09-05 04:20:00 +00:00
|
|
|
RUSTONIG_SYSTEM_LIBONIG = true;
|
|
|
|
|
2017-12-29 06:13:47 +00:00
|
|
|
postInstall = ''
|
2021-07-13 23:47:16 +00:00
|
|
|
installShellCompletion --cmd zola \
|
2023-02-28 21:54:29 +00:00
|
|
|
--bash <($out/bin/zola completion bash) \
|
|
|
|
--fish <($out/bin/zola completion fish) \
|
|
|
|
--zsh <($out/bin/zola completion zsh)
|
2017-12-29 06:13:47 +00:00
|
|
|
'';
|
|
|
|
|
2022-04-20 14:40:48 +00:00
|
|
|
passthru.tests.version = testers.testVersion { package = zola; };
|
2021-12-08 21:29:35 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-11-17 22:53:15 +00:00
|
|
|
description = "A fast static site generator with everything built-in";
|
2020-02-18 06:22:38 +00:00
|
|
|
homepage = "https://www.getzola.org/";
|
2021-08-08 11:00:00 +00:00
|
|
|
changelog = "https://github.com/getzola/zola/raw/v${version}/CHANGELOG.md";
|
2017-12-29 06:13:47 +00:00
|
|
|
license = licenses.mit;
|
2021-07-18 17:10:33 +00:00
|
|
|
maintainers = with maintainers; [ dandellion dywedir _0x4A6F ];
|
2017-12-29 06:13:47 +00:00
|
|
|
};
|
|
|
|
}
|