From ff6ab1b3c4f13bb2972b06ab9b881b49ef7b521b Mon Sep 17 00:00:00 2001 From: John Ericson Date: Sat, 3 Jun 2017 21:11:40 -0400 Subject: [PATCH] pcre: Modernize and fix cross --- pkgs/development/libraries/pcre/default.nix | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/pkgs/development/libraries/pcre/default.nix b/pkgs/development/libraries/pcre/default.nix index 21de038f7d63..93e32529592e 100644 --- a/pkgs/development/libraries/pcre/default.nix +++ b/pkgs/development/libraries/pcre/default.nix @@ -1,5 +1,7 @@ { stdenv, fetchurl -, windows ? null, variant ? null, pcre +, pcre, windows ? null +, buildPlatform, hostPlatform +, variant ? null }: with stdenv.lib; @@ -31,7 +33,9 @@ in stdenv.mkDerivation rec { patches = [ ./CVE-2017-7186.patch ]; - doCheck = with stdenv; !(isCygwin || isFreeBSD); + buildInputs = optional (hostPlatform.libc == "msvcrt") windows.mingw_w64_pthreads; + + doCheck = !(with hostPlatform; isCygwin || isFreeBSD) && hostPlatform == buildPlatform; # XXX: test failure on Cygwin # we are running out of stack on both freeBSDs on Hydra @@ -42,10 +46,6 @@ in stdenv.mkDerivation rec { ln -sf -t "$out/lib/" '${pcre.out}'/lib/libpcre{,posix}.{so.*.*.*,*dylib} ''; - crossAttrs = optionalAttrs (stdenv.cross.libc == "msvcrt") { - buildInputs = [ windows.mingw_w64_pthreads.crossDrv ]; - }; - meta = { homepage = "http://www.pcre.org/"; description = "A library for Perl Compatible Regular Expressions";