Skip to content
This repository was archived by the owner on Mar 21, 2025. It is now read-only.

Commit f0ff646

Browse files
authored
Merge pull request #196 from gaelreyrol/feat/php84
feat: add PHP 8.4 packages
2 parents 2470142 + 054ebf0 commit f0ff646

File tree

6 files changed

+86
-40
lines changed

6 files changed

+86
-40
lines changed

flake.lock

Lines changed: 40 additions & 22 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

flake.nix

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@
1818
url = "github:php/php-src/PHP-8.3";
1919
flake = false;
2020
};
21+
php-src-84 = {
22+
url = "github:php/php-src/PHP-8.4";
23+
flake = false;
24+
};
2125
};
2226

2327
outputs =

src/makePhpPackage.nix

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ let
8282

8383
dom = prevPO.extensions.dom.overrideAttrs (attrs: {
8484
NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE or "" + cflags;
85-
patches = (patches.dom or [ ]) ++ attrs.patches;
85+
patches = (patches.dom or [ ]) ++ (attrs.patches or []);
8686
});
8787

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

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

145148
tokenizer = prevPO.extensions.tokenizer.overrideAttrs (attrs: {
146149
NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE or "" + cflags;
147-
patches = [ ] ++ lib.optionals (lib.versionAtLeast prevPO.php.version "8.1") attrs.patches;
150+
patches = [ ] ++ lib.optionals (lib.versionAtLeast prevPO.php.version "8.1") (attrs.patches or []);
148151
});
149152

150153
sqlite3 = prevPO.extensions.sqlite3.overrideAttrs (attrs: {
151154
NIX_CFLAGS_COMPILE = attrs.NIX_CFLAGS_COMPILE or "" + cflags;
152-
patches = (patches.sqlite3 or [ ]) ++ attrs.patches;
155+
patches = (patches.sqlite3 or [ ]) ++ (attrs.patches or []);
153156
});
154157
};
155158
};

src/overlays/active.nix

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -34,24 +34,25 @@ let
3434

3535
versions = [
3636
{
37-
version = "8.1.28";
38-
hash = "sha256-i+RQCW4BU8R9dThOfdWVzIl/HVPOAGBwjOlYm8wxQe4=";
39-
patches = {
40-
php = [ patches.libxmlpatch ];
41-
};
42-
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";
37+
version = "8.1.31";
38+
hash = "sha256-CzmCizRRUcrxt5XZ9LkjyYhyMXdsMwdt/J2QpEOQ0Nw=";
4339
extensions = extensions.php81-to-php8300;
4440
}
4541
{
46-
version = "8.2.19";
47-
hash = "sha256-PBj3zlG3x7JreX4flwedOGswNH6wToF/XmyOmydeKmo=";
42+
version = "8.2.27";
43+
hash = "sha256-blfbr3aafz3rTw9IuMU15nHMChgCLtf2/yO1DpQdS2A=";
4844
extensions = extensions.php81-to-php8300;
4945
}
5046
{
51-
version = "8.3.7";
52-
hash = "sha256-AcIM3hxaVpZlGHXtIvUHhJZ5+6dA+MQhYWt9Q9f3l9o=";
47+
version = "8.3.15";
48+
hash = "sha256-sWdaT/cwtYEbjmp2h0iMQug14Vapl3aqPm8Ber2jvpg=";
5349
extensions = extensions.php81-to-php8300;
5450
}
51+
{
52+
version = "8.4.2";
53+
hash = "sha256-70/pkhuIXOOwR3kqtgJg6vZX4igSvlEdGdDkXt+YR4M=";
54+
extensions = extensions.php-from-8400;
55+
}
5556
];
5657
in
5758
lib.mapAttrs (k: v: ((makePhpPackage v).withExtensions (v.extensions))) (makePackageSet versions)

src/overlays/archive.nix

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,15 @@ let
167167
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";
168168
extensions = extensions.php81-to-php8300;
169169
}
170+
{
171+
version = "8.1.28";
172+
hash = "sha256-i+RQCW4BU8R9dThOfdWVzIl/HVPOAGBwjOlYm8wxQe4=";
173+
patches = {
174+
php = [ patches.libxmlpatch patches.ext_dom_tests ];
175+
};
176+
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";
177+
extensions = extensions.php81-to-php8300;
178+
}
170179

171180
{
172181
version = "8.2.5";
@@ -315,6 +324,11 @@ let
315324
hash = "sha256-GRMWwgMmfZYWC0fSL5VdTcEXk96KXzJ+DCp2J1polOo=";
316325
extensions = extensions.php81-to-php8300;
317326
}
327+
{
328+
version = "8.2.19";
329+
hash = "sha256-PBj3zlG3x7JreX4flwedOGswNH6wToF/XmyOmydeKmo=";
330+
extensions = extensions.php81-to-php8300;
331+
}
318332

319333
{
320334
version = "8.3.0";
@@ -353,6 +367,11 @@ let
353367
hash = "sha256-PFyvGODAokOq7JE6OeywkgQxla3eTD/ELpRdpbkndpU=";
354368
extensions = extensions.php81-to-php8300;
355369
}
370+
{
371+
version = "8.3.7";
372+
hash = "sha256-AcIM3hxaVpZlGHXtIvUHhJZ5+6dA+MQhYWt9Q9f3l9o=";
373+
extensions = extensions.php81-to-php8300;
374+
}
356375
];
357376
in
358377
lib.mapAttrs (k: v: ((makePhpPackage v).withExtensions (v.extensions))) (makePackageSet versions)

src/overlays/snapshot.nix

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -14,10 +14,6 @@ let
1414
php-8-1-snapshot = {
1515
version = "8.1.999-${inputs.php-src-81.shortRev}";
1616
src = inputs.php-src-81;
17-
patches = {
18-
php = [ patches.libxmlpatch ];
19-
};
20-
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";
2117
extensions = extensions.php81-to-php8300;
2218
};
2319
php-8-2-snapshot = {
@@ -30,8 +26,13 @@ let
3026
src = inputs.php-src-83;
3127
extensions = extensions.php81-to-php8300;
3228
};
29+
php-8-4-snapshot = {
30+
version = "8.4.999-${inputs.php-src-84.shortRev}";
31+
src = inputs.php-src-84;
32+
extensions = extensions.php-from-8400;
33+
};
3334
php-master-snapshot = {
34-
version = "8.4.999-${inputs.php-src-master.shortRev}";
35+
version = "8.5.999-${inputs.php-src-master.shortRev}";
3536
src = inputs.php-src-master;
3637
extensions = extensions.php-from-8400;
3738
};

0 commit comments

Comments
 (0)