summary refs log tree commit diff
path: root/pkgs/development/libraries/ntrack/default.nix
blob: 803906b134376da9ccf5a3fea5c4843150a66390 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
{ stdenv, fetchurl, qt4, pkgconfig, 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 = [ pkgconfig 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 stdenv.lib; {
    description = "Network Connectivity Tracking library for Desktop Applications";
    homepage = https://launchpad.net/ntrack;
    platforms = platforms.linux;
    license = licenses.lgpl3Plus;
  };
}