nixpkgs-suyu/pkgs/applications/misc/zola/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.2 KiB
Nix
Raw Normal View History

2021-09-24 12:45:42 +02:00
{ lib
, stdenv
, fetchFromGitHub
, rustPlatform
, cmake
, pkg-config
, openssl
, oniguruma
, CoreServices
, installShellFiles
, libsass
2021-12-08 22:29:35 +01:00
, zola
, testers
2021-09-24 12:45:42 +02:00
}:
2017-12-29 07:13:47 +01:00
rustPlatform.buildRustPackage rec {
2019-03-25 22:26:07 +01:00
pname = "zola";
2022-01-23 17:07:41 +01:00
version = "0.15.3";
2017-12-29 07:13:47 +01:00
src = fetchFromGitHub {
2018-11-17 23:53:15 +01:00
owner = "getzola";
2021-12-05 22:06:58 +01:00
repo = "zola";
rev = "v${version}";
2022-01-23 17:07:41 +01:00
sha256 = "sha256-LK8twqWaS+SQ3oqvMGE7oP/IJNLvQ45Pu92pkbSKzDs=";
2017-12-29 07:13:47 +01:00
};
2022-01-23 17:07:41 +01:00
cargoSha256 = "sha256-7W0vjbAWZl/eKBZvUWWWolEOh8aQeKegt823EebcKMQ=";
2021-09-24 12:45:42 +02:00
nativeBuildInputs = [
cmake
pkg-config
installShellFiles
];
buildInputs = [
openssl
oniguruma
libsass
] ++ lib.optionals stdenv.isDarwin [
CoreServices
2021-09-24 12:45:42 +02:00
];
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 = ''
installShellCompletion --cmd zola \
--fish completions/zola.fish \
--zsh completions/_zola \
--bash completions/zola.bash
2017-12-29 07:13:47 +01:00
'';
passthru.tests.version = testers.testVersion { package = zola; };
2021-12-08 22:29:35 +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/";
changelog = "https://github.com/getzola/zola/raw/v${version}/CHANGELOG.md";
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 ];
2017-12-29 07:13:47 +01:00
};
}