2021-01-15 22:18:51 +00:00
|
|
|
{lib, stdenv, fetchurl}:
|
2020-04-24 23:36:52 +00:00
|
|
|
|
2021-09-26 12:46:18 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "sysklogd";
|
|
|
|
version = "1.5.1";
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
src = fetchurl {
|
2021-09-26 12:46:18 +00:00
|
|
|
url = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${version}.tar.gz";
|
2020-04-24 23:36:52 +00:00
|
|
|
sha256 = "00f2wy6f0qng7qzga4iicyzl9j8b7mp6mrpfky5jxj93ms2w2rji";
|
|
|
|
};
|
|
|
|
|
2021-02-05 17:12:51 +00:00
|
|
|
patches = [ ./systemd.patch ./union-wait.patch ./fix-includes-for-musl.patch ];
|
2020-04-24 23:36:52 +00:00
|
|
|
|
|
|
|
NIX_CFLAGS_COMPILE = "-DSYSV";
|
|
|
|
|
|
|
|
installFlags = [ "BINDIR=$(out)/sbin" "MANDIR=$(out)/share/man" "INSTALL=install" ];
|
|
|
|
|
2021-09-18 10:52:07 +00:00
|
|
|
makeFlags = [
|
|
|
|
"CC=${stdenv.cc.targetPrefix}cc"
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
# Disable stripping during installation, stripping will be done anyway.
|
|
|
|
# Fixes cross-compilation.
|
|
|
|
substituteInPlace Makefile \
|
|
|
|
--replace "-m 500 -s" "-m 500"
|
|
|
|
'';
|
|
|
|
|
2020-04-24 23:36:52 +00:00
|
|
|
preConfigure =
|
|
|
|
''
|
|
|
|
sed -e 's@-o \''${MAN_USER} -g \''${MAN_GROUP} -m \''${MAN_PERMS} @@' -i Makefile
|
|
|
|
'';
|
|
|
|
|
|
|
|
preInstall = "mkdir -p $out/share/man/man5/ $out/share/man/man8/ $out/sbin";
|
|
|
|
|
2021-01-15 22:18:51 +00:00
|
|
|
meta = with lib; {
|
2020-04-24 23:36:52 +00:00
|
|
|
description = "A system logging daemon";
|
2020-07-18 16:06:22 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.gpl2;
|
2020-04-24 23:36:52 +00:00
|
|
|
};
|
|
|
|
}
|