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

38 lines
1.1 KiB
Nix
Raw Normal View History

2020-09-05 05:20:00 +01:00
{ stdenv, fetchFromGitHub, rustPlatform, cmake, pkg-config, openssl, oniguruma, CoreServices }:
2017-12-29 06:13:47 +00:00
rustPlatform.buildRustPackage rec {
2019-03-25 21:26:07 +00:00
pname = "zola";
2020-10-02 02:34:37 +01:00
version = "0.12.2";
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;
2017-12-29 06:13:47 +00:00
rev = "v${version}";
2020-10-02 02:34:37 +01:00
sha256 = "sha256:0fb227kgani32ljnw73a0h5zn5361z5lraf79y34a0chcby2qv35";
2017-12-29 06:13:47 +00:00
};
2020-10-02 02:34:37 +01:00
cargoSha256 = "sha256:0ilfr32zcajag05qcpwi5ixz250s427i4xrjf4wrk7qy32bblnr5";
2020-02-18 06:22:38 +00:00
nativeBuildInputs = [ cmake pkg-config ];
2020-09-05 05:20:00 +01:00
buildInputs = [ openssl oniguruma ]
2019-06-19 22:19:13 +01:00
++ stdenv.lib.optional stdenv.isDarwin CoreServices;
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 = ''
2018-11-17 22:53:15 +00:00
install -D -m 444 completions/zola.bash \
2017-12-29 06:13:47 +00:00
-t $out/share/bash-completion/completions
2018-11-17 22:53:15 +00:00
install -D -m 444 completions/_zola \
2017-12-29 06:13:47 +00:00
-t $out/share/zsh/site-functions
2018-11-17 22:53:15 +00:00
install -D -m 444 completions/zola.fish \
2017-12-29 06:13:47 +00:00
-t $out/share/fish/vendor_completions.d
'';
meta = with stdenv.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/";
2017-12-29 06:13:47 +00:00
license = licenses.mit;
2020-10-02 02:34:37 +01:00
maintainers = with maintainers; [ dywedir _0x4A6F ];
2017-12-29 06:13:47 +00:00
};
}