Extract a list of common PHP packages

This commit is contained in:
Oliver Davies 2025-06-28 13:01:14 +01:00
parent a7e145a3af
commit 7213017208
5 changed files with 16 additions and 10 deletions

View file

@ -13,6 +13,10 @@
flake-parts.lib.mkFlake { inherit inputs; } { flake-parts.lib.mkFlake { inherit inputs; } {
systems = [ "x86_64-linux" ]; systems = [ "x86_64-linux" ];
_module.args = {
commonPhpPackages = pkgs: with pkgs; [ phpactor ];
};
imports = [ imports = [
./modules/nodejs.nix ./modules/nodejs.nix
./modules/php74.nix ./modules/php74.nix

View file

@ -1,4 +1,4 @@
{ inputs, ... }: { commonPhpPackages, inputs, ... }:
{ {
perSystem = perSystem =
@ -11,11 +11,10 @@
in in
{ {
devShells.php74 = pkgs.mkShell { devShells.php74 = pkgs.mkShell {
packages = with pkgs; [ packages = [
php php
phpPackages.composer phpPackages.composer
phpactor ] ++ commonPhpPackages pkgs;
];
shellHook = '' shellHook = ''
php --version php --version

View file

@ -1,3 +1,5 @@
{ commonPhpPackages, ... }:
{ {
perSystem = perSystem =
{ pkgs, ... }: { pkgs, ... }:
@ -6,8 +8,7 @@
packages = with pkgs; [ packages = with pkgs; [
php81 php81
php81Packages.composer php81Packages.composer
phpactor ] ++ commonPhpPackages pkgs;
];
shellHook = '' shellHook = ''
php --version php --version

View file

@ -1,3 +1,5 @@
{ commonPhpPackages, ... }:
{ {
perSystem = perSystem =
{ pkgs, ... }: { pkgs, ... }:
@ -6,8 +8,7 @@
packages = with pkgs; [ packages = with pkgs; [
php82 php82
php82Packages.composer php82Packages.composer
phpactor ] ++ commonPhpPackages pkgs;
];
shellHook = '' shellHook = ''
php --version php --version

View file

@ -1,3 +1,5 @@
{ commonPhpPackages, ... }:
{ {
perSystem = perSystem =
{ pkgs, ... }: { pkgs, ... }:
@ -6,8 +8,7 @@
packages = with pkgs; [ packages = with pkgs; [
php83 php83
php83Packages.composer php83Packages.composer
phpactor ] ++ commonPhpPackages pkgs;
];
shellHook = '' shellHook = ''
php --version php --version