nixpkgs/pkgs/applications/misc/zola/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

38 lines
1.1 KiB
Nix

{ lib, stdenv, fetchFromGitHub, rustPlatform, cmake, pkg-config, openssl, oniguruma, CoreServices }:
rustPlatform.buildRustPackage rec {
pname = "zola";
version = "0.13.0";
src = fetchFromGitHub {
owner = "getzola";
repo = pname;
rev = "v${version}";
sha256 = "sha256-yTvFQWmNxoB+CNZLHGmzJq7mKuOUxUqV4g8PWlOlRbM=";
};
cargoSha256 = "sha256:19vijhcs1i02jhz68acil7psv3pcn0jzi1i4y2l05i4m3ayxivjf";
nativeBuildInputs = [ cmake pkg-config ];
buildInputs = [ openssl oniguruma ]
++ stdenv.lib.optional stdenv.isDarwin CoreServices;
RUSTONIG_SYSTEM_LIBONIG = true;
postInstall = ''
install -D -m 444 completions/zola.bash \
-t $out/share/bash-completion/completions
install -D -m 444 completions/_zola \
-t $out/share/zsh/site-functions
install -D -m 444 completions/zola.fish \
-t $out/share/fish/vendor_completions.d
'';
meta = with lib; {
description = "A fast static site generator with everything built-in";
homepage = "https://www.getzola.org/";
license = licenses.mit;
maintainers = with maintainers; [ dywedir _0x4A6F ];
};
}