2021-01-21 17:00:13 +00:00
|
|
|
{ lib, stdenv, fetchurl }:
|
2015-10-10 01:08:25 +01:00
|
|
|
|
2016-05-24 15:15:43 +01:00
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 13:41:18 +01:00
|
|
|
pname = "pcre2";
|
2020-12-06 15:46:07 +00:00
|
|
|
version = "10.36";
|
2015-10-10 01:08:25 +01:00
|
|
|
src = fetchurl {
|
2019-08-15 13:41:18 +01:00
|
|
|
url = "https://ftp.pcre.org/pub/pcre/${pname}-${version}.tar.bz2";
|
2020-12-06 15:46:07 +00:00
|
|
|
sha256 = "0p3699msps07p40g9426lvxa3b41rg7k2fn7qxl2jm0kh4kkkvx9";
|
2015-10-10 01:08:25 +01:00
|
|
|
};
|
|
|
|
|
2020-11-28 05:45:35 +00:00
|
|
|
# Disable jit on Apple Silicon, https://github.com/zherczeg/sljit/issues/51
|
2015-10-10 19:56:24 +01:00
|
|
|
configureFlags = [
|
2015-10-10 19:56:34 +01:00
|
|
|
"--enable-pcre2-16"
|
|
|
|
"--enable-pcre2-32"
|
2020-11-28 05:45:35 +00:00
|
|
|
] ++ lib.optional (!stdenv.hostPlatform.isRiscV && !(stdenv.hostPlatform.isDarwin && stdenv.hostPlatform.isAarch64)) "--enable-jit";
|
2015-10-10 19:56:24 +01:00
|
|
|
|
2016-09-14 15:57:01 +01:00
|
|
|
outputs = [ "bin" "dev" "out" "doc" "man" "devdoc" ];
|
|
|
|
|
2018-08-10 01:30:08 +01:00
|
|
|
doCheck = false; # fails 1 out of 3 tests, looks like a bug
|
|
|
|
|
2016-09-14 15:57:01 +01:00
|
|
|
postFixup = ''
|
|
|
|
moveToOutput bin/pcre2-config "$dev"
|
|
|
|
'';
|
|
|
|
|
2021-01-21 17:00:13 +00:00
|
|
|
meta = with lib; {
|
2016-09-14 15:57:01 +01:00
|
|
|
description = "Perl Compatible Regular Expressions";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "http://www.pcre.org/";
|
2016-09-14 15:57:01 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ ttuegel ];
|
|
|
|
platforms = platforms.all;
|
2015-10-10 01:08:25 +01:00
|
|
|
};
|
|
|
|
}
|