-
Notifications
You must be signed in to change notification settings - Fork 6
/
default.nix
37 lines (29 loc) · 1.02 KB
/
default.nix
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
# Build expression for NixOS 20.09
{ pkgs ? import <nixpkgs> { } }:
with pkgs.lib;
with pkgs.rustPlatform;
buildRustPackage rec {
name = "check-journal-${version}";
version = "1.2.0";
src = cleanSourceWith {
filter = n: t: baseNameOf n != "target";
src = cleanSource ./.;
};
cargoSha256 = "03rm3rq0wwv5gcgwf3q78firrllig3vv42kkyhcn6iyswcj03zff";
# used in src/main.rs to set default path for journalctl
JOURNALCTL = "${pkgs.systemd}/bin/journalctl";
nativeBuildInputs = with pkgs; [ ronn utillinux ];
postBuild = "make man";
preCheck = "patchShebangs fixtures/*.sh";
postInstall = ''
install -m 0644 -D -t $out/share/man/man1 man/check_journal.1
install -m 0644 -D -t $out/share/doc/check_journal README.md
'';
meta = {
description = "Nagios/Icinga compatible plugin to search `journalctl` " +
"output for matching lines.";
homepage = "https://github.com/flyingcircusio/check_journal";
maintainer = with maintainers; [ ckauhaus ];
license = with licenses; [ bsd3 ];
};
}