2018-08-05 00:24:13 +02:00
|
|
|
{ stdenv, fetchFromGitHub, rustPlatform, cmake, pkgconfig, openssl, CoreServices, cf-private }:
|
2017-12-29 07:13:47 +01:00
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
name = "gutenberg-${version}";
|
2018-10-09 23:36:13 +02:00
|
|
|
version = "0.4.2";
|
2017-12-29 07:13:47 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "Keats";
|
|
|
|
repo = "gutenberg";
|
|
|
|
rev = "v${version}";
|
2018-10-09 23:36:13 +02:00
|
|
|
sha256 = "0kzxz26khk5rwb9mz0wi9r8y7r93w4n2dbq6v2qr07cy5h14pa6w";
|
2017-12-29 07:13:47 +01:00
|
|
|
};
|
|
|
|
|
2018-10-09 23:36:13 +02:00
|
|
|
cargoSha256 = "0n4ji06chybmcvg5yz6cnhzqh162zhh5xpbz374a796dwp1132m8";
|
2017-12-29 07:13:47 +01:00
|
|
|
|
2018-08-05 00:24:13 +02:00
|
|
|
nativeBuildInputs = [ cmake pkgconfig openssl ];
|
2017-12-29 07:13:47 +01:00
|
|
|
buildInputs = stdenv.lib.optionals stdenv.isDarwin [ CoreServices cf-private ];
|
|
|
|
|
|
|
|
postInstall = ''
|
|
|
|
install -D -m 444 completions/gutenberg.bash \
|
|
|
|
-t $out/share/bash-completion/completions
|
|
|
|
install -D -m 444 completions/_gutenberg \
|
|
|
|
-t $out/share/zsh/site-functions
|
|
|
|
install -D -m 444 completions/gutenberg.fish \
|
|
|
|
-t $out/share/fish/vendor_completions.d
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "An opinionated static site generator with everything built-in";
|
|
|
|
homepage = https://www.getgutenberg.io;
|
|
|
|
license = licenses.mit;
|
2018-07-14 20:32:15 +02:00
|
|
|
maintainers = with maintainers; [ dywedir ];
|
2017-12-29 07:13:47 +01:00
|
|
|
platforms = platforms.all;
|
|
|
|
};
|
|
|
|
}
|