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; } {
systems = [ "x86_64-linux" ];
_module.args = {
commonPhpPackages = pkgs: with pkgs; [ phpactor ];
};
imports = [
./modules/nodejs.nix
./modules/php74.nix

View file

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

View file

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

View file

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

View file

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