Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{lib, stdenv, fetchurl}: 2 3stdenv.mkDerivation rec { 4 pname = "sysklogd"; 5 version = "1.5.1"; 6 7 src = fetchurl { 8 url = "http://www.infodrom.org/projects/sysklogd/download/sysklogd-${version}.tar.gz"; 9 sha256 = "00f2wy6f0qng7qzga4iicyzl9j8b7mp6mrpfky5jxj93ms2w2rji"; 10 }; 11 12 patches = [ ./systemd.patch ./union-wait.patch ./fix-includes-for-musl.patch ]; 13 14 env.NIX_CFLAGS_COMPILE = "-DSYSV"; 15 16 installFlags = [ "BINDIR=$(out)/sbin" "MANDIR=$(out)/share/man" "INSTALL=install" ]; 17 18 makeFlags = [ 19 "CC=${stdenv.cc.targetPrefix}cc" 20 ]; 21 22 postPatch = '' 23 # Disable stripping during installation, stripping will be done anyway. 24 # Fixes cross-compilation. 25 substituteInPlace Makefile \ 26 --replace "-m 500 -s" "-m 500" 27 ''; 28 29 preConfigure = 30 '' 31 sed -e 's@-o \''${MAN_USER} -g \''${MAN_GROUP} -m \''${MAN_PERMS} @@' -i Makefile 32 ''; 33 34 preInstall = "mkdir -p $out/share/man/man5/ $out/share/man/man8/ $out/sbin"; 35 36 meta = with lib; { 37 description = "A system logging daemon"; 38 platforms = platforms.linux; 39 license = licenses.gpl2; 40 }; 41}