2021-01-15 09:19:50 +00:00
|
|
|
{ lib, stdenv, fetchurl, which }:
|
2012-07-09 15:44:44 +00:00
|
|
|
|
2021-07-20 10:51:09 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "ossec-client";
|
|
|
|
version = "2.6";
|
2012-07-09 15:44:44 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-07-20 10:51:09 +00:00
|
|
|
url = "https://www.ossec.net/files/ossec-hids-${version}.tar.gz";
|
2012-07-09 15:44:44 +00:00
|
|
|
sha256 = "0k1b59wdv9h50gbyy88qw3cnpdm8hv0nrl0znm92h9a11i5b39ip";
|
|
|
|
};
|
|
|
|
|
|
|
|
buildInputs = [ which ];
|
|
|
|
|
|
|
|
patches = [ ./no-root.patch ];
|
|
|
|
|
2022-05-22 17:42:58 +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
|
|
|
|
NIX_CFLAGS_COMPILE = "-fcommon";
|
|
|
|
|
2012-07-09 15:44:44 +00:00
|
|
|
buildPhase = ''
|
|
|
|
echo "en
|
|
|
|
|
|
|
|
agent
|
|
|
|
$out
|
|
|
|
no
|
|
|
|
127.0.0.1
|
|
|
|
yes
|
|
|
|
yes
|
|
|
|
yes
|
|
|
|
|
|
|
|
|
|
|
|
" | ./install.sh
|
|
|
|
'';
|
|
|
|
|
2021-07-20 10:51:09 +00:00
|
|
|
meta = with lib; {
|
2019-11-16 00:41:23 +00:00
|
|
|
description = "Open source host-based instrusion detection system";
|
2020-04-01 01:11:51 +00:00
|
|
|
homepage = "https://www.ossec.net";
|
2021-07-20 10:51:09 +00:00
|
|
|
license = licenses.gpl2;
|
|
|
|
maintainers = with maintainers; [ ];
|
|
|
|
platforms = platforms.linux;
|
2012-07-09 15:44:44 +00:00
|
|
|
};
|
|
|
|
}
|
|
|
|
|