fix(nix/package): update package and dependencies, temporarily ignore tests

This commit is contained in:
Xarvex
2026-08-28 12:21:44 -05:00
parent f978ae1ea1
commit 55b033eca4
7 changed files with 124 additions and 71 deletions
Generated
+6 -6
View File
@@ -7,11 +7,11 @@
]
},
"locked": {
"lastModified": 1782949081,
"narHash": "sha256-vp6Y/Grm98ESt6ceOkWiHWyZRDV3J1RID4w+6NWK9yA=",
"lastModified": 1787559586,
"narHash": "sha256-onL0VLf9vPllmT0H/OlURIU5r5t5WIEl7t4tVNKT0Nw=",
"owner": "hercules-ci",
"repo": "flake-parts",
"rev": "17c9d6cdfc60c64f4ee8d306f9bc0b4ccb51481e",
"rev": "9d0d87172c374f89da73c1cfe6d81ae62feac1f1",
"type": "github"
},
"original": {
@@ -22,11 +22,11 @@
},
"nixpkgs": {
"locked": {
"lastModified": 1785571196,
"narHash": "sha256-KoTsyMQqnXQZq8deCEnu4QkyldkwH/bpMMhUcfMdGIw=",
"lastModified": 1787736819,
"narHash": "sha256-cV5xEJJK3BvhU8rEd4mC9UsmDi5qscv/kzGPhBRC5WA=",
"owner": "NixOS",
"repo": "nixpkgs",
"rev": "148bab9c1c3c53136ecb44a6ea356a0ed5b39b06",
"rev": "9fbb54b33e91ee4ca368e35a78e0613c720600b3",
"type": "github"
},
"original": {
+4 -3
View File
@@ -1,5 +1,5 @@
# SPDX-FileCopyrightText: (c) TagStudio Contributors
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-License-Identifier: MIT
{
description = "TagStudio";
@@ -49,9 +49,10 @@
inherit pillow-jxl-plugin;
};
openexr = python3Packages.callPackage ./nix/package/openexr.nix { inherit (pkgs) openexr; };
pillow-jxl-plugin = python3Packages.callPackage ./nix/package/pillow-jxl-plugin.nix {
inherit (pkgs) cmake;
inherit pyexiv2;
inherit openexr pyexiv2;
};
pyexiv2 = python3Packages.callPackage ./nix/package/pyexiv2.nix { inherit (pkgs) exiv2; };
in
@@ -59,7 +60,7 @@
inherit tagstudio;
tagstudio-jxl = tagstudio.override { withJXLSupport = true; };
inherit pillow-jxl-plugin pyexiv2;
inherit openexr pillow-jxl-plugin pyexiv2;
}
)
);
+42 -38
View File
@@ -1,5 +1,5 @@
# SPDX-FileCopyrightText: (c) TagStudio Contributors
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-License-Identifier: MIT
{
ffmpeg-headless,
@@ -40,12 +40,36 @@ python3Packages.buildPythonApplication {
qt6.qtmultimedia
];
nativeCheckInputs = with python3Packages; [
pytest-qt
pytest-xdist
pytestCheckHook
syrupy
];
build-system = with python3Packages; [ hatchling ];
dependencies =
with python3Packages;
[
chardet_5
ffmpeg-python
humanfriendly
mutagen
numpy
opencv-python
pillow
pillow-heif
py7zr
pydantic
pydub
pyside6
rarfile
rawpy
requests
semver
send2trash
sqlalchemy
srctools
structlog
toml
ujson
wcmatch
]
++ lib.optional (pythonAtLeast "3.13") audioop-lts
++ lib.optional withJXLSupport pillow-jxl-plugin;
# TODO: Install more icon resolutions when available.
preInstall = ''
@@ -90,38 +114,18 @@ python3Packages.buildPythonApplication {
"structlog"
"typing-extensions"
];
pythonImportsCheck = [ "tagstudio" ];
build-system = with python3Packages; [ hatchling ];
dependencies =
with python3Packages;
[
chardet_5
ffmpeg-python
humanfriendly
mutagen
numpy
opencv-python
pillow
pillow-heif
py7zr
pydantic
pydub
pyside6
rarfile
rawpy
requests
semver
send2trash
sqlalchemy
srctools
structlog
toml
ujson
wcmatch
]
++ lib.optional (pythonAtLeast "3.13") audioop-lts
++ lib.optional withJXLSupport pillow-jxl-plugin;
# HACK: All tests fail with Python: Aborted for unknown reasons.
doCheck = false;
nativeCheckInputs = with python3Packages; [
pytest-qt
pytest-xdist
pytestCheckHook
syrupy
];
pythonImportsCheck = [ "tagstudio" ];
# These tests require modifications to a library, which does not work
# in a read-only environment.
+38
View File
@@ -0,0 +1,38 @@
# SPDX-FileCopyrightText: (c) TagStudio Contributors
# SPDX-License-Identifier: MIT
{
lib,
numpy,
openexr,
pybind11,
pytest,
python,
pythonImportsCheckHook,
toPythonModule,
}:
toPythonModule (
openexr.overrideAttrs (o: {
buildInputs = o.buildInputs or [ ] ++ [ pybind11 ];
cmakeFlags = o.cmakeFlags or [ ] ++ [ (lib.cmakeBool "OPENEXR_BUILD_PYTHON" true) ];
# `python.sitePackages` replacement can be removed once Python install path is inherited from sysconfig.
# Currently on main, but not part of a release.
# See: https://github.com/AcademySoftwareFoundation/openexr/commit/30345db72944b38926f13b5114b9a01b4b553890
postPatch = o.postPatch or "" + /* bash */ ''
substituteInPlace src/wrappers/python/CMakeLists.txt \
--replace-warn python/OpenEXR ${python.sitePackages} \
--replace-fail 'PYTHONPATH=''${CMAKE_CURRENT_BINARY_DIR}' 'PYTHONPATH=''${CMAKE_CURRENT_BINARY_DIR}:'"$PYTHONPATH"
'';
nativeCheckInputs = o.nativeCheckInputs or [ ] ++ [
numpy
pythonImportsCheckHook
];
checkInputs = o.checkInputs or [ ] ++ [ pytest ];
pythonImportsCheck = o.pythonImportsCheck or [ ] ++ [ "OpenEXR" ];
})
)
+15 -13
View File
@@ -1,5 +1,5 @@
# SPDX-FileCopyrightText: (c) TagStudio Contributors
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-License-Identifier: MIT
{
buildPythonPackage,
@@ -7,6 +7,7 @@
fetchPypi,
lib,
numpy,
openexr,
packaging,
pillow,
pyexiv2,
@@ -16,18 +17,18 @@
buildPythonPackage rec {
pname = "pillow-jxl-plugin";
version = "1.3.4";
version = "1.3.8";
pyproject = true;
src = fetchPypi {
pname = "pillow_jxl_plugin";
inherit version;
hash = "sha256-jqWJ/FWep8XfzLQq9NgUj121CPX01FGDKLq1ox/LJo4=";
hash = "sha256-RDD9d1eJl0IHnFSKfSU31tY88PHTIxgAlbwPbwPZ1Po=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit src;
hash = "sha256-7j+sCn+P6q6tsm2MJ/cM7hF2KEjILJNA6SDb35tecPg=";
hash = "sha256-IiVTlKtKkfZnRXme7QFA5MS8PPiL8+riOYOEoNaHHXc=";
};
nativeBuildInputs = [
@@ -36,12 +37,22 @@ buildPythonPackage rec {
rustPlatform.maturinBuildHook
];
dependencies = [
packaging
pillow
];
dontUseCmakeConfigure = true;
nativeCheckInputs = [
numpy
openexr
pyexiv2
pytestCheckHook
];
pythonImportsCheck = [ "pillow_jxl" ];
# Working directory takes precedence in the Python path. Remove
# `pillow_jxl` to prevent it from being loaded during pytest, rather than the
# built module, as it includes a `pillow_jxl.pillow_jxl.so` that is imported.
@@ -51,15 +62,6 @@ buildPythonPackage rec {
rm -r pillow_jxl
'';
dontUseCmakeConfigure = true;
pythonImportsCheck = [ "pillow_jxl" ];
dependencies = [
packaging
pillow
];
meta = {
description = "Pillow plugin for JPEG-XL, using Rust for bindings";
homepage = "https://github.com/Isotr0py/pillow-jpegxl-plugin";
+16 -8
View File
@@ -1,33 +1,41 @@
# SPDX-FileCopyrightText: (c) TagStudio Contributors
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-License-Identifier: MIT
{
autoPatchelfHook,
buildPythonPackage,
exiv2,
fetchFromGitHub,
lib,
pybind11,
python,
setuptools,
}:
buildPythonPackage rec {
pname = "pyexiv2";
version = "2.15.3";
version = "2.16.0";
pyproject = true;
src = fetchFromGitHub {
owner = "LeoHsiao1";
repo = "pyexiv2";
tag = "v${version}";
hash = "sha256-83bFMaoXncvhRJNcCgkkC7B29wR5pjuLO/EdkQdqxxo=";
hash = "sha256-FH5nbbh0vaErJzBl6L2HPh0SQXkQ558abTBml7nSLU8=";
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [ exiv2.lib ];
pythonImportsCheck = [ "pyexiv2" ];
buildInputs = [ exiv2.dev ];
build-system = [ setuptools ];
dependencies = [ pybind11 ];
postBuild = ''
lib_dir=$out/${python.sitePackages}/pyexiv2/lib
mkdir -p "$lib_dir"
cp -rT ${exiv2.lib}/lib "$lib_dir"
'';
pythonImportsCheck = [ "pyexiv2" ];
meta = {
description = "Read and write image metadata, including EXIF, IPTC, XMP, ICC Profile";
+3 -3
View File
@@ -1,5 +1,5 @@
# SPDX-FileCopyrightText: (c) TagStudio Contributors
# SPDX-License-Identifier: GPL-3.0-only
# SPDX-License-Identifier: MIT
{
lib,
@@ -21,7 +21,7 @@ let
stdenv.cc.cc
zstd
]
++ lib.optionals (!stdenv.isDarwin) [
++ lib.optionals (!stdenv.hostPlatform.isDarwin) [
dbus
libGL
libdrm
@@ -35,7 +35,7 @@ let
]
);
libraryPath = "${lib.optionalString pkgs.stdenv.isDarwin "DY"}LD_LIBRARY_PATH";
libraryPath = "${lib.optionalString pkgs.stdenv.hostPlatform.isDarwin "DY"}LD_LIBRARY_PATH";
python3Wrapped = pkgs.symlinkJoin {
inherit (python3)