2021-07-14 01:47:16 +02:00
|
|
|
{ lib, stdenv, fetchFromGitHub, rustPlatform, cmake, pkg-config, openssl, oniguruma, CoreServices, installShellFiles }:
|
2017-12-29 07:13:47 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-03-25 22:26:07 +01:00
|
|
|
pname = "zola";
|
2021-07-18 18:53:45 +02:00
|
|
|
version = "unstable-2021-07-14";
|
2017-12-29 07:13:47 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-11-17 23:53:15 +01:00
|
|
|
owner = "getzola";
|
2019-03-25 22:26:07 +01:00
|
|
|
repo = pname;
|
2021-07-14 01:47:16 +02:00
|
|
|
# unstable because the latest release fails to build
|
2021-07-18 18:53:45 +02:00
|
|
|
rev = "312ffcb04c06c5f157b9fd2b944b858703238592";
|
|
|
|
sha256 = "0i5zqs1gwxhvsynb540c3azfi4357igr4i5p0bi3h7ras2asas8w";
|
2017-12-29 07:13:47 +01:00
|
|
|
};
|
|
|
|
|
2021-07-18 18:53:45 +02:00
|
|
|
cargoSha256 = "0g5z0s837cfwzral2zz0avp0xywyaa3l1adxg520qrnga7z0kbh8";
|
2020-02-14 03:00:26 +01:00
|
|
|
|
2021-07-14 01:47:16 +02:00
|
|
|
nativeBuildInputs = [ cmake pkg-config installShellFiles];
|
2020-09-05 06:20:00 +02:00
|
|
|
buildInputs = [ openssl oniguruma ]
|
2021-01-15 06:42:41 +01:00
|
|
|
++ lib.optional stdenv.isDarwin CoreServices;
|
2017-12-29 07:13:47 +01:00
|
|
|
|
2020-09-05 06:20:00 +02:00
|
|
|
RUSTONIG_SYSTEM_LIBONIG = true;
|
|
|
|
|
2017-12-29 07:13:47 +01:00
|
|
|
postInstall = ''
|
2021-07-14 01:47:16 +02:00
|
|
|
installShellCompletion --cmd zola \
|
|
|
|
--fish completions/zola.fish \
|
|
|
|
--zsh completions/_zola \
|
|
|
|
--bash completions/zola.bash
|
2017-12-29 07:13:47 +01:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2018-11-17 23:53:15 +01:00
|
|
|
description = "A fast static site generator with everything built-in";
|
2020-02-18 07:22:38 +01:00
|
|
|
homepage = "https://www.getzola.org/";
|
2017-12-29 07:13:47 +01:00
|
|
|
license = licenses.mit;
|
2021-07-18 19:10:33 +02:00
|
|
|
maintainers = with maintainers; [ dandellion dywedir _0x4A6F ];
|
2021-07-14 01:47:16 +02:00
|
|
|
# set because of unstable-* version
|
|
|
|
mainProgram = "zola";
|
2017-12-29 07:13:47 +01:00
|
|
|
};
|
|
|
|
}
|