2021-01-11 10:54:33 +03:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, cmake, pkg-config, openssl, oniguruma, CoreServices }:
|
2017-12-29 09:13:47 +03:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-03-26 00:26:07 +03:00
|
|
|
pname = "zola";
|
2021-01-09 19:44:44 +03:00
|
|
|
version = "0.13.0";
|
2017-12-29 09:13:47 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-11-18 01:53:15 +03:00
|
|
|
owner = "getzola";
|
2019-03-26 00:26:07 +03:00
|
|
|
repo = pname;
|
2017-12-29 09:13:47 +03:00
|
|
|
rev = "v${version}";
|
2021-01-09 19:44:44 +03:00
|
|
|
sha256 = "sha256-yTvFQWmNxoB+CNZLHGmzJq7mKuOUxUqV4g8PWlOlRbM=";
|
2017-12-29 09:13:47 +03:00
|
|
|
};
|
|
|
|
|
2021-01-09 19:44:44 +03:00
|
|
|
cargoSha256 = "sha256:19vijhcs1i02jhz68acil7psv3pcn0jzi1i4y2l05i4m3ayxivjf";
|
2020-02-14 05:00:26 +03:00
|
|
|
|
2020-02-18 09:22:38 +03:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-09-05 07:20:00 +03:00
|
|
|
buildInputs = [ openssl oniguruma ]
|
2021-01-15 08:42:41 +03:00
|
|
|
++ lib.optional stdenv.isDarwin CoreServices;
|
2017-12-29 09:13:47 +03:00
|
|
|
|
2020-09-05 07:20:00 +03:00
|
|
|
RUSTONIG_SYSTEM_LIBONIG = true;
|
|
|
|
|
2017-12-29 09:13:47 +03:00
|
|
|
postInstall = ''
|
2018-11-18 01:53:15 +03:00
|
|
|
install -D -m 444 completions/zola.bash \
|
2017-12-29 09:13:47 +03:00
|
|
|
-t $out/share/bash-completion/completions
|
2018-11-18 01:53:15 +03:00
|
|
|
install -D -m 444 completions/_zola \
|
2017-12-29 09:13:47 +03:00
|
|
|
-t $out/share/zsh/site-functions
|
2018-11-18 01:53:15 +03:00
|
|
|
install -D -m 444 completions/zola.fish \
|
2017-12-29 09:13:47 +03:00
|
|
|
-t $out/share/fish/vendor_completions.d
|
|
|
|
'';
|
|
|
|
|
2021-01-11 10:54:33 +03:00
|
|
|
meta = with lib; {
|
2018-11-18 01:53:15 +03:00
|
|
|
description = "A fast static site generator with everything built-in";
|
2020-02-18 09:22:38 +03:00
|
|
|
homepage = "https://www.getzola.org/";
|
2017-12-29 09:13:47 +03:00
|
|
|
license = licenses.mit;
|
2020-10-02 04:34:37 +03:00
|
|
|
maintainers = with maintainers; [ dywedir _0x4A6F ];
|
2017-12-29 09:13:47 +03:00
|
|
|
};
|
|
|
|
}
|