push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,66 @@
commit f89ce378d3b405d69635da28dfd57adced23aa17
Author: kuflierl <41301536+kuflierl@users.noreply.github.com>
Date: Mon Sep 15 20:14:08 2025 +0200
server: replace pillow-avif-plugin, pyheif, heif-image-plugin with pillow-heif
diff --git a/requirements.txt b/requirements.txt
index ffe18f0c..16a72750 100644
--- a/requirements.txt
+++ b/requirements.txt
@@ -1,12 +1,10 @@
alembic>=0.8.5
certifi>=2017.11.5
coloredlogs==5.0
-heif-image-plugin==0.3.2
numpy>=1.8.2
-pillow-avif-plugin~=1.1.0
-pillow>=4.3.0
+pillow>=11.2.1
+pillow-heif>=1.0.0
psycopg2-binary>=2.6.1
-pyheif==0.6.1
pynacl>=1.2.1
pyRFC3339>=1.0
pytz>=2018.3
diff --git a/szurubooru/func/image_hash.py b/szurubooru/func/image_hash.py
index 76d5a846..b89541eb 100644
--- a/szurubooru/func/image_hash.py
+++ b/szurubooru/func/image_hash.py
@@ -4,13 +4,13 @@ from datetime import datetime
from io import BytesIO
from typing import Any, Callable, List, Optional, Set, Tuple
-import HeifImagePlugin
+from pillow_heif import register_heif_opener
import numpy as np
-import pillow_avif
from PIL import Image
from szurubooru import config, errors
+register_heif_opener()
logger = logging.getLogger(__name__)
# Math based on paper from H. Chi Wong, Marshall Bern and David Goldberg
diff --git a/szurubooru/func/images.py b/szurubooru/func/images.py
index e135d182..f4b5aa5b 100644
--- a/szurubooru/func/images.py
+++ b/szurubooru/func/images.py
@@ -7,14 +7,14 @@ import subprocess
from io import BytesIO
from typing import List
-import HeifImagePlugin
-import pillow_avif
+from pillow_heif import register_heif_opener
from PIL import Image as PILImage
from szurubooru import errors
from szurubooru.func import mime, util
logger = logging.getLogger(__name__)
+register_heif_opener()
def convert_heif_to_png(content: bytes) -> bytes:

View File

@@ -0,0 +1,36 @@
{
src,
version,
lib,
buildNpmPackage,
}:
buildNpmPackage {
pname = "szurubooru-client";
inherit version;
src = "${src}/client";
npmDepsHash = "sha256-HtcitZl2idgVleB6c0KCTSNLxh7hP8/G/RGdMaQG3iI=";
makeCacheWritable = true;
npmBuildFlags = [
"--gzip"
];
installPhase = ''
runHook preInstall
mkdir $out
mv ./public/* $out
runHook postInstall
'';
meta = with lib; {
description = "Client of szurubooru, an image board engine for small and medium communities";
homepage = "https://github.com/rr-/szurubooru";
license = licenses.gpl3;
maintainers = with maintainers; [ ratcornu ];
};
}

View File

@@ -0,0 +1,20 @@
{
callPackage,
fetchFromGitHub,
recurseIntoAttrs,
}:
let
version = "2.5-unstable-2025-07-19";
src = fetchFromGitHub {
owner = "rr-";
repo = "szurubooru";
rev = "5a0f8867f3af1556d82c1ad7e29977903300c2dd";
hash = "sha256-ihocmBS4h23bb4ZRhHEXvnHiNfRMPdUe94B5K9bi2E4=";
};
in
recurseIntoAttrs {
client = callPackage ./client.nix { inherit src version; };
server = callPackage ./server.nix { inherit src version; };
}

View File

@@ -0,0 +1,84 @@
{
src,
version,
lib,
nixosTests,
fetchPypi,
python3,
}:
let
overrides = [
(self: super: {
alembic = super.alembic.overridePythonAttrs (oldAttrs: rec {
version = "1.14.1";
src = fetchPypi {
pname = "alembic";
inherit version;
sha256 = "sha256-SW6IgkWlOt8UmPyrMXE6Rpxlg2+N524BOZqhw+kN0hM=";
};
doCheck = false;
});
sqlalchemy = super.sqlalchemy.overridePythonAttrs (oldAttrs: rec {
version = "1.3.23";
src = fetchPypi {
pname = "SQLAlchemy";
inherit version;
sha256 = "sha256-b8ozZyV4Zm9lfBMVUsTviXnBYG5JT3jNUZl0LfsmkYs=";
};
doCheck = false;
});
})
];
python = python3.override {
self = python;
packageOverrides = lib.composeManyExtensions overrides;
};
in
python.pkgs.buildPythonApplication {
pname = "szurubooru-server";
inherit version;
pyproject = true;
src = "${src}/server";
patches = [
./001-server-pillow-heif.patch
];
nativeBuildInputs = with python.pkgs; [ setuptools ];
propagatedBuildInputs = with python.pkgs; [
alembic
certifi
coloredlogs
legacy-cgi
numpy
pillow
pillow-heif
psycopg2-binary
pynacl
pyrfc3339
pytz
pyyaml
sqlalchemy
yt-dlp
];
postInstall = ''
mkdir $out/bin
install -m0755 $src/szuru-admin $out/bin/szuru-admin
'';
passthru.tests.szurubooru = nixosTests.szurubooru;
meta = with lib; {
description = "Server of szurubooru, an image board engine for small and medium communities";
homepage = "https://github.com/rr-/szurubooru";
license = licenses.gpl3;
maintainers = with maintainers; [ ratcornu ];
};
}