waylyrics: 0.3.16 -> 0.3.20 (#364626)
[NixPkgs.git] / pkgs / development / libraries / pcre2 / default.nix
blob3667510d9a100bb471f7aea5f5c1e6ae052828fd
2   lib,
3   stdenv,
4   fetchurl,
5   updateAutotoolsGnuConfigScriptsHook,
6   withJitSealloc ? true,
7 }:
9 stdenv.mkDerivation rec {
10   pname = "pcre2";
11   version = "10.44";
13   src = fetchurl {
14     url = "https://github.com/PhilipHazel/pcre2/releases/download/pcre2-${version}/pcre2-${version}.tar.bz2";
15     hash = "sha256-008C4RPPcZOh6/J3DTrFJwiNSF1OBH7RDl0hfG713pY=";
16   };
18   nativeBuildInputs = [ updateAutotoolsGnuConfigScriptsHook ];
20   configureFlags =
21     [
22       "--enable-pcre2-16"
23       "--enable-pcre2-32"
24       # only enable jit on supported platforms which excludes Apple Silicon, see https://github.com/zherczeg/sljit/issues/51
25       "--enable-jit=${if stdenv.hostPlatform.isS390x then "no" else "auto"}"
26     ]
27     # fix pcre jit in systemd units that set MemoryDenyWriteExecute=true like gitea
28     ++ lib.optional withJitSealloc "--enable-jit-sealloc";
30   outputs = [
31     "bin"
32     "dev"
33     "out"
34     "doc"
35     "man"
36     "devdoc"
37   ];
39   postFixup = ''
40     moveToOutput bin/pcre2-config "$dev"
41   '';
43   meta = with lib; {
44     homepage = "https://www.pcre.org/";
45     description = "Perl Compatible Regular Expressions";
46     license = licenses.bsd3;
47     maintainers = with maintainers; [ ttuegel ];
48     platforms = platforms.all;
49     pkgConfigModules = [
50       "libpcre2-posix"
51       "libpcre2-8"
52       "libpcre2-16"
53       "libpcre2-32"
54     ];
55   };