1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-06-03 09:04:12 +02:00

add 8.5 image

This commit is contained in:
Robin Appelman 2026-03-09 23:00:21 +01:00
commit da6c6d754b
7 changed files with 37 additions and 49 deletions

View file

@ -16,7 +16,7 @@ jobs:
strategy: strategy:
matrix: matrix:
php-version: ["8.0", "8,1", "8.2", "8.3", "8.4"] php-version: ["8.0", "8,1", "8.2", "8.3", "8.4", "8.5"]
variant: [""] variant: [""]
name: haze-${{ matrix.php-version }}${{ matrix.variant }} name: haze-${{ matrix.php-version }}${{ matrix.variant }}

View file

@ -61,8 +61,8 @@ haze start [database] [php-version] [services] [vX.Y.Z]
Where `database` is one of `sqlite`, `mysql`, `mariadb`, `pgsql` or `oracle` Where `database` is one of `sqlite`, `mysql`, `mariadb`, `pgsql` or `oracle`
with an optional version (e.g. `pgsql:12`), defaults to `sqlite`. And with an optional version (e.g. `pgsql:12`), defaults to `sqlite`. And
`php-version` is one of `8.0`, `8.1`, `8.2`, `8.3` or `8.4`, defaults to the `php-version` is one of `8.0`, `8.1`, `8.2`, `8.3`, `8.4` or `8.5`, defaults to
maximum version support by the current Nextcloud version. the maximum version support by the current Nextcloud version.
Each php version also comes with a `-dbg` variant that has php compiled in debug Each php version also comes with a `-dbg` variant that has php compiled in debug
mode and can be used for debugging php itself with gdb. mode and can be used for debugging php itself with gdb.

38
flake.lock generated
View file

@ -2,11 +2,11 @@
"nodes": { "nodes": {
"crane": { "crane": {
"locked": { "locked": {
"lastModified": 1760924934, "lastModified": 1763938834,
"narHash": "sha256-tuuqY5aU7cUkR71sO2TraVKK2boYrdW3gCSXUkF4i44=", "narHash": "sha256-j8iB0Yr4zAvQLueCZ5abxfk6fnG/SJ5JnGUziETjwfg=",
"owner": "ipetkov", "owner": "ipetkov",
"repo": "crane", "repo": "crane",
"rev": "c6b4d5308293d0d04fcfeee92705017537cad02f", "rev": "d9e753122e51cee64eb8d2dddfe11148f339f5a2",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -38,11 +38,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1764593611, "lastModified": 1773062095,
"narHash": "sha256-6SdexcO69Dlu14YN2xuB1A6JHWSrcqMj7Na9oK7IT2M=", "narHash": "sha256-u+cK9IoJokO4YzQwMc2s8Vti0RL/LVSrROOEn2opc5U=",
"owner": "nix-community", "owner": "nix-community",
"repo": "flakelight", "repo": "flakelight",
"rev": "0d63256401341f528dd628f1a8e96d3afecade7a", "rev": "c99e4d5f40e578cb2d8f460ea2bbd5dc26316d24",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -60,11 +60,11 @@
"rust-overlay": "rust-overlay" "rust-overlay": "rust-overlay"
}, },
"locked": { "locked": {
"lastModified": 1763591898, "lastModified": 1772297202,
"narHash": "sha256-aHSMj7CIa9EJYxdf05wOWRGp0KRsT/TAox7uwVSdDb8=", "narHash": "sha256-UEzHO/tCmhPhr8RpWtbm1MTa7ABobwt3nCjrcuDAPm0=",
"ref": "refs/heads/main", "ref": "refs/heads/main",
"rev": "2d9b2da2c9f384f93ef977c48f8ee35ce586529b", "rev": "8690e1514863b934de12f2a503c9431d186ce30b",
"revCount": 66, "revCount": 68,
"type": "git", "type": "git",
"url": "https://codeberg.org/icewind/mill-scale.git" "url": "https://codeberg.org/icewind/mill-scale.git"
}, },
@ -75,11 +75,11 @@
}, },
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1764522689, "lastModified": 1772822230,
"narHash": "sha256-SqUuBFjhl/kpDiVaKLQBoD8TLD+/cTUzzgVFoaHrkqY=", "narHash": "sha256-yf3iYLGbGVlIthlQIk5/4/EQDZNNEmuqKZkQssMljuw=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "8bb5646e0bed5dbd3ab08c7a7cc15b75ab4e1d0f", "rev": "71caefce12ba78d84fe618cf61644dce01cf3a96",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -90,11 +90,11 @@
}, },
"nixpkgs_2": { "nixpkgs_2": {
"locked": { "locked": {
"lastModified": 1772956932, "lastModified": 1772173633,
"narHash": "sha256-M0yS4AafhKxPPmOHGqIV0iKxgNO8bHDWdl1kOwGBwRY=", "narHash": "sha256-MOH58F4AIbCkh6qlQcwMycyk5SWvsqnS/TCfnqDlpj4=",
"owner": "NixOS", "owner": "NixOS",
"repo": "nixpkgs", "repo": "nixpkgs",
"rev": "608d0cadfed240589a7eea422407a547ad626a14", "rev": "c0f3d81a7ddbc2b1332be0d8481a672b4f6004d6",
"type": "github" "type": "github"
}, },
"original": { "original": {
@ -141,11 +141,11 @@
] ]
}, },
"locked": { "locked": {
"lastModified": 1761964689, "lastModified": 1764557621,
"narHash": "sha256-Zo3LQQDz+64EQ9zor/WmeNTFLoZkjmhp0UY3G0D3seE=", "narHash": "sha256-kX5PoY8hQZ80+amMQgOO9t8Tc1JZ70gYRnzaVD4AA+o=",
"owner": "oxalica", "owner": "oxalica",
"repo": "rust-overlay", "repo": "rust-overlay",
"rev": "63d22578600f70d293aede6bc737efef60ebd97f", "rev": "93316876c2229460a5d6f5f052766cc4cef538ce",
"type": "github" "type": "github"
}, },
"original": { "original": {

View file

@ -42,6 +42,7 @@
]; ];
packages = { packages = {
"haze-image-php-8.5" = pkgs: pkgs.haze-image-php-85;
"haze-image-php-8.4" = pkgs: pkgs.haze-image-php-84; "haze-image-php-8.4" = pkgs: pkgs.haze-image-php-84;
"haze-image-php-8.3" = pkgs: pkgs.haze-image-php-83; "haze-image-php-8.3" = pkgs: pkgs.haze-image-php-83;
"haze-image-php-8.2" = pkgs: pkgs.haze-image-php-82; "haze-image-php-8.2" = pkgs: pkgs.haze-image-php-82;

View file

@ -9,7 +9,7 @@ echo "# Options in here overwrite the builtin php.ini" > /config/php.ini
echo "# xdebug.mode = debug" >> /config/php.ini echo "# xdebug.mode = debug" >> /config/php.ini
echo "# xdebug.start_with_request = yes" >> /config/php.ini echo "# xdebug.start_with_request = yes" >> /config/php.ini
chmod 0777 /config/php.ini chmod 0777 /config/php.ini
PHP_INI_DIR="$(php --ini | grep 'Scan' | cut -d ' ' -f7)" PHP_INI_DIR="$(php --ini | grep 'Scan' | cut -d ' ' -f7 | tr -d '"')"
ln -s /config/php.ini "$PHP_INI_DIR/zz_extra.ini" ln -s /config/php.ini "$PHP_INI_DIR/zz_extra.ini"
HAZE_UID=${HAZE_UID:-www-data} HAZE_UID=${HAZE_UID:-www-data}

View file

@ -1,5 +1,6 @@
final: prev: { final: prev: {
haze = final.callPackage ./package.nix {}; haze = final.callPackage ./package.nix {};
haze-image-php-85 = final.callPackage ./image/haze.nix {php = final.php85;};
haze-image-php-84 = final.callPackage ./image/haze.nix {php = final.php84;}; haze-image-php-84 = final.callPackage ./image/haze.nix {php = final.php84;};
haze-image-php-83 = final.callPackage ./image/haze.nix {php = final.php83;}; haze-image-php-83 = final.callPackage ./image/haze.nix {php = final.php83;};
haze-image-php-82 = final.callPackage ./image/haze.nix {php = final.php82;}; haze-image-php-82 = final.callPackage ./image/haze.nix {php = final.php82;};

View file

@ -21,20 +21,18 @@ use tokio::time::{sleep, timeout};
#[allow(dead_code)] #[allow(dead_code)]
pub enum PhpVersion { pub enum PhpVersion {
#[default] #[default]
Php85,
Php84, Php84,
Php83, Php83,
Php82, Php82,
Php81, Php81,
Php80, Php80,
Php74, Php85Dbg,
Php73,
Php84Dbg, Php84Dbg,
Php83Dbg, Php83Dbg,
Php82Dbg, Php82Dbg,
Php81Dbg, Php81Dbg,
Php80Dbg, Php80Dbg,
Php74Dbg,
Php73Dbg,
} }
pub const PHP_MEMORY_LIMIT: i64 = 2 * 1024 * 1024 * 1024; pub const PHP_MEMORY_LIMIT: i64 = 2 * 1024 * 1024 * 1024;
@ -44,24 +42,20 @@ impl FromStr for PhpVersion {
fn from_str(s: &str) -> Result<Self, Self::Err> { fn from_str(s: &str) -> Result<Self, Self::Err> {
match s { match s {
"7" => Ok(PhpVersion::Php74),
"7.3" => Ok(PhpVersion::Php73),
"7.4" => Ok(PhpVersion::Php74),
"8" => Ok(PhpVersion::Php81), "8" => Ok(PhpVersion::Php81),
"8.0" => Ok(PhpVersion::Php80), "8.0" => Ok(PhpVersion::Php80),
"8.1" => Ok(PhpVersion::Php81), "8.1" => Ok(PhpVersion::Php81),
"8.2" => Ok(PhpVersion::Php82), "8.2" => Ok(PhpVersion::Php82),
"8.3" => Ok(PhpVersion::Php83), "8.3" => Ok(PhpVersion::Php83),
"8.4" => Ok(PhpVersion::Php84), "8.4" => Ok(PhpVersion::Php84),
"7-dbg" => Ok(PhpVersion::Php74Dbg), "8.5" => Ok(PhpVersion::Php84),
"7.3-dbg" => Ok(PhpVersion::Php73Dbg),
"7.4-dbg" => Ok(PhpVersion::Php74Dbg),
"8-dbg" => Ok(PhpVersion::Php80Dbg), "8-dbg" => Ok(PhpVersion::Php80Dbg),
"8.0-dbg" => Ok(PhpVersion::Php80Dbg), "8.0-dbg" => Ok(PhpVersion::Php80Dbg),
"8.1-dbg" => Ok(PhpVersion::Php81Dbg), "8.1-dbg" => Ok(PhpVersion::Php81Dbg),
"8.2-dbg" => Ok(PhpVersion::Php82Dbg), "8.2-dbg" => Ok(PhpVersion::Php82Dbg),
"8.3-dbg" => Ok(PhpVersion::Php83Dbg), "8.3-dbg" => Ok(PhpVersion::Php83Dbg),
"8.4-dbg" => Ok(PhpVersion::Php84Dbg), "8.4-dbg" => Ok(PhpVersion::Php84Dbg),
"8.5-dbg" => Ok(PhpVersion::Php85Dbg),
_ => Err(()), _ => Err(()),
} }
} }
@ -73,53 +67,47 @@ impl PhpVersion {
} }
pub fn image(&self) -> &'static str { pub fn image(&self) -> &'static str {
// for now only 7.4
match self { match self {
PhpVersion::Php73 => "icewind1991/haze:7.3",
PhpVersion::Php74 => "icewind1991/haze:7.4",
PhpVersion::Php80 => "icewind1991/haze:8.0", PhpVersion::Php80 => "icewind1991/haze:8.0",
PhpVersion::Php81 => "icewind1991/haze:8.1", PhpVersion::Php81 => "icewind1991/haze:8.1",
PhpVersion::Php82 => "icewind1991/haze:8.2", PhpVersion::Php82 => "icewind1991/haze:8.2",
PhpVersion::Php83 => "icewind1991/haze:8.3", PhpVersion::Php83 => "icewind1991/haze:8.3",
PhpVersion::Php84 => "icewind1991/haze:8.4", PhpVersion::Php84 => "icewind1991/haze:8.4",
PhpVersion::Php73Dbg => "icewind1991/haze:7.3-dbg", PhpVersion::Php85 => "icewind1991/haze:8.5",
PhpVersion::Php74Dbg => "icewind1991/haze:7.4-dbg",
PhpVersion::Php80Dbg => "icewind1991/haze:8.0-dbg", PhpVersion::Php80Dbg => "icewind1991/haze:8.0-dbg",
PhpVersion::Php81Dbg => "icewind1991/haze:8.1-dbg", PhpVersion::Php81Dbg => "icewind1991/haze:8.1-dbg",
PhpVersion::Php82Dbg => "icewind1991/haze:8.2-dbg", PhpVersion::Php82Dbg => "icewind1991/haze:8.2-dbg",
PhpVersion::Php83Dbg => "icewind1991/haze:8.3-dbg", PhpVersion::Php83Dbg => "icewind1991/haze:8.3-dbg",
PhpVersion::Php84Dbg => "icewind1991/haze:8.4-dbg", PhpVersion::Php84Dbg => "icewind1991/haze:8.4-dbg",
PhpVersion::Php85Dbg => "icewind1991/haze:8.5-dbg",
} }
} }
pub fn name(&self) -> &'static str { pub fn name(&self) -> &'static str {
match self { match self {
PhpVersion::Php73 => "7.3",
PhpVersion::Php74 => "7.4",
PhpVersion::Php80 => "8.0", PhpVersion::Php80 => "8.0",
PhpVersion::Php81 => "8.1", PhpVersion::Php81 => "8.1",
PhpVersion::Php82 => "8.2", PhpVersion::Php82 => "8.2",
PhpVersion::Php83 => "8.3", PhpVersion::Php83 => "8.3",
PhpVersion::Php84 => "8.4", PhpVersion::Php84 => "8.4",
PhpVersion::Php73Dbg => "7.3-dbg", PhpVersion::Php85 => "8.4",
PhpVersion::Php74Dbg => "7.4-dbg",
PhpVersion::Php80Dbg => "8.0-dbg", PhpVersion::Php80Dbg => "8.0-dbg",
PhpVersion::Php81Dbg => "8.1-dbg", PhpVersion::Php81Dbg => "8.1-dbg",
PhpVersion::Php82Dbg => "8.2-dbg", PhpVersion::Php82Dbg => "8.2-dbg",
PhpVersion::Php83Dbg => "8.3-dbg", PhpVersion::Php83Dbg => "8.3-dbg",
PhpVersion::Php84Dbg => "8.4-dbg", PhpVersion::Php84Dbg => "8.4-dbg",
PhpVersion::Php85Dbg => "8.4-dbg",
} }
} }
pub fn from_number(major: u8, minor: u8) -> Option<Self> { pub fn from_number(major: u8, minor: u8) -> Option<Self> {
match (major, minor) { match (major, minor) {
(7, 3) => Some(PhpVersion::Php73),
(7, 4) => Some(PhpVersion::Php74),
(8, 0) => Some(PhpVersion::Php80), (8, 0) => Some(PhpVersion::Php80),
(8, 1) => Some(PhpVersion::Php81), (8, 1) => Some(PhpVersion::Php81),
(8, 2) => Some(PhpVersion::Php82), (8, 2) => Some(PhpVersion::Php82),
(8, 3) => Some(PhpVersion::Php83), (8, 3) => Some(PhpVersion::Php83),
(8, 4) => Some(PhpVersion::Php84), (8, 4) => Some(PhpVersion::Php84),
(8, 5) => Some(PhpVersion::Php85),
_ => None, _ => None,
} }
} }
@ -127,27 +115,25 @@ impl PhpVersion {
pub fn max_minor(major: u8) -> u8 { pub fn max_minor(major: u8) -> u8 {
match major { match major {
7 => 4, 7 => 4,
8 => 4, 8 => 5,
_ => 0, _ => 0,
} }
} }
pub fn all() -> impl Iterator<Item = Self> { pub fn all() -> impl Iterator<Item = Self> {
[ [
PhpVersion::Php73,
PhpVersion::Php74,
PhpVersion::Php80, PhpVersion::Php80,
PhpVersion::Php81, PhpVersion::Php81,
PhpVersion::Php82, PhpVersion::Php82,
PhpVersion::Php83, PhpVersion::Php83,
PhpVersion::Php84, PhpVersion::Php84,
PhpVersion::Php73Dbg, PhpVersion::Php85,
PhpVersion::Php74Dbg,
PhpVersion::Php80Dbg, PhpVersion::Php80Dbg,
PhpVersion::Php81Dbg, PhpVersion::Php81Dbg,
PhpVersion::Php82Dbg, PhpVersion::Php82Dbg,
PhpVersion::Php83Dbg, PhpVersion::Php83Dbg,
PhpVersion::Php84Dbg, PhpVersion::Php84Dbg,
PhpVersion::Php85Dbg,
] ]
.into_iter() .into_iter()
} }