2019-06-20 00:19:13 +03:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, cmake, pkgconfig, openssl, CoreServices }:
|
2017-12-29 09:13:47 +03:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
2019-03-26 00:26:07 +03:00
|
|
|
pname = "zola";
|
2019-09-29 17:37:27 +03:00
|
|
|
version = "0.9.0";
|
2017-12-29 09:13:47 +03:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-11-18 01:53:15 +03:00
|
|
|
owner = "getzola";
|
2019-03-26 00:26:07 +03:00
|
|
|
repo = pname;
|
2017-12-29 09:13:47 +03:00
|
|
|
rev = "v${version}";
|
2019-11-23 22:47:34 +03:00
|
|
|
sha256 = "13kbgxh7r6124d1fjdf0x599j1kpgixp1y9d299zb5vrd6rf5wy5";
|
2017-12-29 09:13:47 +03:00
|
|
|
};
|
2019-11-23 22:47:34 +03:00
|
|
|
cargoPatches = [ ./cargo-lock.patch ];
|
2017-12-29 09:13:47 +03:00
|
|
|
|
2019-11-23 22:47:34 +03:00
|
|
|
cargoSha256 = "03rwf5l1l3ap03qi0xqcxsbyvpg3cqmr50j8ql6c5v55xl0ki9w8";
|
2017-12-29 09:13:47 +03:00
|
|
|
|
2019-03-26 00:26:07 +03:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig ];
|
2019-06-20 00:19:13 +03:00
|
|
|
buildInputs = [ openssl ]
|
|
|
|
++ stdenv.lib.optional stdenv.isDarwin CoreServices;
|
2017-12-29 09:13:47 +03:00
|
|
|
|
|
|
|
postInstall = ''
|
2018-11-18 01:53:15 +03:00
|
|
|
install -D -m 444 completions/zola.bash \
|
2017-12-29 09:13:47 +03:00
|
|
|
-t $out/share/bash-completion/completions
|
2018-11-18 01:53:15 +03:00
|
|
|
install -D -m 444 completions/_zola \
|
2017-12-29 09:13:47 +03:00
|
|
|
-t $out/share/zsh/site-functions
|
2018-11-18 01:53:15 +03:00
|
|
|
install -D -m 444 completions/zola.fish \
|
2017-12-29 09:13:47 +03:00
|
|
|
-t $out/share/fish/vendor_completions.d
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
2018-11-18 01:53:15 +03:00
|
|
|
description = "A fast static site generator with everything built-in";
|
|
|
|
homepage = https://www.getzola.org/;
|
2017-12-29 09:13:47 +03:00
|
|
|
license = licenses.mit;
|
2018-07-14 21:32:15 +03:00
|
|
|
maintainers = with maintainers; [ dywedir ];
|
2017-12-29 09:13:47 +03:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|