1{
2 acl,
3 fetchFromGitHub,
4 lib,
5 rustPlatform,
6}:
7
8rustPlatform.buildRustPackage rec {
9 pname = "laurel";
10 version = "0.7.2";
11
12 src = fetchFromGitHub {
13 owner = "threathunters-io";
14 repo = "laurel";
15 tag = "v${version}";
16 hash = "sha256-rOf7UtkMoYpReZr/2135QcpMEfYD80IY4zF0TwAWr4I=";
17 };
18
19 cargoHash = "sha256-Pfs4Bg6VZIiiXQu0ZKcDi9zeEYl08kOnWi3R2iaQG24=";
20
21 postPatch = ''
22 # Upstream started to redirect aarch64-unknown-linux-gnu to aarch64-linux-gnu-gcc
23 # for their CI which breaks compiling on aarch64 in nixpkgs:
24 # error: linker `aarch64-linux-gnu-gcc` not found
25 rm .cargo/config.toml
26 '';
27
28 nativeBuildInputs = [ rustPlatform.bindgenHook ];
29 buildInputs = [ acl ];
30
31 checkFlags = [
32 # Nix' build sandbox does not allow setting ACLs:
33 # https://github.com/NixOS/nix/blob/2.28.3/src/libstore/unix/build/local-derivation-goal.cc#L1760-L1769
34 # Skip the tests that are failing with "Operation not supported (os error 95)" because of this:
35 "--skip=rotate::test::existing"
36 "--skip=rotate::test::fresh_file"
37 ];
38
39 meta = with lib; {
40 description = "Transform Linux Audit logs for SIEM usage";
41 homepage = "https://github.com/threathunters-io/laurel";
42 changelog = "https://github.com/threathunters-io/laurel/releases/tag/${src.tag}";
43 license = licenses.gpl3Plus;
44 maintainers = with maintainers; [ emilylange ];
45 platforms = platforms.linux;
46 };
47}