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