summary refs log tree commit diff
path: root/pkgs/development/libraries
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries')
-rw-r--r--pkgs/development/libraries/apr-util/default.nix4
-rw-r--r--pkgs/development/libraries/aspell/dictionaries.nix9
-rw-r--r--pkgs/development/libraries/aterm/2.8.nix1
-rw-r--r--pkgs/development/libraries/avahi/default.nix7
-rw-r--r--pkgs/development/libraries/faac/default.nix4
-rw-r--r--pkgs/development/libraries/ffmpeg/0.6.nix77
-rw-r--r--pkgs/development/libraries/ffmpeg/2.x.nix104
-rw-r--r--pkgs/development/libraries/giflib/4.1.nix10
-rw-r--r--pkgs/development/libraries/giflib/default.nix6
-rw-r--r--pkgs/development/libraries/haskell/haskell-src/1.0.1.5.nix1
-rw-r--r--pkgs/development/libraries/libgdiplus/default.nix3
-rw-r--r--pkgs/development/libraries/libgdiplus/giflib.patch117
-rw-r--r--pkgs/development/libraries/libopus/default.nix13
-rw-r--r--pkgs/development/libraries/ntrack/default.nix7
-rw-r--r--pkgs/development/libraries/ntrack/libnl-fix.patch11
15 files changed, 363 insertions, 11 deletions
diff --git a/pkgs/development/libraries/apr-util/default.nix b/pkgs/development/libraries/apr-util/default.nix
index 8e49d398460..89c2c31ef7a 100644
--- a/pkgs/development/libraries/apr-util/default.nix
+++ b/pkgs/development/libraries/apr-util/default.nix
@@ -9,11 +9,11 @@ assert bdbSupport -> db4 != null;
 assert ldapSupport -> openldap != null;
 
 stdenv.mkDerivation rec {
-  name = "apr-util-1.5.2";
+  name = "apr-util-1.5.3";
 
   src = fetchurl {
     url = "mirror://apache/apr/${name}.tar.bz2";
-    md5 = "89c1348aa79e898d7c34a6206311c9c2";
+    sha256 = "0s1rpqjy5xr03k9s4xrsm5wvhj5286vlkf6jvqayw99yy5sb3vbq";
   };
 
   configureFlags = ''
diff --git a/pkgs/development/libraries/aspell/dictionaries.nix b/pkgs/development/libraries/aspell/dictionaries.nix
index 0f27705160f..6500e602e85 100644
--- a/pkgs/development/libraries/aspell/dictionaries.nix
+++ b/pkgs/development/libraries/aspell/dictionaries.nix
@@ -140,6 +140,15 @@ in {
     };
   };
 
+  pt = buildDict {
+    shortName = "pt-0.50-1";
+    fullName = "Portuguese";
+    src = fetchurl {
+      url = mirror://gnu/aspell/dict/pt/aspell-pt-0.50-1.tar.bz2;
+      sha256 = "07xzlnxxzadqsapng29p2gdwj0bijv10wpjnqlwzmkxnx6fxzkcy";
+    };
+  };
+
   ru = buildDict {
     shortName = "ru-0.99f7-1";
     fullName = "Russian";
diff --git a/pkgs/development/libraries/aterm/2.8.nix b/pkgs/development/libraries/aterm/2.8.nix
index 6d4b13f165a..a153443a54e 100644
--- a/pkgs/development/libraries/aterm/2.8.nix
+++ b/pkgs/development/libraries/aterm/2.8.nix
@@ -31,5 +31,6 @@ stdenv.mkDerivation {
     description = "Library for manipulation of term data structures in C";
     platforms = stdenv.lib.platforms.linux ++ stdenv.lib.platforms.darwin;
     maintainers = stdenv.lib.maintainers.eelco;
+    broken = true;
   };
 }
diff --git a/pkgs/development/libraries/avahi/default.nix b/pkgs/development/libraries/avahi/default.nix
index a443da6c1f6..0adc7d56357 100644
--- a/pkgs/development/libraries/avahi/default.nix
+++ b/pkgs/development/libraries/avahi/default.nix
@@ -37,6 +37,13 @@ stdenv.mkDerivation rec {
     avahi-core/socket.c
   '';
 
+  postInstall = ''
+    # Maintain compat for mdnsresponder and howl
+    ${if withLibdnssdCompat then "ln -s avahi-compat-libdns_sd/dns_sd.h $out/include/dns_sd.h" else ""}
+    ln -s avahi-compat-howl $out/include/howl
+    ln -s avahi-compat-howl.pc $out/lib/pkgconfig/howl.pc
+  '';
+
   meta = with stdenv.lib; {
     description = "mDNS/DNS-SD implementation";
     homepage    = http://avahi.org;
diff --git a/pkgs/development/libraries/faac/default.nix b/pkgs/development/libraries/faac/default.nix
index 8e79afb5f9e..8bfaaf3ea49 100644
--- a/pkgs/development/libraries/faac/default.nix
+++ b/pkgs/development/libraries/faac/default.nix
@@ -13,6 +13,8 @@ stdenv.mkDerivation rec {
   meta = {
     description = "Open source MPEG-4 and MPEG-2 AAC encoder";
     homepage = http://www.audiocoding.com/faac.html;
-    license = "LGPL";
+    # Incompatible with GPL. Some changes to the base code, included in faac,
+    # are under LGPL though.
+    license = "unfree";
   };
 }
diff --git a/pkgs/development/libraries/ffmpeg/0.6.nix b/pkgs/development/libraries/ffmpeg/0.6.nix
new file mode 100644
index 00000000000..053843d5313
--- /dev/null
+++ b/pkgs/development/libraries/ffmpeg/0.6.nix
@@ -0,0 +1,77 @@
+{ stdenv, fetchurl, pkgconfig, yasm
+, mp3Support ? true, lame ? null
+, speexSupport ? true, speex ? null
+, theoraSupport ? true, libtheora ? null
+, vorbisSupport ? true, libvorbis ? null
+, vpxSupport ? false, libvpx ? null
+, x264Support ? true, x264 ? null
+, xvidSupport ? true, xvidcore ? null
+, vdpauSupport ? true, libvdpau ? null
+, faacSupport ? false, faac ? null
+}:
+
+assert speexSupport -> speex != null;
+assert theoraSupport -> libtheora != null;
+assert vorbisSupport -> libvorbis != null;
+assert vpxSupport -> libvpx != null;
+assert x264Support -> x264 != null;
+assert xvidSupport -> xvidcore != null;
+assert vdpauSupport -> libvdpau != null;
+assert faacSupport -> faac != null;
+
+stdenv.mkDerivation rec {
+  name = "ffmpeg-0.6.7";
+
+  src = fetchurl {
+    url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
+    sha256 = "13l78gv2qhyw05bl9s6wkmykzsn4p04bb69a849a5c4hiffwz837";
+  };
+
+  # `--enable-gpl' (as well as the `postproc' and `swscale') mean that
+  # the resulting library is GPL'ed, so it can only be used in GPL'ed
+  # applications.
+  configureFlags = [
+    "--enable-gpl"
+    "--enable-postproc"
+    "--enable-swscale"
+    "--disable-ffserver"
+    "--disable-ffplay"
+    "--enable-shared"
+    "--enable-runtime-cpudetect"
+  ]
+    ++ stdenv.lib.optional mp3Support "--enable-libmp3lame"
+    ++ stdenv.lib.optional speexSupport "--enable-libspeex"
+    ++ stdenv.lib.optional theoraSupport "--enable-libtheora"
+    ++ stdenv.lib.optional vorbisSupport "--enable-libvorbis"
+    ++ stdenv.lib.optional vpxSupport "--enable-libvpx"
+    ++ stdenv.lib.optional x264Support "--enable-libx264"
+    ++ stdenv.lib.optional xvidSupport "--enable-libxvid"
+    ++ stdenv.lib.optional vdpauSupport "--enable-vdpau"
+    ++ stdenv.lib.optional faacSupport "--enable-libfaac --enable-nonfree";
+
+  buildInputs = [ pkgconfig lame yasm ]
+    ++ stdenv.lib.optional mp3Support lame
+    ++ stdenv.lib.optional speexSupport speex
+    ++ stdenv.lib.optional theoraSupport libtheora
+    ++ stdenv.lib.optional vorbisSupport libvorbis
+    ++ stdenv.lib.optional vpxSupport libvpx
+    ++ stdenv.lib.optional x264Support x264
+    ++ stdenv.lib.optional xvidSupport xvidcore
+    ++ stdenv.lib.optional vdpauSupport libvdpau
+    ++ stdenv.lib.optional faacSupport faac;
+
+  crossAttrs = {
+    dontSetConfigureCross = true;
+    configureFlags = configureFlags ++ [
+      "--cross-prefix=${stdenv.cross.config}-"
+      "--enable-cross-compile"
+      "--target_os=linux"
+      "--arch=${stdenv.cross.arch}"
+      ];
+  };
+
+  meta = {
+    homepage = http://www.ffmpeg.org/;
+    description = "A complete, cross-platform solution to record, convert and stream audio and video";
+  };
+}
diff --git a/pkgs/development/libraries/ffmpeg/2.x.nix b/pkgs/development/libraries/ffmpeg/2.x.nix
new file mode 100644
index 00000000000..475da7c4c64
--- /dev/null
+++ b/pkgs/development/libraries/ffmpeg/2.x.nix
@@ -0,0 +1,104 @@
+{ stdenv, fetchurl, pkgconfig, yasm, zlib, bzip2, alsaLib, texinfo, perl
+, mp3Support ? true, lame ? null
+, speexSupport ? true, speex ? null
+, theoraSupport ? true, libtheora ? null
+, vorbisSupport ? true, libvorbis ? null
+, vpxSupport ? false, libvpx ? null
+, x264Support ? true, x264 ? null
+, xvidSupport ? true, xvidcore ? null
+, opusSupport ? true, libopus ? null
+, vdpauSupport ? true, libvdpau ? null
+, vaapiSupport ? true, libva ? null
+, faacSupport ? false, faac ? null
+, dc1394Support ? false, libdc1394 ? null
+, x11grabSupport ? false, libXext ? null, libXfixes ? null
+, playSupport ? true, SDL ? null
+, freetypeSupport ? true, freetype ? null, fontconfig ? null
+}:
+
+assert speexSupport -> speex != null;
+assert theoraSupport -> libtheora != null;
+assert vorbisSupport -> libvorbis != null;
+assert vpxSupport -> libvpx != null;
+assert x264Support -> x264 != null;
+assert xvidSupport -> xvidcore != null;
+assert opusSupport -> libopus != null;
+assert vdpauSupport -> libvdpau != null;
+assert vaapiSupport -> libva != null;
+assert faacSupport -> faac != null;
+assert x11grabSupport -> libXext != null && libXfixes != null;
+assert playSupport -> SDL != null;
+assert freetypeSupport -> freetype != null;
+
+stdenv.mkDerivation rec {
+  name = "ffmpeg-2.1.1";
+
+  src = fetchurl {
+    url = "http://www.ffmpeg.org/releases/${name}.tar.bz2";
+    sha256 = "1qnspbpwa6cflsb6mkm84ay4nfx60ism6d7lgvnasidck9dmxydy";
+  };
+
+  # `--enable-gpl' (as well as the `postproc' and `swscale') mean that
+  # the resulting library is GPL'ed, so it can only be used in GPL'ed
+  # applications.
+  configureFlags = [
+    "--enable-gpl"
+    "--enable-postproc"
+    "--enable-swscale"
+    "--enable-shared"
+    "--enable-avresample"
+    "--enable-runtime-cpudetect"
+  ]
+    ++ stdenv.lib.optional mp3Support "--enable-libmp3lame"
+    ++ stdenv.lib.optional speexSupport "--enable-libspeex"
+    ++ stdenv.lib.optional theoraSupport "--enable-libtheora"
+    ++ stdenv.lib.optional vorbisSupport "--enable-libvorbis"
+    ++ stdenv.lib.optional vpxSupport "--enable-libvpx"
+    ++ stdenv.lib.optional x264Support "--enable-libx264"
+    ++ stdenv.lib.optional xvidSupport "--enable-libxvid"
+    ++ stdenv.lib.optional opusSupport "--enable-libopus"
+    ++ stdenv.lib.optional vdpauSupport "--enable-vdpau"
+    ++ stdenv.lib.optional faacSupport "--enable-libfaac --enable-nonfree"
+    ++ stdenv.lib.optional dc1394Support "--enable-libdc1394"
+    ++ stdenv.lib.optional x11grabSupport "--enable-x11grab"
+    ++ stdenv.lib.optional playSupport "--enable-ffplay"
+    ++ stdenv.lib.optional freetypeSupport "--enable-libfreetype --enable-fontconfig";
+
+  buildInputs = [ pkgconfig lame yasm zlib bzip2 alsaLib texinfo perl ]
+    ++ stdenv.lib.optional mp3Support lame
+    ++ stdenv.lib.optional speexSupport speex
+    ++ stdenv.lib.optional theoraSupport libtheora
+    ++ stdenv.lib.optional vorbisSupport libvorbis
+    ++ stdenv.lib.optional vpxSupport libvpx
+    ++ stdenv.lib.optional x264Support x264
+    ++ stdenv.lib.optional xvidSupport xvidcore
+    ++ stdenv.lib.optional opusSupport libopus
+    ++ stdenv.lib.optional vdpauSupport libvdpau
+    ++ stdenv.lib.optional vaapiSupport libva
+    ++ stdenv.lib.optional faacSupport faac
+    ++ stdenv.lib.optional dc1394Support libdc1394
+    ++ stdenv.lib.optionals x11grabSupport [ libXext libXfixes ]
+    ++ stdenv.lib.optional playSupport SDL
+    ++ stdenv.lib.optionals freetypeSupport [ freetype fontconfig ];
+
+  enableParallelBuilding = true;
+
+  crossAttrs = {
+    dontSetConfigureCross = true;
+    configureFlags = configureFlags ++ [
+      "--cross-prefix=${stdenv.cross.config}-"
+      "--enable-cross-compile"
+      "--target_os=linux"
+      "--arch=${stdenv.cross.arch}"
+      ];
+  };
+
+  passthru = {
+    inherit vdpauSupport;
+  };
+
+  meta = {
+    homepage = http://www.ffmpeg.org/;
+    description = "A complete, cross-platform solution to record, convert and stream audio and video";
+  };
+}
diff --git a/pkgs/development/libraries/giflib/4.1.nix b/pkgs/development/libraries/giflib/4.1.nix
new file mode 100644
index 00000000000..35d66b3647b
--- /dev/null
+++ b/pkgs/development/libraries/giflib/4.1.nix
@@ -0,0 +1,10 @@
+{stdenv, fetchurl}:
+
+stdenv.mkDerivation {
+  name = "giflib-4.1.6";
+  src = fetchurl {
+    url = mirror://sourceforge/giflib/giflib-4.1.6.tar.bz2;
+    sha256 = "1v9b7ywz7qg8hli0s9vv1b8q9xxb2xvqq2mg1zpr73xwqpcwxhg1";
+  };
+}
+
diff --git a/pkgs/development/libraries/giflib/default.nix b/pkgs/development/libraries/giflib/default.nix
index cc782546a48..4dc8132805c 100644
--- a/pkgs/development/libraries/giflib/default.nix
+++ b/pkgs/development/libraries/giflib/default.nix
@@ -1,10 +1,10 @@
 {stdenv, fetchurl, xmlto, docbook_xml_dtd_412, docbook_xsl, libxml2 }:
 
 stdenv.mkDerivation {
-  name = "giflib-4.2.3";
+  name = "giflib-5.0.5";
   src = fetchurl {
-    url = mirror://sourceforge/giflib/giflib-4.2.3.tar.bz2;
-    sha256 = "0rmp7ipzk42r841bggd7bfqk4p8qsssbp4wcck4qnz7p4rkxbj0a";
+    url = mirror://sourceforge/giflib/giflib-5.0.5.tar.bz2;
+    sha256 = "02c6pwll9pzw5fhg5gccx2ws56d70ylfryk21nv5lqhwdcv8lvb0";
   };
 
   buildInputs = [ xmlto docbook_xml_dtd_412 docbook_xsl libxml2 ];
diff --git a/pkgs/development/libraries/haskell/haskell-src/1.0.1.5.nix b/pkgs/development/libraries/haskell/haskell-src/1.0.1.5.nix
index 1dbbbec550a..cfaabe7f6b0 100644
--- a/pkgs/development/libraries/haskell/haskell-src/1.0.1.5.nix
+++ b/pkgs/development/libraries/haskell/haskell-src/1.0.1.5.nix
@@ -6,6 +6,7 @@ cabal.mkDerivation (self: {
   sha256 = "1ay3i2sbrp0pzg6fagg8gqrwq5lcnm5jb5sr11frbk274a82cdwz";
   buildDepends = [ syb ];
   buildTools = [ happy ];
+  preConfigure = "runhaskell Setup.hs clean";
   meta = {
     description = "Support for manipulating Haskell source code";
     license = self.stdenv.lib.licenses.bsd3;
diff --git a/pkgs/development/libraries/libgdiplus/default.nix b/pkgs/development/libraries/libgdiplus/default.nix
index 3b1e5ba0b77..56bc72acff0 100644
--- a/pkgs/development/libraries/libgdiplus/default.nix
+++ b/pkgs/development/libraries/libgdiplus/default.nix
@@ -10,11 +10,14 @@ stdenv.mkDerivation rec {
     sha256 = "0klnbly2q0yx5p0l5z8da9lhqsjj9xqj06kdw2v7rnms4z1vdpkd";
   };
 
+  NIX_LDFLAGS = "-lgif";
+
   patches =
     [ (fetchurl {
         url = "https://raw.github.com/MagicGroup/MagicSpecLib/master/libgdiplus/libgdiplus-2.10.1-libpng15.patch";
         sha256 = "130r0jm065pjvbz5dkx96w37vj1wqc8fakmi2znribs14g0bl65f";
       })
+      ./giflib.patch
     ];
 
   patchFlags = "-p0";
diff --git a/pkgs/development/libraries/libgdiplus/giflib.patch b/pkgs/development/libraries/libgdiplus/giflib.patch
new file mode 100644
index 00000000000..b1135f47f3a
--- /dev/null
+++ b/pkgs/development/libraries/libgdiplus/giflib.patch
@@ -0,0 +1,117 @@
+diff --git a/src/gifcodec.c b/src/gifcodec.c
+index 8dee0eb..564beed 100644
+--- src/gifcodec.c
++++ src/gifcodec.c
+@@ -39,8 +39,10 @@ GUID gdip_gif_image_format_guid = {0xb96b3cb0U, 0x0728U, 0x11d3U, {0x9d, 0x7b, 0
+ 
+ #include "gifcodec.h"
+ 
++#if GIFLIB_MAJOR < 5
+ /* giflib declares this incorrectly as EgifOpen */
+ extern GifFileType *EGifOpen(void *userData, OutputFunc writeFunc);
++#endif
+ 
+ /* Data structure used for callback */
+ typedef struct
+@@ -105,7 +107,7 @@ gdip_gif_inputfunc (GifFileType *gif, GifByteType *data, int len)
+ */
+ 
+ static int
+-AddExtensionBlockMono(SavedImage *New, int Len, BYTE ExtData[])
++AddExtensionBlockMono(SavedImage *New, int Len, int func, BYTE ExtData[])
+ {
+ 	ExtensionBlock	*ep;
+ 
+@@ -129,7 +131,7 @@ AddExtensionBlockMono(SavedImage *New, int Len, BYTE ExtData[])
+ 
+ 	if (ExtData) {
+ 		memcpy(ep->Bytes, ExtData, Len);
+-		ep->Function = New->Function;
++		ep->Function = func;
+ 	}
+ 
+ 	return (GIF_OK);
+@@ -232,20 +234,20 @@ DGifSlurpMono(GifFileType * GifFile, SavedImage *TrailingExtensions)
+ 			}
+ 
+ 			case EXTENSION_RECORD_TYPE: {
+-				if (DGifGetExtension(GifFile, &temp_save.Function, &ExtData) == GIF_ERROR) {
++				int func;
++				if (DGifGetExtension(GifFile, &func, &ExtData) == GIF_ERROR) {
+ 					return (GIF_ERROR);
+ 				}
+ 
+ 				while (ExtData != NULL) {
+ 					/* Create an extension block with our data */
+-					if (AddExtensionBlockMono(&temp_save, ExtData[0], &ExtData[1]) == GIF_ERROR) {
++					if (AddExtensionBlockMono(&temp_save, func, ExtData[0], &ExtData[1]) == GIF_ERROR) {
+ 						return (GIF_ERROR);
+ 					}
+ 
+ 					if (DGifGetExtensionNext(GifFile, &ExtData) == GIF_ERROR) {
+ 						return (GIF_ERROR);
+ 					}
+-					temp_save.Function = 0;
+ 				}
+ 				break;
+ 			}
+@@ -303,12 +305,19 @@ gdip_load_gif_image (void *stream, GpImage **image, BOOL from_file)
+ 	result = NULL;
+ 	loop_counter = FALSE;
+ 
++#if GIFLIB_MAJOR < 5
+ 	if (from_file) {
+ 		gif = DGifOpen(stream, &gdip_gif_fileinputfunc);
+ 	} else {
+ 		gif = DGifOpen (stream, &gdip_gif_inputfunc);
+ 	}
+-	
++#else
++	if (from_file)
++		gif = DGifOpen(stream, &gdip_gif_fileinputfunc, NULL);
++	else
++		gif = DGifOpen(stream, &gdip_gif_inputfunc, NULL);
++#endif
++
+ 	if (gif == NULL) {
+ 		goto error;
+ 	}
+@@ -660,11 +669,22 @@ gdip_save_gif_image (void *stream, GpImage *image, BOOL from_file)
+ 		return InvalidParameter;
+ 	}
+ 
++#if GIFLIB_MAJOR < 5
+ 	if (from_file) {
+ 		fp = EGifOpenFileName (stream, 0);
+ 	} else {
+ 		fp = EGifOpen (stream, gdip_gif_outputfunc);
+ 	}
++#else
++	if (from_file)
++		fp = EGifOpenFileName (stream, 0, NULL);
++	else
++		fp = EGifOpen (stream, gdip_gif_outputfunc, NULL);
++#define MakeMapObject  GifMakeMapObject
++#define FreeMapObject  GifFreeMapObject
++#define QuantizeBuffer GifQuantizeBuffer
++#define BitSize        GifBitSize
++#endif
+ 		
+ 	if (!fp) {
+ 		return FileNotFound;
+@@ -848,8 +868,15 @@ gdip_save_gif_image (void *stream, GpImage *image, BOOL from_file)
+ 						Buffer[0] = 1;
+ 						Buffer[1] = ptr[0];
+ 						Buffer[2] = ptr[1];
++#if GIFLIB_MAJOR < 5
+ 						EGifPutExtensionFirst(fp, APPLICATION_EXT_FUNC_CODE, 11, "NETSCAPE2.0");
+ 						EGifPutExtensionLast(fp, APPLICATION_EXT_FUNC_CODE, 3, Buffer);
++#else
++						EGifPutExtensionLeader(fp, APPLICATION_EXT_FUNC_CODE);
++						EGifPutExtensionBlock(fp, 11, "NETSCAPE2.0");
++						EGifPutExtensionBlock(fp, 3, Buffer);
++						EGifPutExtensionTrailer(fp);
++#endif
+ 					}
+ 				}
+ 
diff --git a/pkgs/development/libraries/libopus/default.nix b/pkgs/development/libraries/libopus/default.nix
index d08ae8ef72a..b1bf65d0fe6 100644
--- a/pkgs/development/libraries/libopus/default.nix
+++ b/pkgs/development/libraries/libopus/default.nix
@@ -1,15 +1,20 @@
 { stdenv, fetchurl, fixedPoint ? false }:
 
+let
+  version = "1.1";
+in
 stdenv.mkDerivation rec {
-  name = "libopus-1.0.2";
-  
+  name = "libopus-${version}";
+
   src = fetchurl {
-    url = "http://downloads.xiph.org/releases/opus/opus-1.0.2.tar.gz";
-    sha256 = "12npbkrcwvh3fl9l18cwrxwg269cg2j6j7876cc9q0axxvdmwqfs";
+    url = "http://downloads.xiph.org/releases/opus/opus-${version}.tar.gz";
+    sha256 = "158xprn2086arvdib3vbbygz7z6jqkw2nci7nlywzzwallap0wmr";
   };
 
   configureFlags = stdenv.lib.optionalString fixedPoint "--enable-fixed-point";
 
+  doCheck = true;
+
   meta = {
     description = "Open, royalty-free, highly versatile audio codec";
     license = "BSD";
diff --git a/pkgs/development/libraries/ntrack/default.nix b/pkgs/development/libraries/ntrack/default.nix
index 13ab00e41be..b7460778474 100644
--- a/pkgs/development/libraries/ntrack/default.nix
+++ b/pkgs/development/libraries/ntrack/default.nix
@@ -18,7 +18,12 @@ stdenv.mkDerivation rec {
 
   configureFlags = "--without-gobject CFLAGS=--std=gnu99";
 
-  patchPhase = ''sed -e "s@/usr\(/lib/ntrack/modules/\)@$out&@" -i common/ntrack.c'';
+  # Remove this patch after version 016
+  patches = [ ./libnl-fix.patch ];
+
+  postPatch = ''
+    sed -e "s@/usr\(/lib/ntrack/modules/\)@$out&@" -i common/ntrack.c
+  '';
 
   meta = {
     description = "Network Connectivity Tracking library for Desktop Applications";
diff --git a/pkgs/development/libraries/ntrack/libnl-fix.patch b/pkgs/development/libraries/ntrack/libnl-fix.patch
new file mode 100644
index 00000000000..806a0178ec8
--- /dev/null
+++ b/pkgs/development/libraries/ntrack/libnl-fix.patch
@@ -0,0 +1,11 @@
+--- ./modules/ntrack-libnl.c.orig	2013-12-02 11:31:54.749215448 -0600
++++ ./modules/ntrack-libnl.c	2013-12-02 11:34:46.597684553 -0600
+@@ -530,7 +530,7 @@
+ 		op_default_route_disappeared ((struct _ntrack_monitor_arch*) self, nl_info);
+ 	} else if (nl_info->topmost_route && topmost_route) {
+ 		int diff_bits;
+-		if ((diff_bits = (route_obj_ops.oo_id_attrs | ROUTE_ATTR_OIF
++		if ((diff_bits = (nl_object_get_id_attrs(OBJ_CAST(topmost_route)) | ROUTE_ATTR_OIF
+ 		                  | ROUTE_ATTR_GATEWAY) &
+ 		                  nl_object_diff (OBJ_CAST (nl_info->topmost_route),
+ 		                                  OBJ_CAST (topmost_route)))) {