Commit 6d2aa33a authored by Adam Joseph's avatar Adam Joseph Committed by Adam Joseph
Browse files

liblogging: add withSystemd option

This allows to build liblogging on platforms where systemd does not
compile.
parent 1f4f9b9d
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
{ lib, stdenv, fetchurl, pkg-config
, systemd ? null
, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
, systemd
}:

stdenv.mkDerivation rec {
@@ -12,12 +13,12 @@ stdenv.mkDerivation rec {
  };

  nativeBuildInputs = [ pkg-config ];
  buildInputs = [ systemd ];
  buildInputs = lib.optionals withSystemd [ systemd ];

  configureFlags = [
    "--enable-rfc3195"
    "--enable-stdlog"
    (if systemd != null then "--enable-journal" else "--disable-journal")
    (if withSystemd then "--enable-journal" else "--disable-journal")
    "--enable-man-pages"
  ];