From d0142e9b09ef8a30a26d4aad922c78bf8c83a7b7 Mon Sep 17 00:00:00 2001 From: aszlig Date: Mon, 24 Feb 2014 05:01:29 +0100 Subject: [PATCH] pcre/cross: Enable support for winpthreads. That way we're able to build with the JIT compiler enabled. Signed-off-by: aszlig --- pkgs/development/libraries/pcre/default.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index 51279701d4a5..067c3af43871 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -1,4 +1,8 @@ -{ stdenv, fetchurl, unicodeSupport ? true, cplusplusSupport ? true }: +{ stdenv, fetchurl, unicodeSupport ? true, cplusplusSupport ? true +, windows ? null +}: + +with stdenv.lib; stdenv.mkDerivation rec { name = "pcre-8.34"; @@ -16,12 +20,16 @@ stdenv.mkDerivation rec { --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 + crossAttrs = optionalAttrs (stdenv.cross.config == "x86_64-w64-mingw32") { + buildInputs = [ windows.mingw_w64_pthreads.crossDrv ]; + }; + meta = { homepage = "http://www.pcre.org/"; description = "A library for Perl Compatible Regular Expressions"; @@ -35,7 +43,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 ]; }; }