php: Make buildEnv recursive + take extension deps into account

A slight rewrite of buildEnv which:

1. Makes buildEnv recursively add itself to its output, so that it can
   be accessed from any php derivation.

2. Orders the extension text strings according to their internalDeps
   attribute - dependencies have to be put before dependants in the
   php.ini or they will fail to load due to missing symbols.
This commit is contained in:
talyz
2020-04-03 10:11:15 +02:00
committed by Elis Hirwing
parent 6c810c235d
commit 8924a7de3d
2 changed files with 53 additions and 25 deletions
+2 -2
View File
@@ -717,7 +717,7 @@ let
, doCheck ? true
, ...
}: stdenv.mkDerivation {
pname = "php-ext-${name}";
pname = "php-${name}";
inherit (php) version src;
sourceRoot = "php-${php.version}/ext/${name}";
@@ -746,7 +746,7 @@ let
checkPhase = "echo n | make test";
installPhase = ''
mkdir -p $out/lib/php/extensions
cp modules/${name}.so $out/lib/php/extensions/ext-${name}.so
cp modules/${name}.so $out/lib/php/extensions/${name}.so
'';
};