2021-07-14 22:03:04 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, cmake, pkg-config, openssl, oniguruma, CoreServices, installShellFiles }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "zola";
|
2021-07-14 22:03:04 +00:00
|
|
|
version = "unstable-2021-07-10";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "getzola";
|
|
|
|
repo = pname;
|
2021-07-14 22:03:04 +00:00
|
|
|
# unstable because the latest release fails to build
|
|
|
|
rev = "8c3ce7d7fbc0d585d4cbf27598ac7dfe5acd96f1";
|
|
|
|
sha256 = "sha256-Tw3u96ZPb0yUXvtJ+rna6nnb0a+KfTEiR/PPEadFxDA=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
cargoSha256 = "sha256-mOO39LK7lQ5IxwMgfJpNwX/H5MZ3qKqfeDmnY8zXOx4=";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-14 22:03:04 +00:00
|
|
|
nativeBuildInputs = [ cmake pkg-config installShellFiles];
|
2020-09-25 04:45:31 +00:00
|
|
|
buildInputs = [ openssl oniguruma ]
|
2021-01-15 22:18:51 +00:00
|
|
|
++ lib.optional 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-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/";
|
|
|
|
license = licenses.mit;
|
2020-10-11 12:50:04 +00:00
|
|
|
maintainers = with maintainers; [ dywedir _0x4A6F ];
|
2021-07-14 22:03:04 +00:00
|
|
|
# set because of unstable-* version
|
|
|
|
mainProgram = "zola";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|