summary refs log tree commit diff
path: root/pkgs/development/libraries/pcre/default.nix
diff options
context:
space:
mode:
Diffstat (limited to 'pkgs/development/libraries/pcre/default.nix')
-rw-r--r--pkgs/development/libraries/pcre/default.nix27
1 files changed, 19 insertions, 8 deletions
diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix
index d7d13c6de4c..961a9e7b9ea 100644
--- a/pkgs/development/libraries/pcre/default.nix
+++ b/pkgs/development/libraries/pcre/default.nix
@@ -1,11 +1,15 @@
-{ stdenv, fetchurl, unicodeSupport ? true, cplusplusSupport ? true }:
+{ stdenv, fetchurl, unicodeSupport ? true, cplusplusSupport ? true
+, windows ? null
+}:
+
+with stdenv.lib;
 
 stdenv.mkDerivation rec {
-  name = "pcre-8.31";
+  name = "pcre-8.34";
 
   src = fetchurl {
     url = "ftp://ftp.csx.cam.ac.uk/pub/software/programming/pcre/${name}.tar.bz2";
-    sha256 = "5778a02535473c7ee7838ea598c19f451e63cf5eec0bf0307a688301c9078c3c";
+    sha256 = "0gsqmsp0q0n3q0ba32gkjvgcsdy6nwidqa7sbxkbw817zzhkl15n";
   };
 
   outputs = [ "dev" "out" "bin" "doc" "man" ];
@@ -15,11 +19,18 @@ stdenv.mkDerivation rec {
   # problem. In case we ever update the Darwin GCC version, the exception for
   # that platform ought to be removed.
   configureFlags = ''
+    --enable-jit
     ${if unicodeSupport then "--enable-unicode-properties" else ""}
     ${if !cplusplusSupport then "--disable-cpp" else ""}
-  '' + stdenv.lib.optionalString stdenv.isDarwin "CXXFLAGS=-O0";
+  '' + optionalString stdenv.isDarwin "CXXFLAGS=-O0";
+
+  doCheck = with stdenv; !(isCygwin || isFreeBSD);
+    # XXX: test failure on Cygwin
+    # we are running out of stack on both freeBSDs on Hydra
 
-  doCheck = !stdenv.isCygwin;                   # XXX: test failure on Cygwin
+  crossAttrs = optionalAttrs (stdenv.cross.libc == "msvcrt") {
+    buildInputs = [ windows.mingw_w64_pthreads.crossDrv ];
+  };
 
   postInstall =
     ''
@@ -30,7 +41,7 @@ stdenv.mkDerivation rec {
   meta = {
     homepage = "http://www.pcre.org/";
     description = "A library for Perl Compatible Regular Expressions";
-    license = "BSD-3";
+    license = stdenv.lib.licenses.bsd3;
 
     longDescription = ''
       The PCRE library is a set of functions that implement regular
@@ -40,7 +51,7 @@ stdenv.mkDerivation rec {
       PCRE library is free, even for building proprietary software.
     '';
 
-    platforms = stdenv.lib.platforms.all;
-    maintainers = [ stdenv.lib.maintainers.simons ];
+    platforms = platforms.all;
+    maintainers = [ maintainers.simons ];
   };
 }