1{ stdenv, fetchFromGitHub, lib }:
2
3stdenv.mkDerivation rec {
4 pname = "openbsm";
5 version = "1.1";
6
7 src = fetchFromGitHub {
8 owner = pname;
9 repo = pname;
10 rev = lib.toUpper (builtins.replaceStrings ["." "-"] ["_" "_"] "${pname}-${version}");
11 sha256 = "0b98359hd8mm585sh145ss828pg2y8vgz38lqrb7nypapiyqdnd1";
12 };
13
14 patches = lib.optionals stdenv.isDarwin [ ./bsm-add-audit_token_to_pid.patch ];
15
16 preConfigure = lib.optionalString (lib.versionAtLeast stdenv.hostPlatform.darwinMinVersion "11") ''
17 MACOSX_DEPLOYMENT_TARGET=10.16
18 '';
19
20 configureFlags = [ "ac_cv_file__usr_include_mach_audit_triggers_defs=no" ];
21
22 meta = {
23 description = "An implementation of Sun's Basic Security Module (BSM) security audit API and file format";
24 homepage = "http://www.openbsm.org/";
25 platforms = lib.platforms.unix;
26 maintainers = with lib.maintainers; [ matthewbauer ];
27 license = lib.licenses.bsd2;
28 };
29}