2021-01-15 22:18:51 +00:00
|
|
|
{ lib, stdenv, fetchurl, which }:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ossec-client";
|
|
|
|
version = "2.6";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-21 07:28:18 +00:00
|
|
|
url = "https://www.ossec.net/files/ossec-hids-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "0k1b59wdv9h50gbyy88qw3cnpdm8hv0nrl0znm92h9a11i5b39ip";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ which ];
|
|
|
|
|
|
|
|
patches = [ ./no-root.patch ];
|
|
|
|
|
2022-06-16 17:23:12 +00:00
|
|
|
# Workaround build failure on -fno-common toolchains like upstream
|
|
|
|
# gcc-10. Otherwise build fails as:
|
|
|
|
# ld: src/common/mgmt/pint-worker-external.po:(.data.rel.local+0x0): multiple definition of
|
|
|
|
# `PINT_worker_external_impl'; src/common/mgmt/pint-mgmt.po:(.bss+0x20): first defined here
|
2023-03-04 12:14:45 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = "-fcommon";
|
2022-06-16 17:23:12 +00:00
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
buildPhase = ''
|
|
|
|
echo "en
|
|
|
|
|
|
|
|
agent
|
|
|
|
$out
|
|
|
|
no
|
|
|
|
127.0.0.1
|
|
|
|
yes
|
|
|
|
yes
|
|
|
|
yes
|
|
|
|
|
|
|
|
|
|
|
|
" | ./install.sh
|
|
|
|
'';
|
|
|
|
|
2021-07-21 07:28:18 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "Open source host-based instrusion detection system";
|
|
|
|
homepage = "https://www.ossec.net";
|
2021-07-21 07:28:18 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
platforms = platforms.linux;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|