phpExtensions.*: use `meta.broken` rather than filtering

Emily 8b7ca251 e06dae43

+12 -14
+12 -14
pkgs/top-level/php-packages.nix
··· 182 182 meta = { 183 183 description = "PHP upstream extension: ${name}"; 184 184 inherit (php.meta) maintainers homepage license; 185 - }; 185 + } // args.meta or { }; 186 186 })); 187 187 188 188 php = phpPackage; ··· 459 459 doCheck = stdenv.hostPlatform.isLinux; 460 460 } 461 461 { 462 - name = "imap"; 463 - buildInputs = [ uwimap openssl pam pcre2 libkrb5 ]; 464 - configureFlags = [ "--with-imap=${uwimap}" "--with-imap-ssl" "--with-kerberos" ]; 465 - # Using version from PECL on new PHP versions. 466 - enable = lib.versionOlder php.version "8.3"; 467 - } 468 - { 469 462 name = "intl"; 470 463 buildInputs = [ icu73 ]; 471 464 } ··· 560 553 internalDeps = [ php.extensions.pdo ]; 561 554 configureFlags = [ "--with-pdo-dblib=${freetds}" ]; 562 555 # Doesn't seem to work on darwin. 563 - enable = (!stdenv.hostPlatform.isDarwin); 556 + meta.broken = (!stdenv.hostPlatform.isDarwin); 564 557 doCheck = false; 565 558 } 566 559 { ··· 655 648 buildInputs = [ net-snmp openssl ]; 656 649 configureFlags = [ "--with-snmp" ]; 657 650 # net-snmp doesn't build on darwin. 658 - enable = (!stdenv.hostPlatform.isDarwin); 651 + meta.broken = (!stdenv.hostPlatform.isDarwin); 659 652 doCheck = false; 660 653 } 661 654 { ··· 810 803 "--with-zlib" 811 804 ]; 812 805 } 806 + ] ++ lib.optionals (lib.versionOlder php.version "8.3") [ 807 + # Using version from PECL on new PHP versions. 808 + { 809 + name = "imap"; 810 + buildInputs = [ uwimap openssl pam pcre2 libkrb5 ]; 811 + configureFlags = [ "--with-imap=${uwimap}" "--with-imap-ssl" "--with-kerberos" ]; 812 + } 813 813 ]; 814 814 815 815 # Convert the list of attrs: ··· 818 818 # [ { name = <name>; value = <extension drv>; } ... ] 819 819 # 820 820 # which we later use listToAttrs to make all attrs available by name. 821 - # 822 - # Also filter out extensions based on the enable property. 823 821 namedExtensions = builtins.map 824 822 (drv: { 825 823 name = drv.name; 826 - value = mkExtension (builtins.removeAttrs drv [ "enable" ]); 824 + value = mkExtension drv; 827 825 }) 828 - (builtins.filter (i: i.enable or true) extensionData); 826 + extensionData; 829 827 830 828 # Produce the final attribute set of all extensions defined. 831 829 in