Merge pull request #309605 from drupol/build-support/php/files-reorganisation

build-support/php: reorganize files
This commit is contained in:
Pol Dellaiera 2024-05-07 15:00:10 +02:00 committed by GitHub
commit d582c5fe72
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
8 changed files with 18 additions and 7 deletions

View File

@ -0,0 +1,8 @@
{ callPackage, callPackages, ... }:
{
v1 = {
buildComposerProject = callPackage ./v1/build-composer-project.nix { };
mkComposerRepository = callPackage ./v1/build-composer-repository.nix { };
composerHooks = callPackages ./v1/hooks { };
};
}

View File

@ -12,7 +12,7 @@ let
let
phpDrv = finalAttrs.php or php;
composer = finalAttrs.composer or phpDrv.packages.composer;
composer-local-repo-plugin = callPackage ./pkgs/composer-local-repo-plugin.nix { };
composer-local-repo-plugin = callPackage ../../pkgs/composer-local-repo-plugin.nix { };
in
{
composerLock = previousAttrs.composerLock or null;

View File

@ -24,7 +24,7 @@ let
let
phpDrv = finalAttrs.php or php;
composer = finalAttrs.composer or phpDrv.packages.composer;
composer-local-repo-plugin = callPackage ./pkgs/composer-local-repo-plugin.nix { };
composer-local-repo-plugin = callPackage ../../pkgs/composer-local-repo-plugin.nix { };
in
assert (lib.assertMsg (previousAttrs ? src) "mkComposerRepository expects src argument.");
assert (

View File

@ -46,15 +46,18 @@
, fetchpatch
}:
lib.makeScope pkgs.newScope (self: with self; {
lib.makeScope pkgs.newScope (self: let
inherit (self) buildPecl callPackage mkExtension php;
builders = import ../build-support/php/builders {
inherit callPackages callPackage buildPecl;
};
in {
buildPecl = callPackage ../build-support/php/build-pecl.nix {
php = php.unwrapped;
};
composerHooks = callPackages ../build-support/php/hooks { };
mkComposerRepository = callPackage ../build-support/php/build-composer-repository.nix { };
buildComposerProject = callPackage ../build-support/php/build-composer-project.nix { };
inherit (builders.v1) buildComposerProject composerHooks mkComposerRepository;
# Wrap mkDerivation to prepend pname with "php-" to make names consistent
# with how buildPecl does it and make the file easier to overview.