feat: add passthru
flags in PHP extension builder
So they can be handled correctly by `nix-update` tool
This commit is contained in:
parent
449d97e1d7
commit
8cd511dde1
@ -1,4 +1,4 @@
|
|||||||
{ stdenv, lib, php, autoreconfHook, fetchurl, re2c }:
|
{ stdenv, lib, php, autoreconfHook, fetchurl, re2c, nix-update-script }:
|
||||||
|
|
||||||
{ pname
|
{ pname
|
||||||
, version
|
, version
|
||||||
@ -12,6 +12,7 @@
|
|||||||
url = "https://pecl.php.net/get/${pname}-${version}.tgz";
|
url = "https://pecl.php.net/get/${pname}-${version}.tgz";
|
||||||
inherit (args) sha256;
|
inherit (args) sha256;
|
||||||
}
|
}
|
||||||
|
, passthru ? { }
|
||||||
, ...
|
, ...
|
||||||
}@args:
|
}@args:
|
||||||
|
|
||||||
@ -34,4 +35,12 @@ stdenv.mkDerivation (args // {
|
|||||||
internalDeps}
|
internalDeps}
|
||||||
'';
|
'';
|
||||||
checkPhase = "NO_INTERACTON=yes make test";
|
checkPhase = "NO_INTERACTON=yes make test";
|
||||||
|
|
||||||
|
passthru = passthru // {
|
||||||
|
# Thes flags were introduced for `nix-update` so that it can update
|
||||||
|
# PHP extensions correctly.
|
||||||
|
# See the corresponding PR: https://github.com/Mic92/nix-update/pull/123
|
||||||
|
isPhpExtension = true;
|
||||||
|
updateScript = nix-update-script {};
|
||||||
|
};
|
||||||
})
|
})
|
||||||
|
@ -30,6 +30,7 @@
|
|||||||
, libxslt
|
, libxslt
|
||||||
, libzip
|
, libzip
|
||||||
, net-snmp
|
, net-snmp
|
||||||
|
, nix-update-script
|
||||||
, oniguruma
|
, oniguruma
|
||||||
, openldap
|
, openldap
|
||||||
, openssl_1_1
|
, openssl_1_1
|
||||||
@ -51,13 +52,16 @@ lib.makeScope pkgs.newScope (self: with self; {
|
|||||||
buildPecl = import ../build-support/build-pecl.nix {
|
buildPecl = import ../build-support/build-pecl.nix {
|
||||||
php = php.unwrapped;
|
php = php.unwrapped;
|
||||||
inherit lib;
|
inherit lib;
|
||||||
inherit (pkgs) stdenv autoreconfHook fetchurl re2c;
|
inherit (pkgs) stdenv autoreconfHook fetchurl re2c nix-update-script;
|
||||||
};
|
};
|
||||||
|
|
||||||
# Wrap mkDerivation to prepend pname with "php-" to make names consistent
|
# Wrap mkDerivation to prepend pname with "php-" to make names consistent
|
||||||
# with how buildPecl does it and make the file easier to overview.
|
# with how buildPecl does it and make the file easier to overview.
|
||||||
mkDerivation = { pname, ... }@args: pkgs.stdenv.mkDerivation (args // {
|
mkDerivation = { pname, ... }@args: pkgs.stdenv.mkDerivation (args // {
|
||||||
pname = "php-${pname}";
|
pname = "php-${pname}";
|
||||||
|
passthru = {
|
||||||
|
updateScript = nix-update-script {};
|
||||||
|
};
|
||||||
meta = args.meta // {
|
meta = args.meta // {
|
||||||
mainProgram = args.meta.mainProgram or pname;
|
mainProgram = args.meta.mainProgram or pname;
|
||||||
};
|
};
|
||||||
|
Loading…
Reference in New Issue
Block a user