about summary refs log tree commit diff
path: root/nixpkgs/pkgs/development/libraries/ntrack/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'nixpkgs/pkgs/development/libraries/ntrack/default.nix')
-rw-r--r--nixpkgs/pkgs/development/libraries/ntrack/default.nix38
1 files changed, 38 insertions, 0 deletions
diff --git a/nixpkgs/pkgs/development/libraries/ntrack/default.nix b/nixpkgs/pkgs/development/libraries/ntrack/default.nix
new file mode 100644
index 000000000000..cb9f9ff575f8
--- /dev/null
+++ b/nixpkgs/pkgs/development/libraries/ntrack/default.nix
@@ -0,0 +1,38 @@
+{ lib, stdenv, fetchurl, qt4, pkg-config, libnl, python }:
+
+let
+  version = "016";
+in
+
+stdenv.mkDerivation rec {
+  pname = "ntrack";
+  inherit version;
+
+  src = fetchurl {
+    url = "https://launchpad.net/ntrack/main/${version}/+download/${pname}-${version}.tar.gz";
+    sha256 = "037ig5y0mp327m0hh4pnfr3vmsk3wrxgfjy3645q4ws9vdhx807w";
+  };
+
+  buildInputs = [ libnl qt4 ];
+
+  nativeBuildInputs = [ pkg-config python ];
+
+  # error: ISO C does not support '__FUNCTION__' predefined identifier [-Werror=pedantic]
+  NIX_CFLAGS_COMPILE = "-Wno-error";
+
+  configureFlags = [ "--without-gobject" "CFLAGS=--std=gnu99" ];
+
+  # Remove this patch after version 016
+  patches = [ ./libnl-fix.patch ];
+
+  postPatch = ''
+    sed -e "s@/usr\(/lib/ntrack/modules/\)@$out&@" -i common/ntrack.c
+  '';
+
+  meta = with lib; {
+    description = "Network Connectivity Tracking library for Desktop Applications";
+    homepage = "https://launchpad.net/ntrack";
+    platforms = platforms.linux;
+    license = licenses.lgpl3Plus;
+  };
+}