about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/liblogging
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/liblogging')
-rw-r--r--nixpkgs/pkgs/development/libraries/liblogging/default.nix32
1 files changed, 32 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/liblogging/default.nix b/nixpkgs/pkgs/development/libraries/liblogging/default.nix
new file mode 100644
index 000000000000..50b850b886a5
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/liblogging/default.nix
@@ -0,0 +1,32 @@
+{ lib, stdenv, fetchurl, pkg-config
+, withSystemd ? lib.meta.availableOn stdenv.hostPlatform systemd
+, systemd
+}:
+
+stdenv.mkDerivation rec {
+  pname = "liblogging";
+  version = "1.0.6";
+
+  src = fetchurl {
+    url = "http://download.rsyslog.com/liblogging/liblogging-${version}.tar.gz";
+    sha256 = "14xz00mq07qmcgprlj5b2r21ljgpa4sbwmpr6jm2wrf8wms6331k";
+  };
+
+  nativeBuildInputs = [ pkg-config ];
+  buildInputs = lib.optionals withSystemd [ systemd ];
+
+  configureFlags = [
+    "--enable-rfc3195"
+    "--enable-stdlog"
+    (if withSystemd then "--enable-journal" else "--disable-journal")
+    "--enable-man-pages"
+  ];
+
+  meta = with lib; {
+    homepage = "http://www.liblogging.org/";
+    description = "Lightweight signal-safe logging library";
+    mainProgram = "stdlogctl";
+    license = licenses.bsd2;
+    platforms = platforms.all;
+  };
+}