Skip to content

Commit

Permalink
Merge pull request #196 from gaelreyrol/feat/php84
Browse files Browse the repository at this point in the history
feat: add PHP 8.4 packages
  • Loading branch information
drupol authored Feb 1, 2025
2 parents 2470142 + 054ebf0 commit f0ff646
Show file tree
Hide file tree
Showing 6 changed files with 86 additions and 40 deletions.
62 changes: 40 additions & 22 deletions flake.lock

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

4 changes: 4 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,10 @@
url = "github:php/php-src/PHP-8.3";
flake = false;
};
php-src-84 = {
url = "github:php/php-src/PHP-8.4";
flake = false;
};
};

outputs =
Expand Down
9 changes: 6 additions & 3 deletions src/makePhpPackage.nix
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ let

dom = prevPO.extensions.dom.overrideAttrs (attrs: {
NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE or "" + cflags;
patches = (patches.dom or [ ]) ++ attrs.patches;
patches = (patches.dom or [ ]) ++ (attrs.patches or []);
});

opcache = prevPO.extensions.opcache.overrideAttrs (attrs: {
Expand Down Expand Up @@ -120,6 +120,9 @@ let
# the SOAP extension requires the `session` extension.
soap = prevPO.extensions.soap.overrideAttrs (attrs: {
internalDeps = attrs.internalDeps or [ ] ++ [ prevPO.extensions.session ];
# Remove soap patch as it has been upstreamed
# See https://github.com/NixOS/nixpkgs/pull/358196 (fix soap test)
patches = if (lib.versionAtLeast prevPO.php.version "8.3") then [] else (attrs.patches or []);
});

sockets = prevPO.extensions.sockets.overrideAttrs (attrs: {
Expand All @@ -144,12 +147,12 @@ let

tokenizer = prevPO.extensions.tokenizer.overrideAttrs (attrs: {
NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE or "" + cflags;
patches = [ ] ++ lib.optionals (lib.versionAtLeast prevPO.php.version "8.1") attrs.patches;
patches = [ ] ++ lib.optionals (lib.versionAtLeast prevPO.php.version "8.1") (attrs.patches or []);
});

sqlite3 = prevPO.extensions.sqlite3.overrideAttrs (attrs: {
NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE or "" + cflags;
patches = (patches.sqlite3 or [ ]) ++ attrs.patches;
patches = (patches.sqlite3 or [ ]) ++ (attrs.patches or []);
});
};
};
Expand Down
21 changes: 11 additions & 10 deletions src/overlays/active.nix
Original file line number Diff line number Diff line change
Expand Up @@ -34,24 +34,25 @@ let

versions = [
{
version = "8.1.28";
hash = "sha256-i+RQCW4BU8R9dThOfdWVzIl/HVPOAGBwjOlYm8wxQe4=";
patches = {
php = [ patches.libxmlpatch ];
};
cflags = " -Wno-compare-distinct-pointer-types -Wno-implicit-const-int-float-conversion -Wno-deprecated-declarations -Wno-incompatible-function-pointer-types -Wno-incompatible-pointer-types-discards-qualifiers";
version = "8.1.31";
hash = "sha256-CzmCizRRUcrxt5XZ9LkjyYhyMXdsMwdt/J2QpEOQ0Nw=";
extensions = extensions.php81-to-php8300;
}
{
version = "8.2.19";
hash = "sha256-PBj3zlG3x7JreX4flwedOGswNH6wToF/XmyOmydeKmo=";
version = "8.2.27";
hash = "sha256-blfbr3aafz3rTw9IuMU15nHMChgCLtf2/yO1DpQdS2A=";
extensions = extensions.php81-to-php8300;
}
{
version = "8.3.7";
hash = "sha256-AcIM3hxaVpZlGHXtIvUHhJZ5+6dA+MQhYWt9Q9f3l9o=";
version = "8.3.15";
hash = "sha256-sWdaT/cwtYEbjmp2h0iMQug14Vapl3aqPm8Ber2jvpg=";
extensions = extensions.php81-to-php8300;
}
{
version = "8.4.2";
hash = "sha256-70/pkhuIXOOwR3kqtgJg6vZX4igSvlEdGdDkXt+YR4M=";
extensions = extensions.php-from-8400;
}
];
in
lib.mapAttrs (k: v: ((makePhpPackage v).withExtensions (v.extensions))) (makePackageSet versions)
19 changes: 19 additions & 0 deletions src/overlays/archive.nix
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,15 @@ let
cflags = " -Wno-compare-distinct-pointer-types -Wno-implicit-const-int-float-conversion -Wno-deprecated-declarations -Wno-incompatible-function-pointer-types -Wno-incompatible-pointer-types-discards-qualifiers";
extensions = extensions.php81-to-php8300;
}
{
version = "8.1.28";
hash = "sha256-i+RQCW4BU8R9dThOfdWVzIl/HVPOAGBwjOlYm8wxQe4=";
patches = {
php = [ patches.libxmlpatch patches.ext_dom_tests ];
};
cflags = " -Wno-compare-distinct-pointer-types -Wno-implicit-const-int-float-conversion -Wno-deprecated-declarations -Wno-incompatible-function-pointer-types -Wno-incompatible-pointer-types-discards-qualifiers";
extensions = extensions.php81-to-php8300;
}

{
version = "8.2.5";
Expand Down Expand Up @@ -315,6 +324,11 @@ let
hash = "sha256-GRMWwgMmfZYWC0fSL5VdTcEXk96KXzJ+DCp2J1polOo=";
extensions = extensions.php81-to-php8300;
}
{
version = "8.2.19";
hash = "sha256-PBj3zlG3x7JreX4flwedOGswNH6wToF/XmyOmydeKmo=";
extensions = extensions.php81-to-php8300;
}

{
version = "8.3.0";
Expand Down Expand Up @@ -353,6 +367,11 @@ let
hash = "sha256-PFyvGODAokOq7JE6OeywkgQxla3eTD/ELpRdpbkndpU=";
extensions = extensions.php81-to-php8300;
}
{
version = "8.3.7";
hash = "sha256-AcIM3hxaVpZlGHXtIvUHhJZ5+6dA+MQhYWt9Q9f3l9o=";
extensions = extensions.php81-to-php8300;
}
];
in
lib.mapAttrs (k: v: ((makePhpPackage v).withExtensions (v.extensions))) (makePackageSet versions)
11 changes: 6 additions & 5 deletions src/overlays/snapshot.nix
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,6 @@ let
php-8-1-snapshot = {
version = "8.1.999-${inputs.php-src-81.shortRev}";
src = inputs.php-src-81;
patches = {
php = [ patches.libxmlpatch ];
};
cflags = " -Wno-compare-distinct-pointer-types -Wno-implicit-const-int-float-conversion -Wno-deprecated-declarations -Wno-incompatible-function-pointer-types -Wno-incompatible-pointer-types-discards-qualifiers";
extensions = extensions.php81-to-php8300;
};
php-8-2-snapshot = {
Expand All @@ -30,8 +26,13 @@ let
src = inputs.php-src-83;
extensions = extensions.php81-to-php8300;
};
php-8-4-snapshot = {
version = "8.4.999-${inputs.php-src-84.shortRev}";
src = inputs.php-src-84;
extensions = extensions.php-from-8400;
};
php-master-snapshot = {
version = "8.4.999-${inputs.php-src-master.shortRev}";
version = "8.5.999-${inputs.php-src-master.shortRev}";
src = inputs.php-src-master;
extensions = extensions.php-from-8400;
};
Expand Down

0 comments on commit f0ff646

Please sign in to comment.