python3Packages.orjson: Disable failing tests on 32 bit
[NixPkgs.git] / pkgs / development / libraries / pcre2 / default.nix
blob226b92ccfdd35a1d155afb4e6c9bf63e4f813960
1 { lib
2 , stdenv
3 , fetchurl
4 , withJitSealloc ? true
5 }:
7 stdenv.mkDerivation rec {
8   pname = "pcre2";
9   version = "10.40";
11   src = fetchurl {
12     url = "https://github.com/PhilipHazel/pcre2/releases/download/pcre2-${version}/pcre2-${version}.tar.bz2";
13     hash = "sha256-FOS4PEeDkz3BfpZDGOYyT3yuG8ddjzx5vGlp8AwVnWg=";
14   };
16   configureFlags = [
17     "--enable-pcre2-16"
18     "--enable-pcre2-32"
19     # only enable jit on supported platforms which excludes Apple Silicon, see https://github.com/zherczeg/sljit/issues/51
20     "--enable-jit=auto"
21   ]
22   # fix pcre jit in systemd units that set MemoryDenyWriteExecute=true like gitea
23   ++ lib.optional withJitSealloc "--enable-jit-sealloc";
25   outputs = [ "bin" "dev" "out" "doc" "man" "devdoc" ];
27   postFixup = ''
28     moveToOutput bin/pcre2-config "$dev"
29   '';
31   meta = with lib; {
32     homepage = "https://www.pcre.org/";
33     description = "Perl Compatible Regular Expressions";
34     license = licenses.bsd3;
35     maintainers = with maintainers; [ ttuegel ];
36     platforms = platforms.all;
37   };