mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-22 15:03:28 +00:00
build-support/php: reorganize files
Pave the way for having multiple versions in the future
This commit is contained in:
parent
08e29ab163
commit
3d155494e4
8
pkgs/build-support/php/builders/default.nix
Normal file
8
pkgs/build-support/php/builders/default.nix
Normal 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 { };
|
||||||
|
};
|
||||||
|
}
|
@ -12,7 +12,7 @@ let
|
|||||||
let
|
let
|
||||||
phpDrv = finalAttrs.php or php;
|
phpDrv = finalAttrs.php or php;
|
||||||
composer = finalAttrs.composer or phpDrv.packages.composer;
|
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
|
in
|
||||||
{
|
{
|
||||||
composerLock = previousAttrs.composerLock or null;
|
composerLock = previousAttrs.composerLock or null;
|
@ -24,7 +24,7 @@ let
|
|||||||
let
|
let
|
||||||
phpDrv = finalAttrs.php or php;
|
phpDrv = finalAttrs.php or php;
|
||||||
composer = finalAttrs.composer or phpDrv.packages.composer;
|
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
|
in
|
||||||
assert (lib.assertMsg (previousAttrs ? src) "mkComposerRepository expects src argument.");
|
assert (lib.assertMsg (previousAttrs ? src) "mkComposerRepository expects src argument.");
|
||||||
assert (
|
assert (
|
@ -48,15 +48,16 @@
|
|||||||
|
|
||||||
lib.makeScope pkgs.newScope (self: let
|
lib.makeScope pkgs.newScope (self: let
|
||||||
inherit (self) buildPecl callPackage mkExtension php;
|
inherit (self) buildPecl callPackage mkExtension php;
|
||||||
|
|
||||||
|
builders = import ../build-support/php/builders {
|
||||||
|
inherit callPackages callPackage buildPecl;
|
||||||
|
};
|
||||||
in {
|
in {
|
||||||
buildPecl = callPackage ../build-support/php/build-pecl.nix {
|
buildPecl = callPackage ../build-support/php/build-pecl.nix {
|
||||||
php = php.unwrapped;
|
php = php.unwrapped;
|
||||||
};
|
};
|
||||||
|
|
||||||
composerHooks = callPackages ../build-support/php/hooks { };
|
inherit (builders.v1) buildComposerProject composerHooks mkComposerRepository;
|
||||||
|
|
||||||
mkComposerRepository = callPackage ../build-support/php/build-composer-repository.nix { };
|
|
||||||
buildComposerProject = callPackage ../build-support/php/build-composer-project.nix { };
|
|
||||||
|
|
||||||
# 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.
|
||||||
|
Loading…
Reference in New Issue
Block a user