nixpkgs mirror (for testing) github.com/NixOS/nixpkgs
nix

feat: add `passthru` flags in PHP extension builder

So they can be handled correctly by `nix-update` tool

+15 -2
+10 -1
pkgs/build-support/build-pecl.nix
··· 1 - { stdenv, lib, php, autoreconfHook, fetchurl, re2c }: 1 + { stdenv, lib, php, autoreconfHook, fetchurl, re2c, nix-update-script }: 2 2 3 3 { pname 4 4 , version ··· 12 12 url = "https://pecl.php.net/get/${pname}-${version}.tgz"; 13 13 inherit (args) sha256; 14 14 } 15 + , passthru ? { } 15 16 , ... 16 17 }@args: 17 18 ··· 35 34 internalDeps} 36 35 ''; 37 36 checkPhase = "NO_INTERACTON=yes make test"; 37 + 38 + passthru = passthru // { 39 + # Thes flags were introduced for `nix-update` so that it can update 40 + # PHP extensions correctly. 41 + # See the corresponding PR: https://github.com/Mic92/nix-update/pull/123 42 + isPhpExtension = true; 43 + updateScript = nix-update-script {}; 44 + }; 38 45 })
+5 -1
pkgs/top-level/php-packages.nix
··· 30 30 , libxslt 31 31 , libzip 32 32 , net-snmp 33 + , nix-update-script 33 34 , oniguruma 34 35 , openldap 35 36 , openssl_1_1 ··· 52 51 buildPecl = import ../build-support/build-pecl.nix { 53 52 php = php.unwrapped; 54 53 inherit lib; 55 - inherit (pkgs) stdenv autoreconfHook fetchurl re2c; 54 + inherit (pkgs) stdenv autoreconfHook fetchurl re2c nix-update-script; 56 55 }; 57 56 58 57 # Wrap mkDerivation to prepend pname with "php-" to make names consistent 59 58 # with how buildPecl does it and make the file easier to overview. 60 59 mkDerivation = { pname, ... }@args: pkgs.stdenv.mkDerivation (args // { 61 60 pname = "php-${pname}"; 61 + passthru = { 62 + updateScript = nix-update-script {}; 63 + }; 62 64 meta = args.meta // { 63 65 mainProgram = args.meta.mainProgram or pname; 64 66 };