From 8780fe0754556c9db6a562f691b726a05868563b Mon Sep 17 00:00:00 2001 From: Robin Appelman Date: Mon, 9 Mar 2026 22:48:27 +0100 Subject: [PATCH] build new 8.0 and 8.1 images --- .forgejo/workflows/docker.yaml | 2 +- README.md | 6 +-- flake.lock | 88 +++++++++++++++++++++++++++++++++- flake.nix | 14 +++++- nix/image/php.nix | 4 ++ nix/overlay.nix | 1 + 6 files changed, 108 insertions(+), 7 deletions(-) diff --git a/.forgejo/workflows/docker.yaml b/.forgejo/workflows/docker.yaml index dfbdb95..7944c61 100644 --- a/.forgejo/workflows/docker.yaml +++ b/.forgejo/workflows/docker.yaml @@ -16,7 +16,7 @@ jobs: strategy: matrix: - php-version: ["8.2", "8.3", "8.4"] + php-version: ["8.0", "8,1", "8.2", "8.3", "8.4"] variant: [""] name: haze-${{ matrix.php-version }}${{ matrix.variant }} diff --git a/README.md b/README.md index 7c5e334..6407db8 100644 --- a/README.md +++ b/README.md @@ -61,10 +61,8 @@ haze start [database] [php-version] [services] [vX.Y.Z] Where `database` is one of `sqlite`, `mysql`, `mariadb`, `pgsql` or `oracle` with an optional version (e.g. `pgsql:12`), defaults to `sqlite`. And -`php-version` is one of `8.2`, `8.3` or `8.4`, defaults to the maximum version -support by the current Nextcloud version. `7.3` till `8.1` are still supported -but the docker images for those versions aren't being updated anymore so they -might be missing some newer features. +`php-version` is one of `8.0`, `8.1`, `8.2`, `8.3` or `8.4`, defaults to the +maximum version support by the current Nextcloud version. 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. diff --git a/flake.lock b/flake.lock index 81e86a7..4ffb480 100644 --- a/flake.lock +++ b/flake.lock @@ -15,6 +15,22 @@ "type": "github" } }, + "flake-compat": { + "flake": false, + "locked": { + "lastModified": 1767039857, + "narHash": "sha256-vNpUSpF5Nuw8xvDLj2KCwwksIbjua2LZCqhV1LNRDns=", + "owner": "NixOS", + "repo": "flake-compat", + "rev": "5edf11c44bc78a0d334f6334cdaf7d60d732daab", + "type": "github" + }, + "original": { + "owner": "NixOS", + "repo": "flake-compat", + "type": "github" + } + }, "flakelight": { "inputs": { "nixpkgs": [ @@ -72,11 +88,48 @@ "type": "indirect" } }, + "nixpkgs_2": { + "locked": { + "lastModified": 1772956932, + "narHash": "sha256-M0yS4AafhKxPPmOHGqIV0iKxgNO8bHDWdl1kOwGBwRY=", + "owner": "NixOS", + "repo": "nixpkgs", + "rev": "608d0cadfed240589a7eea422407a547ad626a14", + "type": "github" + }, + "original": { + "owner": "NixOS", + "ref": "nixpkgs-unstable", + "repo": "nixpkgs", + "type": "github" + } + }, + "phps": { + "inputs": { + "flake-compat": "flake-compat", + "nixpkgs": "nixpkgs_2", + "utils": "utils" + }, + "locked": { + "lastModified": 1772365008, + "narHash": "sha256-/ynkWKeZ1dyRIUkQas0AB35semWAwCbTKXu+/q+8MGg=", + "owner": "fossar", + "repo": "nix-phps", + "rev": "f47eb877bf1c219809e4357eec2fdab8e3263b7b", + "type": "github" + }, + "original": { + "owner": "fossar", + "repo": "nix-phps", + "type": "github" + } + }, "root": { "inputs": { "flakelight": "flakelight", "mill-scale": "mill-scale", - "nixpkgs": "nixpkgs" + "nixpkgs": "nixpkgs", + "phps": "phps" } }, "rust-overlay": { @@ -100,6 +153,39 @@ "repo": "rust-overlay", "type": "github" } + }, + "systems": { + "locked": { + "lastModified": 1681028828, + "narHash": "sha256-Vy1rq5AaRuLzOxct8nz4T6wlgyUR7zLU309k9mBC768=", + "owner": "nix-systems", + "repo": "default", + "rev": "da67096a3b9bf56a91d16901293e51ba5b49a27e", + "type": "github" + }, + "original": { + "owner": "nix-systems", + "repo": "default", + "type": "github" + } + }, + "utils": { + "inputs": { + "systems": "systems" + }, + "locked": { + "lastModified": 1731533236, + "narHash": "sha256-l0KFg5HjrsfsO/JpG+r7fRrqm12kzFHyUHqHCVpMMbI=", + "owner": "numtide", + "repo": "flake-utils", + "rev": "11707dc2f618dd54ca8739b309ec4fc024de578b", + "type": "github" + }, + "original": { + "owner": "numtide", + "repo": "flake-utils", + "type": "github" + } } }, "root": "root", diff --git a/flake.nix b/flake.nix index 4d2f05b..991f5e8 100644 --- a/flake.nix +++ b/flake.nix @@ -9,8 +9,15 @@ url = "git+https://codeberg.org/icewind/mill-scale.git"; inputs.flakelight.follows = "flakelight"; }; + phps = { + url = "github:fossar/nix-phps"; + }; }; - outputs = {mill-scale, ...}: + outputs = { + mill-scale, + phps, + ... + }: mill-scale ./. { crossTargets = [ "x86_64-unknown-linux-gnu" @@ -29,12 +36,17 @@ withOverlays = [ (import ./nix/overlay.nix) + (prev: final: { + inherit (phps.packages.${prev.system}) php81 php80; + }) ]; packages = { "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.2" = pkgs: pkgs.haze-image-php-82; + "haze-image-php-8.1" = pkgs: pkgs.haze-image-php-81; + "haze-image-php-8.0" = pkgs: pkgs.haze-image-php-80; }; tools = pkgs: with pkgs; [cargo-edit bacon skopeo]; diff --git a/nix/image/php.nix b/nix/image/php.nix index 852b478..4fa7ff6 100644 --- a/nix/image/php.nix +++ b/nix/image/php.nix @@ -3,7 +3,9 @@ php, debug ? false, }: let + inherit (builtins) compareVersions; inherit (lib) optionals; + withBlackfire = !debug && ((compareVersions php.version "8.1.0") == 1); in php.buildEnv { extensions = { @@ -36,6 +38,8 @@ in ] ++ optionals (!debug) [ smbclient # this breaks the build for no apparent reason + ] + ++ optionals withBlackfire [ blackfire ]); extraConfig = '' diff --git a/nix/overlay.nix b/nix/overlay.nix index b08daca..1f927f8 100644 --- a/nix/overlay.nix +++ b/nix/overlay.nix @@ -4,4 +4,5 @@ final: prev: { 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-81 = final.callPackage ./image/haze.nix {php = final.php81;}; + haze-image-php-80 = final.callPackage ./image/haze.nix {php = final.php80;}; }