2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, cmake, pkg-config, openssl, oniguruma, CoreServices }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "zola";
|
2021-01-15 22:18:51 +00:00
|
|
|
version = "0.13.0";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "getzola";
|
|
|
|
repo = pname;
|
|
|
|
rev = "v${version}";
|
2021-01-15 22:18:51 +00:00
|
|
|
sha256 = "sha256-yTvFQWmNxoB+CNZLHGmzJq7mKuOUxUqV4g8PWlOlRbM=";
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
cargoSha256 = "sha256:19vijhcs1i02jhz68acil7psv3pcn0jzi1i4y2l05i4m3ayxivjf";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
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 = ''
|
|
|
|
install -D -m 444 completions/zola.bash \
|
|
|
|
-t $out/share/bash-completion/completions
|
|
|
|
install -D -m 444 completions/_zola \
|
|
|
|
-t $out/share/zsh/site-functions
|
|
|
|
install -D -m 444 completions/zola.fish \
|
|
|
|
-t $out/share/fish/vendor_completions.d
|
|
|
|
'';
|
|
|
|
|
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 ];
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|