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