2020-09-04 21:20:00 -07:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, cmake, pkg-config, openssl, oniguruma, CoreServices }:
|
2017-12-28 22:13:47 -08:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-03-25 14:26:07 -07:00
|
|
|
pname = "zola";
|
2020-09-27 11:13:26 -07:00
|
|
|
version = "0.12.1";
|
2017-12-28 22:13:47 -08:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-11-17 14:53:15 -08:00
|
|
|
owner = "getzola";
|
2019-03-25 14:26:07 -07:00
|
|
|
repo = pname;
|
2017-12-28 22:13:47 -08:00
|
|
|
rev = "v${version}";
|
2020-09-27 11:13:26 -07:00
|
|
|
sha256 = "00fkcrr40v93z23h3q2wqlfx0120g59j6j9szk8nx9x85i40j3if";
|
2017-12-28 22:13:47 -08:00
|
|
|
};
|
|
|
|
|
2020-09-27 11:13:26 -07:00
|
|
|
cargoSha256 = "1wdypyy787dzdq5q64a9mjfygg0kli49yjzw7xh66sjd7263w9fs";
|
2020-02-13 18:00:26 -08:00
|
|
|
|
2020-02-17 22:22:38 -08:00
|
|
|
nativeBuildInputs = [ cmake pkg-config ];
|
2020-09-04 21:20:00 -07:00
|
|
|
buildInputs = [ openssl oniguruma ]
|
2019-06-19 14:19:13 -07:00
|
|
|
++ stdenv.lib.optional stdenv.isDarwin CoreServices;
|
2017-12-28 22:13:47 -08:00
|
|
|
|
2020-09-04 21:20:00 -07:00
|
|
|
RUSTONIG_SYSTEM_LIBONIG = true;
|
|
|
|
|
2017-12-28 22:13:47 -08:00
|
|
|
postInstall = ''
|
2018-11-17 14:53:15 -08:00
|
|
|
install -D -m 444 completions/zola.bash \
|
2017-12-28 22:13:47 -08:00
|
|
|
-t $out/share/bash-completion/completions
|
2018-11-17 14:53:15 -08:00
|
|
|
install -D -m 444 completions/_zola \
|
2017-12-28 22:13:47 -08:00
|
|
|
-t $out/share/zsh/site-functions
|
2018-11-17 14:53:15 -08:00
|
|
|
install -D -m 444 completions/zola.fish \
|
2017-12-28 22:13:47 -08:00
|
|
|
-t $out/share/fish/vendor_completions.d
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-11-17 14:53:15 -08:00
|
|
|
description = "A fast static site generator with everything built-in";
|
2020-02-17 22:22:38 -08:00
|
|
|
homepage = "https://www.getzola.org/";
|
2017-12-28 22:13:47 -08:00
|
|
|
license = licenses.mit;
|
2018-07-14 11:32:15 -07:00
|
|
|
maintainers = with maintainers; [ dywedir ];
|
2017-12-28 22:13:47 -08:00
|
|
|
};
|
|
|
|
}
|