2021-10-01 09:20:50 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, oniguruma
|
|
|
|
, CoreServices
|
|
|
|
, installShellFiles
|
|
|
|
, libsass
|
2021-12-19 01:06:50 +00:00
|
|
|
, zola
|
|
|
|
, testVersion
|
2021-10-01 09:20:50 +00:00
|
|
|
}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "zola";
|
2021-12-19 01:06:50 +00:00
|
|
|
version = "0.15.2";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "getzola";
|
2021-12-06 16:07:01 +00:00
|
|
|
repo = "zola";
|
2021-08-08 23:34:03 +00:00
|
|
|
rev = "v${version}";
|
2021-12-19 01:06:50 +00:00
|
|
|
sha256 = "sha256-X4J3T/ob0NfCFxddadBtsPsDhfvesg6/sBJybWeubMM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
cargoSha256 = "sha256-0tynm/DTX2oiqZOdWjRBGPk8IPIN07x2+FCXQmQ4Fzo=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-10-01 09:20:50 +00:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
oniguruma
|
|
|
|
libsass
|
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
CoreServices
|
|
|
|
];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2020-09-25 04:45:31 +00:00
|
|
|
RUSTONIG_SYSTEM_LIBONIG = true;
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
postInstall = ''
|
2021-07-14 22:03:04 +00:00
|
|
|
installShellCompletion --cmd zola \
|
|
|
|
--fish completions/zola.fish \
|
|
|
|
--zsh completions/_zola \
|
|
|
|
--bash completions/zola.bash
|
2020-04-24 23:36:52 +00:00
|
|
|
'';
|
|
|
|
|
2021-12-19 01:06:50 +00:00
|
|
|
passthru.tests.version = testVersion { package = zola; };
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A fast static site generator with everything built-in";
|
|
|
|
homepage = "https://www.getzola.org/";
|
2021-08-08 23:34:03 +00:00
|
|
|
changelog = "https://github.com/getzola/zola/raw/v${version}/CHANGELOG.md";
|
2020-04-24 23:36:52 +00:00
|
|
|
license = licenses.mit;
|
2021-07-24 12:14:16 +00:00
|
|
|
maintainers = with maintainers; [ dandellion dywedir _0x4A6F ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|