Skip to content

Commit

Permalink
nix: update to php 8.2
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewpi committed Mar 16, 2024
1 parent f0489f6 commit 787bf34
Show file tree
Hide file tree
Showing 3 changed files with 66 additions and 184 deletions.
231 changes: 55 additions & 176 deletions flake.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

15 changes: 9 additions & 6 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,10 @@
pkgs = import nixpkgs {inherit system;};
mkNodePackage = mk-node-package.lib."${system}".mkNodePackage;

php81WithExtensions = with pkgs; (php81.buildEnv {
php = pkgs.php; # PHP 8.2
phpPackages = pkgs.phpPackages; # PHP 8.2

phpWithExtensions = php.buildEnv {
extensions = {
enabled,
all,
Expand All @@ -52,8 +55,8 @@
extraConfig = ''
xdebug.mode=debug
'';
});
composer = with pkgs; (php81Packages.composer.override {php = php81WithExtensions;});
};
composer = phpPackages.composer.override {php = phpWithExtensions;};

caCertificates = pkgs.runCommand "ca-certificates" {} ''
mkdir -p $out/etc/ssl/certs $out/etc/pki/tls/certs
Expand Down Expand Up @@ -201,7 +204,7 @@
};
in {
defaultPackage = panel;
devShell = import ./shell.nix {inherit composer php81WithExtensions pkgs;};
devShell = import ./shell.nix {inherit composer phpWithExtensions pkgs;};

packages = {
inherit panel;
Expand All @@ -224,7 +227,7 @@
mysql80
nodejs_18
nodePackages.yarn
php81WithExtensions
phpWithExtensions
];
pathsToLink = ["/bin" "/etc"];
};
Expand All @@ -242,7 +245,7 @@
caCertificates
caddy
configs
php81WithExtensions
phpWithExtensions

panel
];
Expand Down
4 changes: 2 additions & 2 deletions shell.nix
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
composer ? null,
php81WithExtensions ? null,
phpWithExtensions ? null,
pkgs ? import <nixpkgs> {},
}:
with pkgs;
Expand All @@ -10,7 +10,7 @@ with pkgs;
composer
nodejs_18
nodePackages.yarn
php81WithExtensions
phpWithExtensions
];

shellHook = ''
Expand Down

0 comments on commit 787bf34

Please sign in to comment.