2018-08-04 15:24:13 -07:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, cmake, pkgconfig, openssl, CoreServices, cf-private }:
|
2017-12-28 22:13:47 -08:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-03-25 14:26:07 -07:00
|
|
|
pname = "zola";
|
2019-04-28 03:27:21 -07:00
|
|
|
version = "0.7.0";
|
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}";
|
2019-04-28 03:27:21 -07:00
|
|
|
sha256 = "02lr1n3gf0agj8x451ndyvv16lq7rccazp4nz9zy0pzwxwrlwhra";
|
2017-12-28 22:13:47 -08:00
|
|
|
};
|
|
|
|
|
2019-04-28 03:27:21 -07:00
|
|
|
cargoSha256 = "003dhh41fh337k3djibpj6hyd16xprbgws3lbp7x37p4lx7qlnfy";
|
2017-12-28 22:13:47 -08:00
|
|
|
|
2019-03-25 14:26:07 -07:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
|
|
|
buildInputs = [ openssl ] ++ stdenv.lib.optionals stdenv.isDarwin [ CoreServices cf-private ];
|
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";
|
|
|
|
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
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|