2021-09-24 11:45:42 +01:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, rustPlatform
|
|
|
|
, cmake
|
|
|
|
, pkg-config
|
|
|
|
, openssl
|
|
|
|
, oniguruma
|
|
|
|
, CoreServices
|
|
|
|
, installShellFiles
|
|
|
|
, libsass
|
|
|
|
}:
|
2017-12-29 06:13:47 +00:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-03-25 21:26:07 +00:00
|
|
|
pname = "zola";
|
2021-08-24 19:50:07 +01:00
|
|
|
version = "0.14.1";
|
2017-12-29 06:13:47 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-11-17 22:53:15 +00:00
|
|
|
owner = "getzola";
|
2019-03-25 21:26:07 +00:00
|
|
|
repo = pname;
|
2021-08-08 12:00:00 +01:00
|
|
|
rev = "v${version}";
|
2021-08-24 19:50:07 +01:00
|
|
|
sha256 = "1cvvxiginwf1rldijzwk9gh63qc0ls5d7j3j8ri7yhk21pz9f6bi";
|
2017-12-29 06:13:47 +00:00
|
|
|
};
|
|
|
|
|
2021-08-24 19:50:07 +01:00
|
|
|
cargoSha256 = "1hg8j9a8c6c3ap24jd96y07rlp4f0s2mkyx5034nlnkm3lj4q42n";
|
2020-02-14 02:00:26 +00:00
|
|
|
|
2021-09-24 11:45:42 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
cmake
|
|
|
|
pkg-config
|
|
|
|
installShellFiles
|
|
|
|
];
|
|
|
|
buildInputs = [
|
|
|
|
openssl
|
|
|
|
oniguruma
|
|
|
|
libsass
|
2021-09-29 20:56:51 +01:00
|
|
|
] ++ lib.optionals stdenv.isDarwin [
|
|
|
|
CoreServices
|
2021-09-24 11:45:42 +01:00
|
|
|
];
|
2017-12-29 06:13:47 +00:00
|
|
|
|
2020-09-05 05:20:00 +01:00
|
|
|
RUSTONIG_SYSTEM_LIBONIG = true;
|
|
|
|
|
2017-12-29 06:13:47 +00:00
|
|
|
postInstall = ''
|
2021-07-14 00:47:16 +01:00
|
|
|
installShellCompletion --cmd zola \
|
|
|
|
--fish completions/zola.fish \
|
|
|
|
--zsh completions/_zola \
|
|
|
|
--bash completions/zola.bash
|
2017-12-29 06:13:47 +00:00
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-11-17 22:53:15 +00:00
|
|
|
description = "A fast static site generator with everything built-in";
|
2020-02-18 06:22:38 +00:00
|
|
|
homepage = "https://www.getzola.org/";
|
2021-08-08 12:00:00 +01:00
|
|
|
changelog = "https://github.com/getzola/zola/raw/v${version}/CHANGELOG.md";
|
2017-12-29 06:13:47 +00:00
|
|
|
license = licenses.mit;
|
2021-07-18 18:10:33 +01:00
|
|
|
maintainers = with maintainers; [ dandellion dywedir _0x4A6F ];
|
2021-07-14 00:47:16 +01:00
|
|
|
# set because of unstable-* version
|
|
|
|
mainProgram = "zola";
|
2017-12-29 06:13:47 +00:00
|
|
|
};
|
|
|
|
}
|