Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)

Merge remote-tracking branch 'origin/release-21.05' into staging-next-21.05

+93 -211
+1 -7
nixos/modules/services/misc/nix-daemon.nix
··· 12 12 13 13 isNix23 = versionAtLeast nixVersion "2.3pre"; 14 14 15 - isNix24 = versionAtLeast nixVersion "2.4pre"; 16 - 17 15 makeNixBuildUser = nr: { 18 16 name = "nixbld${toString nr}"; 19 17 value = { ··· 43 41 max-jobs = ${toString (cfg.maxJobs)} 44 42 cores = ${toString (cfg.buildCores)} 45 43 sandbox = ${if (builtins.isBool cfg.useSandbox) then boolToString cfg.useSandbox else cfg.useSandbox} 46 - ${if isNix24 then '' 47 - sandbox-paths = ${toString cfg.sandboxPaths} 48 - '' else '' 49 - extra-sandbox-paths = ${toString cfg.sandboxPaths} 50 - ''} 44 + extra-sandbox-paths = ${toString cfg.sandboxPaths} 51 45 substituters = ${toString cfg.binaryCaches} 52 46 trusted-substituters = ${toString cfg.trustedBinaryCaches} 53 47 trusted-public-keys = ${toString cfg.binaryCachePublicKeys}
+1
nixos/modules/tasks/filesystems.nix
··· 321 321 RemainAfterExit = true; 322 322 }; 323 323 unitConfig = { 324 + ConditionPathIsMountPoint = "!/sys/fs/pstore"; 324 325 ConditionVirtualization = "!container"; 325 326 DefaultDependencies = false; # needed to prevent a cycle 326 327 };
+1 -1
pkgs/applications/editors/neovim/neovide/default.nix
··· 66 66 67 67 SKIA_OFFLINE_NINJA_COMMAND = "${ninja}/bin/ninja"; 68 68 SKIA_OFFLINE_GN_COMMAND = "${gn}/bin/gn"; 69 - LIBCLANG_PATH = "${llvmPackages.libclang}/lib"; 69 + LIBCLANG_PATH = "${llvmPackages.libclang.lib}/lib"; 70 70 71 71 # test needs a valid fontconfig file 72 72 FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
+3 -3
pkgs/applications/networking/cluster/terraform-providers/providers.json
··· 440 440 "owner": "DeterminateSystems", 441 441 "provider-source-address": "registry.terraform.io/DeterminateSystems/hydra", 442 442 "repo": "terraform-provider-hydra", 443 - "rev": "v0.1.0", 444 - "sha256": "18c9j54fy1f2sfz317rlv8z7fb18bpc1a0baw1bgl72x5sgil5kv", 443 + "rev": "v0.1.1", 444 + "sha256": "093al7crxgjimy4nnxvb1xy9p7yc0c7gf2rgvql7y3y3n8bz5q1b", 445 445 "vendorSha256": null, 446 - "version": "0.1.0" 446 + "version": "0.1.1" 447 447 }, 448 448 "ibm": { 449 449 "owner": "IBM-Cloud",
-92
pkgs/applications/networking/instant-messengers/signal-desktop/db-reencryption-wrapper.py
··· 1 - #!@PYTHON@ 2 - 3 - import json 4 - import os 5 - import re 6 - import shlex 7 - import sqlite3 8 - import subprocess 9 - import sys 10 - 11 - 12 - DB_PATH = os.path.join(os.environ['HOME'], '.config/Signal/sql/db.sqlite') 13 - DB_COPY = os.path.join(os.environ['HOME'], '.config/Signal/sql/db.tmp') 14 - CONFIG_PATH = os.path.join(os.environ['HOME'], '.config/Signal/config.json') 15 - 16 - 17 - def zenity_askyesno(title, text): 18 - args = [ 19 - '@ZENITY@', 20 - '--question', 21 - '--title', 22 - shlex.quote(title), 23 - '--text', 24 - shlex.quote(text) 25 - ] 26 - return subprocess.run(args).returncode == 0 27 - 28 - 29 - def start_signal(): 30 - os.execvp('@SIGNAL-DESKTOP@', ['@SIGNAL-DESKTOP@'] + sys.argv[1:]) 31 - 32 - 33 - def copy_pragma(name): 34 - result = subprocess.run([ 35 - '@SQLCIPHER@', 36 - DB_PATH, 37 - f"PRAGMA {name};" 38 - ], check=True, capture_output=True).stdout 39 - result = re.search(r'[0-9]+', result.decode()).group(0) 40 - subprocess.run([ 41 - '@SQLCIPHER@', 42 - DB_COPY, 43 - f"PRAGMA key = \"x'{key}'\"; PRAGMA {name} = {result};" 44 - ], check=True, capture_output=True) 45 - 46 - 47 - try: 48 - # Test if DB is encrypted: 49 - con = sqlite3.connect(f'file:{DB_PATH}?mode=ro', uri=True) 50 - cursor = con.cursor() 51 - cursor.execute("SELECT name FROM sqlite_master WHERE type='table';") 52 - con.close() 53 - except: 54 - # DB is encrypted, everything ok: 55 - start_signal() 56 - 57 - 58 - # DB is unencrypted! 59 - answer = zenity_askyesno( 60 - "Error: Signal-Desktop database is not encrypted", 61 - "Should we try to fix this automatically?" 62 - + "You likely want to backup ~/.config/Signal/ first." 63 - ) 64 - if not answer: 65 - answer = zenity_askyesno( 66 - "Launch Signal-Desktop", 67 - "DB is unencrypted, should we still launch Signal-Desktop?" 68 - + "Warning: This could result in data loss!" 69 - ) 70 - if not answer: 71 - print('Aborted') 72 - sys.exit(0) 73 - start_signal() 74 - 75 - # Re-encrypt the DB: 76 - with open(CONFIG_PATH) as json_file: 77 - key = json.load(json_file)['key'] 78 - result = subprocess.run([ 79 - '@SQLCIPHER@', 80 - DB_PATH, 81 - f" ATTACH DATABASE '{DB_COPY}' AS signal_db KEY \"x'{key}'\";" 82 - + " SELECT sqlcipher_export('signal_db');" 83 - + " DETACH DATABASE signal_db;" 84 - ]).returncode 85 - if result != 0: 86 - print('DB encryption failed') 87 - sys.exit(1) 88 - # Need to copy user_version and schema_version manually: 89 - copy_pragma('user_version') 90 - copy_pragma('schema_version') 91 - os.rename(DB_COPY, DB_PATH) 92 - start_signal()
+1 -14
pkgs/applications/networking/instant-messengers/signal-desktop/default.nix
··· 10 10 , hunspellDicts, spellcheckerLanguage ? null # E.g. "de_DE" 11 11 # For a full list of available languages: 12 12 # $ cat pkgs/development/libraries/hunspell/dictionaries.nix | grep "dictFileName =" | awk '{ print $3 }' 13 - , python3 14 - , gnome 15 - , sqlcipher 16 13 }: 17 14 18 15 let ··· 115 112 116 113 # Symlink to bin 117 114 mkdir -p $out/bin 118 - ln -s $out/lib/Signal/signal-desktop $out/bin/signal-desktop-unwrapped 115 + ln -s $out/lib/Signal/signal-desktop $out/bin/signal-desktop 119 116 120 117 runHook postInstall 121 118 ''; ··· 138 135 139 136 autoPatchelf --no-recurse -- $out/lib/Signal/ 140 137 patchelf --add-needed ${libpulseaudio}/lib/libpulse.so $out/lib/Signal/resources/app.asar.unpacked/node_modules/ringrtc/build/linux/libringrtc.node 141 - ''; 142 - 143 - postFixup = '' 144 - # This hack is temporarily required to avoid data-loss for users: 145 - cp ${./db-reencryption-wrapper.py} $out/bin/signal-desktop 146 - substituteInPlace $out/bin/signal-desktop \ 147 - --replace '@PYTHON@' '${python3}/bin/python3' \ 148 - --replace '@ZENITY@' '${gnome.zenity}/bin/zenity' \ 149 - --replace '@SQLCIPHER@' '${sqlcipher}/bin/sqlcipher' \ 150 - --replace '@SIGNAL-DESKTOP@' "$out/bin/signal-desktop-unwrapped" 151 138 ''; 152 139 153 140 # Tests if the application launches and waits for "Link your phone to Signal Desktop":
+3 -1
pkgs/development/libraries/exempi/default.nix
··· 11 11 12 12 configureFlags = [ 13 13 "--with-boost=${boost.dev}" 14 + ] ++ lib.optionals (!doCheck) [ 15 + "--enable-unittest=no" 14 16 ]; 15 17 16 18 buildInputs = [ expat zlib boost ] 17 19 ++ lib.optionals stdenv.isDarwin [ libiconv darwin.apple_sdk.frameworks.CoreServices ]; 18 20 19 - doCheck = stdenv.isLinux; 21 + doCheck = stdenv.isLinux && stdenv.is64bit; 20 22 21 23 meta = with lib; { 22 24 description = "An implementation of XMP (Adobe's Extensible Metadata Platform)";
+4
pkgs/development/libraries/igraph/default.nix
··· 96 96 cp -r doc "$out/share" 97 97 ''; 98 98 99 + postFixup = lib.optionalString stdenv.isDarwin '' 100 + install_name_tool -change libblas.dylib ${blas}/lib/libblas.dylib $out/lib/libigraph.dylib 101 + ''; 102 + 99 103 meta = with lib; { 100 104 description = "The network analysis package"; 101 105 homepage = "https://igraph.org/";
+2 -1
pkgs/development/libraries/qt-5/modules/qtwebengine.nix
··· 134 134 ''; 135 135 136 136 qmakeFlags = [ "--" "-system-ffmpeg" ] 137 - ++ optional stdenv.isLinux "-webengine-webrtc-pipewire" 137 + ++ optional (stdenv.isLinux && (lib.versionAtLeast qtCompatVersion "5.15")) "-webengine-webrtc-pipewire" 138 138 ++ optional enableProprietaryCodecs "-proprietary-codecs"; 139 139 140 140 propagatedBuildInputs = [ ··· 168 168 xorg.xrandr libXScrnSaver libXcursor libXrandr xorg.libpciaccess libXtst 169 169 xorg.libXcomposite xorg.libXdamage libdrm 170 170 171 + ] ++ optionals (stdenv.isLinux && (lib.versionAtLeast qtCompatVersion "5.15")) [ 171 172 # Pipewire 172 173 pipewire_0_2 173 174 ]
+4
pkgs/development/libraries/science/math/arpack/default.nix
··· 46 46 export OMP_NUM_THREADS=2 47 47 ''; 48 48 49 + postFixup = lib.optionalString stdenv.isDarwin '' 50 + install_name_tool -change libblas.dylib ${blas}/lib/libblas.dylib $out/lib/libarpack.dylib 51 + ''; 52 + 49 53 meta = { 50 54 homepage = "https://github.com/opencollab/arpack-ng"; 51 55 description = ''
+5 -18
pkgs/development/libraries/spdk/default.nix
··· 13 13 , openssl 14 14 }: 15 15 16 - let 17 - dpdk-compat-patch = fetchurl { 18 - url = "https://review.spdk.io/gerrit/plugins/gitiles/spdk/spdk/+/6acb9a58755856fb9316baf9dbbb7239dc6b9446%5E%21/?format=TEXT"; 19 - sha256 = "18q0956fkjw19r29hp16x4pygkfv01alj9cld2wlqqyfgp41nhn0"; 20 - }; 21 - in stdenv.mkDerivation rec { 16 + stdenv.mkDerivation rec { 22 17 pname = "spdk"; 23 - version = "20.04.1"; 18 + version = "21.04"; 24 19 25 20 src = fetchFromGitHub { 26 21 owner = "spdk"; 27 22 repo = "spdk"; 28 23 rev = "v${version}"; 29 - sha256 = "ApMyGamPrMalzZLbVkJlcwatiB8dOJmoxesdjkWZElk="; 24 + sha256 = "sha256-Xmmgojgtt1HwTqG/1ZOJVo1BcdAH0sheu40d73OJ68w="; 30 25 }; 31 26 32 - patches = [ 33 - ./spdk-dpdk-meson.patch 34 - # https://review.spdk.io/gerrit/c/spdk/spdk/+/3134 35 - (fetchpatch { 36 - url = "https://github.com/spdk/spdk/commit/c954b5b722c5c163774d3598458ff726c48852ab.patch"; 37 - sha256 = "1n149hva5qxmpr0nmav10nya7zklafxi136f809clv8pag84g698"; 38 - }) 39 - ]; 40 - 41 27 nativeBuildInputs = [ 42 28 python3 43 29 ]; ··· 48 34 49 35 postPatch = '' 50 36 patchShebangs . 51 - base64 -d ${dpdk-compat-patch} | patch -p1 52 37 ''; 53 38 54 39 configureFlags = [ "--with-dpdk=${dpdk}" ]; 55 40 56 41 NIX_CFLAGS_COMPILE = "-mssse3"; # Necessary to compile. 42 + # otherwise does not find strncpy when compiling 43 + NIX_LDFLAGS = "-lbsd"; 57 44 58 45 meta = with lib; { 59 46 description = "Set of libraries for fast user-mode storage";
+3 -9
pkgs/development/tools/misc/ccls/default.nix
··· 21 21 cmakeFlagsArray+=(-DCMAKE_CXX_FLAGS="-fvisibility=hidden -fno-rtti") 22 22 ''; 23 23 24 + clang = llvmPackages.clang; 24 25 shell = runtimeShell; 25 - postFixup = '' 26 - # We need to tell ccls where to find the standard library headers. 27 26 28 - standard_library_includes="\\\"-isystem\\\", \\\"${lib.getDev stdenv.cc.libc}/include\\\"" 29 - standard_library_includes+=", \\\"-isystem\\\", \\\"${llvmPackages.libcxx}/include/c++/v1\\\"" 30 - export standard_library_includes 31 - 32 - wrapped=".ccls-wrapped" 33 - export wrapped 34 - 27 + postFixup = '' 28 + export wrapped=".ccls-wrapped" 35 29 mv $out/bin/ccls $out/bin/$wrapped 36 30 substituteAll ${./wrapper} $out/bin/ccls 37 31 chmod --reference=$out/bin/$wrapped $out/bin/ccls
+5 -8
pkgs/development/tools/misc/ccls/wrapper
··· 1 1 #! @shell@ -e 2 2 3 - initString="--init={\"clang\":{\"extraArgs\": [@standard_library_includes@" 4 - 5 - if [ "${NIX_CFLAGS_COMPILE}" != "" ]; then 6 - read -a cflags_array <<< ${NIX_CFLAGS_COMPILE} 7 - initString+=$(printf ', \"%s\"' "${cflags_array[@]}") 8 - fi 9 - 10 - initString+="]}}" 3 + printf -v extraArgs ',\"%s\"' \ 4 + $(cat @clang@/nix-support/libc-cflags \ 5 + @clang@/nix-support/libcxx-cxxflags) \ 6 + ${NIX_CFLAGS_COMPILE} 7 + initString="--init={\"clang\":{\"extraArgs\":[${extraArgs:1}]}}" 11 8 12 9 exec -a "$0" "@out@/bin/@wrapped@" "${initString}" "$@"
+9 -5
pkgs/os-specific/linux/dpdk/default.nix
··· 8 8 9 9 let 10 10 mod = kernel != null; 11 - 11 + dpdkVersion = "21.02"; 12 12 in stdenv.mkDerivation rec { 13 - name = "dpdk-${version}" + lib.optionalString mod "-${kernel.version}"; 14 - version = "20.05"; 13 + pname = "dpdk"; 14 + version = "${dpdkVersion}" + lib.optionalString mod "-${kernel.version}"; 15 15 16 16 src = fetchurl { 17 - url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz"; 18 - sha256 = "0h0xv2zwb91b9n29afg5ihn06a8q28in64hag2f112kc19f79jj8"; 17 + url = "https://fast.dpdk.org/rel/dpdk-${dpdkVersion}.tar.xz"; 18 + sha256 = "sha256-CZJKKoJVGqKZeKNoYYT4oQX1L1ZAsb4of1QLLJHpSJs=="; 19 19 }; 20 20 21 21 nativeBuildInputs = [ ··· 25 25 pkg-config 26 26 python3 27 27 python3.pkgs.sphinx 28 + python3.pkgs.pyelftools 28 29 ]; 29 30 buildInputs = [ 30 31 jansson ··· 42 43 ''; 43 44 44 45 mesonFlags = [ 46 + "-Dtests=false" 45 47 "-Denable_docs=true" 46 48 "-Denable_kmods=${lib.boolToString mod}" 47 49 ] 50 + # kni kernel driver is currently not compatble with 5.11 51 + ++ lib.optional (mod && kernel.kernelOlder "5.11") "-Ddisable_drivers=kni" 48 52 ++ lib.optional (!shared) "-Ddefault_library=static" 49 53 ++ lib.optional stdenv.isx86_64 "-Dmachine=nehalem" 50 54 ++ lib.optional mod "-Dkernel_dir=${placeholder "kmod"}/lib/modules/${kernel.modDirVersion}";
+8 -18
pkgs/os-specific/linux/odp-dpdk/default.nix
··· 1 1 { lib, stdenv, fetchurl, autoreconfHook, pkg-config 2 - , dpdk, libconfig, libpcap, numactl, openssl, zlib, libbsd, libelf, jansson 2 + , dpdk, libbpf, libconfig, libpcap, numactl, openssl, zlib, libbsd, libelf, jansson 3 3 }: let 4 - dpdk_18_11 = dpdk.overrideAttrs (old: rec { 5 - version = "18.11.5"; 4 + dpdk_19_11 = dpdk.overrideAttrs (old: rec { 5 + version = "19.11"; 6 6 src = fetchurl { 7 7 url = "https://fast.dpdk.org/rel/dpdk-${version}.tar.xz"; 8 - sha256 = "1n6nfaj7703l19jcw540lm8avni48hj9q1rq4mfp8b8gd4zjprj0"; 8 + sha256 = "sha256-RnEzlohDZ3uxwna7dKNFiqfAAswh4pXFHjvWVJexEqs="; 9 9 }; 10 10 }); 11 11 12 12 in stdenv.mkDerivation rec { 13 13 pname = "odp-dpdk"; 14 - version = "1.22.0.0_DPDK_18.11"; 14 + version = "1.27.0.0_DPDK_19.11"; 15 15 16 16 src = fetchurl { 17 17 url = "https://git.linaro.org/lng/odp-dpdk.git/snapshot/${pname}-${version}.tar.gz"; 18 - sha256 = "1m8xhmfjqlj2gkkigq5ka3yh0xgzrcpfpaxp1pnh8d1g99094vbx"; 18 + sha256 = "sha256-/4m2NqnEXyenNUrCq3c2ozJzPWFFs/Qp7MAVm9B2biA="; 19 19 }; 20 20 21 21 nativeBuildInputs = [ ··· 23 23 pkg-config 24 24 ]; 25 25 buildInputs = [ 26 - dpdk_18_11 26 + dpdk_19_11 27 27 libconfig 28 28 libpcap 29 29 numactl ··· 32 32 libbsd 33 33 libelf 34 34 jansson 35 + libbpf 35 36 ]; 36 - 37 - NIX_CFLAGS_COMPILE = [ "-Wno-error=address-of-packed-member" ]; 38 - 39 - # for some reason, /build/odp-dpdk-1.22.0.0_DPDK_18.11/lib/.libs ends up in all binaries, 40 - # while it should be $out/lib instead. 41 - # prepend rpath with the proper location, the /build will get removed during rpath shrinking 42 - preFixup = '' 43 - for prog in $out/bin/*; do 44 - patchelf --set-rpath $out/lib:`patchelf --print-rpath $prog` $prog 45 - done 46 - ''; 47 37 48 38 # binaries will segfault otherwise 49 39 dontStrip = true;
-17
pkgs/os-specific/linux/pktgen/configure.patch
··· 1 - 1. librte_process_info does not exist. 2 - 2. lua5.3 library is liblua. 3 - 3. app/meson.build uses undeclared drivers_install_subdir. 4 - --- a/lib/common/meson.build 5 - +++ b/lib/common/meson.build 6 - @@ -34,1 +34,1 @@ 7 - -libs = ['eal', 'kvargs', 'cmdline', 'process_info'] 8 - +libs = ['eal', 'kvargs', 'cmdline'] 9 - --- a/lib/lua/meson.build 10 - +++ b/lib/lua/meson.build 11 - @@ -31 +31 @@ endforeach 12 - -ext_deps += cc.find_library('lua5.3', required: true) 13 - +ext_deps += cc.find_library('lua', required: true) 14 - --- a/meson_options.txt 15 - +++ b/meson_options.txt 16 - @@ -0,0 +1,1 @@ 17 - +option('drivers_install_subdir', type: 'string', value: '')
+14 -10
pkgs/os-specific/linux/pktgen/default.nix
··· 1 - { stdenv, lib, fetchurl, meson, ninja, pkg-config 1 + { stdenv, lib, fetchFromGitHub, meson, ninja, pkg-config 2 2 , dpdk, libbsd, libpcap, lua5_3, numactl, util-linux 3 3 , gtk2, which, withGtk ? false 4 4 }: 5 5 6 6 stdenv.mkDerivation rec { 7 7 pname = "pktgen"; 8 - version = "19.12.0"; 8 + version = "21.05.0"; 9 9 10 - src = fetchurl { 11 - url = "http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/${pname}-${version}.tar.xz"; 12 - sha256 = "1clfviz1qa4hysslcg6i29vsxwl9f6j1y7zf9wwx9br3yq08x956"; 10 + src = fetchFromGitHub { 11 + owner = "pktgen"; 12 + repo = "Pktgen-DPDK"; 13 + rev = "pktgen-${version}"; 14 + sha256 = "sha256-7lLDtbd14olEHO+1BuI6KTEUNRM/zAyRXau/OZbYbGA="; 13 15 }; 14 16 15 17 nativeBuildInputs = [ meson ninja pkg-config ]; 16 18 17 - buildInputs = 18 - [ dpdk libbsd libpcap lua5_3 numactl which ] 19 - ++ lib.optionals withGtk [gtk2]; 19 + buildInputs = [ 20 + dpdk libbsd libpcap lua5_3 numactl which 21 + ] ++ lib.optionals withGtk [ 22 + gtk2 23 + ]; 20 24 21 25 RTE_SDK = dpdk; 22 26 GUI = lib.optionalString withGtk "true"; 23 27 24 28 NIX_CFLAGS_COMPILE = "-msse3"; 25 - 26 - patches = [ ./configure.patch ]; 29 + # requires symbols from this file 30 + NIX_LDFLAGS = "-lrte_net_bond"; 27 31 28 32 postPatch = '' 29 33 substituteInPlace lib/common/lscpu.h --replace /usr/bin/lscpu ${util-linux}/bin/lscpu
+4 -2
pkgs/servers/nosql/redis/default.nix
··· 5 5 6 6 stdenv.mkDerivation rec { 7 7 pname = "redis"; 8 - version = "6.2.1"; 8 + version = "6.2.3"; 9 9 10 10 src = fetchurl { 11 11 url = "https://download.redis.io/releases/${pname}-${version}.tar.gz"; 12 - sha256 = "sha256-zSIlBQEsziCyVoL8qTHsk70hrpLLSr/nQs97dqqQdSA="; 12 + sha256 = "sha256-mO19UytelnH13wglu3Hw83SDoWVGNkBJOExj24dkUSs="; 13 13 }; 14 14 15 15 # Cross-compiling fixes 16 16 configurePhase = '' 17 + runHook preConfigure 17 18 ${lib.optionalString (stdenv.buildPlatform != stdenv.hostPlatform) '' 18 19 # This fixes hiredis, which has the AR awkwardly coded. 19 20 # Probably a good candidate for a patch upstream. 20 21 makeFlagsArray+=('STLIB_MAKE_CMD=${stdenv.cc.targetPrefix}ar rcs $(STLIBNAME)') 21 22 ''} 23 + runHook postConfigure 22 24 ''; 23 25 24 26 nativeBuildInputs = [ pkg-config ];
+25 -5
pkgs/top-level/php-packages.nix
··· 235 235 (dep: "mkdir -p ext; ln -s ${dep.dev}/include ext/${dep.extensionName}") 236 236 internalDeps} 237 237 ''; 238 - checkPhase = "echo n | make test"; 238 + checkPhase = "runHook preCheck; echo n | make test; runHook postCheck"; 239 239 outputs = [ "out" "dev" ]; 240 240 installPhase = '' 241 241 mkdir -p $out/lib/php/extensions ··· 270 270 { name = "dba"; } 271 271 { name = "dom"; 272 272 buildInputs = [ libxml2 ]; 273 + patches = [ 274 + # https://github.com/php/php-src/pull/7030 275 + (fetchpatch { 276 + url = "https://github.com/php/php-src/commit/4cc261aa6afca2190b1b74de39c3caa462ec6f0b.patch"; 277 + sha256 = "11qsdiwj1zmpfc2pgh6nr0sn7qa1nyjg4jwf69cgwnd57qfjcy4k"; 278 + excludes = [ "ext/dom/tests/bug43364.phpt" "ext/dom/tests/bug80268.phpt" ]; 279 + }) 280 + ]; 281 + # For some reason `patch` fails to remove these files correctly. 282 + # Since `postPatch` is already used in `mkExtension`, we have to make it here. 283 + preCheck = '' 284 + rm tests/bug43364.phpt 285 + rm tests/bug80268.phpt 286 + ''; 273 287 configureFlags = [ "--enable-dom" ] 274 288 # Required to build on darwin. 275 289 ++ lib.optionals (lib.versionOlder php.version "7.4") [ "--with-libxml-dir=${libxml2.dev}" ]; } ··· 322 336 configureFlags = [ "--with-gmp=${gmp.dev}" ]; } 323 337 { name = "hash"; enable = lib.versionOlder php.version "7.4"; } 324 338 { name = "iconv"; 325 - configureFlags = if stdenv.isDarwin then 326 - [ "--with-iconv=${libiconv}" ] 327 - else 328 - [ "--with-iconv" ]; 339 + configureFlags = [ 340 + "--with-iconv${lib.optionalString stdenv.isDarwin "=${libiconv}"}" 341 + ]; 342 + patches = lib.optionals (lib.versionOlder php.version "8.0") [ 343 + # Header path defaults to FHS location, preventing the configure script from detecting errno support. 344 + (fetchpatch { 345 + url = "https://github.com/fossar/nix-phps/raw/263861a8c9bdafd7abe44db6db4ef0179643680c/pkgs/iconv-header-path.patch"; 346 + sha256 = "7GHnEUu+hcsQ4h3itDwk6p46ZKfib9JZ2XpWlXrdn6E="; 347 + }) 348 + ]; 329 349 doCheck = false; } 330 350 { name = "imap"; 331 351 buildInputs = [ uwimap openssl pam pcre' ];