From e9c060893ad966ba8803591a985cfdc10b610ffa Mon Sep 17 00:00:00 2001 From: adisbladis Date: Tue, 3 Feb 2026 14:11:12 +1300 Subject: [PATCH 001/121] direnv: Disable Cgo to build a static executable To fix segmentation faults happening because of an incompatible libc when setting `LD_LIBRARY_PATH`. This was originally reported to pyproject.nix in https://github.com/pyproject-nix/pyproject.nix/issues/405 but is a nixpkgs issue. --- pkgs/by-name/di/direnv/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/di/direnv/package.nix b/pkgs/by-name/di/direnv/package.nix index cdecb982af97..6c1a1b8ffe7f 100644 --- a/pkgs/by-name/di/direnv/package.nix +++ b/pkgs/by-name/di/direnv/package.nix @@ -25,6 +25,9 @@ buildGoModule rec { # we have no bash at the moment for windows BASH_PATH = lib.optionalString (!stdenv.hostPlatform.isWindows) "${bash}/bin/bash"; + # Build a static executable to avoid environment runtime impurities + env.CGO_ENABLED = 0; + # replace the build phase to use the GNUMakefile instead buildPhase = '' make BASH_PATH=$BASH_PATH From 5630068314c3e68badba45645fd3662973efa09b Mon Sep 17 00:00:00 2001 From: linuxissuper Date: Sat, 21 Feb 2026 13:09:14 +0100 Subject: [PATCH 002/121] lxqt-panel-profiles: 1.3 -> 1.4.1 --- pkgs/by-name/lx/lxqt-panel-profiles/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/lx/lxqt-panel-profiles/package.nix b/pkgs/by-name/lx/lxqt-panel-profiles/package.nix index 0d1e2e73693e..932bd03b5fee 100644 --- a/pkgs/by-name/lx/lxqt-panel-profiles/package.nix +++ b/pkgs/by-name/lx/lxqt-panel-profiles/package.nix @@ -13,13 +13,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "lxqt-panel-profiles"; - version = "1.3"; + version = "1.4.1"; src = fetchFromCodeberg { owner = "MrReplikant"; repo = "lxqt-panel-profiles"; rev = "v${finalAttrs.version}"; - hash = "sha256-mI/Rg3YeK64R3cCn+xz4+CHZldGteZ4Id4h/YUcreW4="; + hash = "sha256-JDDscKjRbqQXinEwlrwYNwzzuLm9aokNAu8sZY7hGQk="; }; postPatch = '' From 0d50608a2fb3180592fac024c26823206c7308ee Mon Sep 17 00:00:00 2001 From: Niclas Metschke Date: Sat, 21 Feb 2026 13:23:34 +0100 Subject: [PATCH 003/121] picotool: readd udev rules --- pkgs/by-name/pi/picotool/package.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/by-name/pi/picotool/package.nix b/pkgs/by-name/pi/picotool/package.nix index c1051c67040c..f5085d2aebb7 100644 --- a/pkgs/by-name/pi/picotool/package.nix +++ b/pkgs/by-name/pi/picotool/package.nix @@ -34,6 +34,10 @@ stdenv.mkDerivation (finalAttrs: { "-DPICO_SDK_PATH=${pico-sdk}/lib/pico-sdk" ]; + postInstall = '' + install -Dm444 ../udev/60-picotool.rules -t $out/etc/udev/rules.d + ''; + nativeInstallCheckInputs = [ versionCheckHook ]; From 6ad23776e36e1857d757a06238632ccef1b9666d Mon Sep 17 00:00:00 2001 From: Jon Erling Hustadnes Date: Mon, 10 Nov 2025 22:04:33 +0100 Subject: [PATCH 004/121] tonelib-gfx: 4.8.7 -> 4.9.0 Build now also requires `libfontconfig` Also corrects the curl command in the comment example for retrieving the latest version information. --- pkgs/by-name/to/tonelib-gfx/package.nix | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/to/tonelib-gfx/package.nix b/pkgs/by-name/to/tonelib-gfx/package.nix index 75034309006b..7993e32434ad 100644 --- a/pkgs/by-name/to/tonelib-gfx/package.nix +++ b/pkgs/by-name/to/tonelib-gfx/package.nix @@ -8,6 +8,7 @@ freetype, libglvnd, curl, + fontconfig, libxcursor, libxinerama, libxrandr, @@ -17,21 +18,21 @@ stdenv.mkDerivation rec { pname = "tonelib-gfx"; - version = "4.8.7"; + version = "4.9.0"; # It's hard to find out when a release happens and what version that release is, # without visiting the site directly. # # The following command can retrieve the latest released version. # curl --silent https://tonelib.net/downloads.html | \ - # grep -P 'ToneLib GFXToneLib GFX<' -A3 | \ # sed -nE 's/^.*Version: ([0-9.]+).*/\1/p' # # The following command gives us the URL for the latest release without intermediate redirects. # curl --head 'https://www.tonelib.net/download.php?id=gfx&os=lnx' src = fetchurl { - url = "https://tonelib.vip/download/24-10-24/ToneLib-GFX-amd64.deb"; - hash = "sha256-2ao6tTRbPMpE2Y/7/gwQN3G5Z6Uu+SQel9o1ejwD9v4="; + url = "https://tonelib.vip/download/25-11-10/ToneLib-GFX-amd64.deb"; + hash = "sha256-WL9kV50R5AGG57I5IkNz7EKd4NPlf0iO+QiE8k+E26Q="; }; nativeBuildInputs = [ @@ -49,6 +50,7 @@ stdenv.mkDerivation rec { runtimeDependencies = map lib.getLib [ curl + fontconfig libxcursor libxinerama libxrandr From 69da66f29ad4c4493f7f78b6bc5bad980effd27e Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 11 Mar 2026 11:52:01 +0100 Subject: [PATCH 005/121] ubports-click: Modernise - python3Packages.buildPythonApplication supports the finalAttrs pattern now - use tag in fetchFromGitLab - don't put comments into phases code - enable versionCheck in hasPkgConfigModules test --- pkgs/by-name/ub/ubports-click/package.nix | 239 +++++++++++----------- 1 file changed, 119 insertions(+), 120 deletions(-) diff --git a/pkgs/by-name/ub/ubports-click/package.nix b/pkgs/by-name/ub/ubports-click/package.nix index 8f46c2a2581a..b85dc331c31d 100644 --- a/pkgs/by-name/ub/ubports-click/package.nix +++ b/pkgs/by-name/ub/ubports-click/package.nix @@ -20,158 +20,157 @@ python3Packages, vala, wrapGAppsHook3, + writableTmpDirAsHomeHook, }: -let - self = python3Packages.buildPythonApplication rec { - pname = "click"; - version = "0.5.2"; - pyproject = false; +python3Packages.buildPythonApplication (finalAttrs: { + pname = "click"; + version = "0.5.2"; + pyproject = false; - src = fetchFromGitLab { - owner = "ubports"; - repo = "development/core/click"; - rev = version; - hash = "sha256-AV3n6tghvpV/6Ew6Lokf8QAGBIMbHFAnp6G4pefVn+8="; - }; + src = fetchFromGitLab { + owner = "ubports"; + repo = "development/core/click"; + tag = finalAttrs.version; + hash = "sha256-AV3n6tghvpV/6Ew6Lokf8QAGBIMbHFAnp6G4pefVn+8="; + }; - patches = [ - # Remove when version > 0.5.2 - (fetchpatch { - name = "0001-click-fix-Wimplicit-function-declaration.patch"; - url = "https://gitlab.com/ubports/development/core/click/-/commit/8f654978a12e6f9a0b6ff64296ec5565e3ff5cd0.patch"; - hash = "sha256-kio+DdtuagUNYEosyQY3q3H+dJM3cLQRW9wUKUcpUTY="; - }) + patches = [ + # Remove when version > 0.5.2 + (fetchpatch { + name = "0001-click-fix-Wimplicit-function-declaration.patch"; + url = "https://gitlab.com/ubports/development/core/click/-/commit/8f654978a12e6f9a0b6ff64296ec5565e3ff5cd0.patch"; + hash = "sha256-kio+DdtuagUNYEosyQY3q3H+dJM3cLQRW9wUKUcpUTY="; + }) - # Remove when version > 0.5.2 - (fetchpatch { - name = "0002-click-Add-uid_t-and-gid_t-to-the-ctypes-_typemap.patch"; - url = "https://gitlab.com/ubports/development/core/click/-/commit/cbcd23b08b02fa122434e1edd69c2b3dcb6a8793.patch"; - hash = "sha256-QaWRhxO61wAzULVqPLdJrLuBCr3+NhKmQlEPuYq843I="; - }) - ]; + # Remove when version > 0.5.2 + (fetchpatch { + name = "0002-click-Add-uid_t-and-gid_t-to-the-ctypes-_typemap.patch"; + url = "https://gitlab.com/ubports/development/core/click/-/commit/cbcd23b08b02fa122434e1edd69c2b3dcb6a8793.patch"; + hash = "sha256-QaWRhxO61wAzULVqPLdJrLuBCr3+NhKmQlEPuYq843I="; + }) + ]; - postPatch = '' - # These should be proper Requires, using the header needs their headers + postPatch = + # These should be proper Requires, using the header needs their headers + '' substituteInPlace lib/click/click-*.pc.in \ --replace-fail 'Requires.private' 'Requires' - - # Don't completely override PKG_CONFIG_PATH + '' + # Don't completely override PKG_CONFIG_PATH + + '' substituteInPlace click_package/tests/Makefile.am \ --replace-fail 'PKG_CONFIG_PATH=$(top_builddir)/lib/click' 'PKG_CONFIG_PATH=$(top_builddir)/lib/click:$(PKG_CONFIG_PATH)' - + '' + + '' patchShebangs bin/click ''; - strictDeps = true; + strictDeps = true; - pkgsBuildBuild = [ - pkg-config - ]; + pkgsBuildBuild = [ + pkg-config + ]; - nativeBuildInputs = [ - autoreconfHook - dbus-test-runner # Always checking for this - getopt - gobject-introspection - perl - pkg-config - vala - wrapGAppsHook3 - ]; + nativeBuildInputs = [ + autoreconfHook + dbus-test-runner # Always checking for this + getopt + gobject-introspection + perl + pkg-config + vala + wrapGAppsHook3 + ]; - buildInputs = [ - glib - json-glib - libgee - properties-cpp - ]; + buildInputs = [ + glib + json-glib + libgee + properties-cpp + ]; - propagatedBuildInputs = with python3Packages; [ - python-debian - chardet - pygobject3 - setuptools - ]; + propagatedBuildInputs = with python3Packages; [ + python-debian + chardet + pygobject3 + setuptools + ]; - nativeCheckInputs = [ - dbus - dpkg - python3Packages.unittestCheckHook - ]; + nativeCheckInputs = [ + dbus + dpkg + python3Packages.unittestCheckHook + writableTmpDirAsHomeHook + ]; - checkInputs = with python3Packages; [ - python-apt - six - ]; + checkInputs = with python3Packages; [ + python-apt + six + ]; - preConfigure = '' - export click_cv_perl_vendorlib=$out/${perl.libPrefix} - export PYTHON_INSTALL_FLAGS="--prefix=$out" - ''; + preConfigure = '' + export click_cv_perl_vendorlib=$out/${perl.libPrefix} + export PYTHON_INSTALL_FLAGS="--prefix=$out" + ''; - configureFlags = [ - "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system" - "--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user" - ]; + configureFlags = [ + "--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system" + "--with-systemduserunitdir=${placeholder "out"}/lib/systemd/user" + ]; - enableParallelBuilding = true; + enableParallelBuilding = true; - doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; + doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; - disabledTestPaths = [ - # From apt: Unable to determine a suitable packaging system type - "click_package/tests/integration/test_signatures.py" - "click_package/tests/test_build.py" - "click_package/tests/test_install.py" - "click_package/tests/test_scripts.py" - ]; + disabledTestPaths = [ + # From apt: Unable to determine a suitable packaging system type + "click_package/tests/integration/test_signatures.py" + "click_package/tests/test_build.py" + "click_package/tests/test_install.py" + "click_package/tests/test_scripts.py" + ]; - preCheck = '' - export HOME=$TMP - - # tests recompile some files for loaded predefines, doesn't use any optimisation level for it - # makes test output harder to read, so make the warning go away + preCheck = + # tests recompile some files for loaded predefines, doesn't use any optimisation level for it + # makes test output harder to read, so make the warning go away + '' export NIX_CFLAGS_COMPILE+=" -U_FORTIFY_SOURCE" - - # Haven'tbeen able to get them excluded via disabledTest{s,Paths}, just deleting them + '' + # Haven't been able to get them excluded via disabledTest{s,Paths}, just deleting them + + '' for path in $disabledTestPaths; do rm -v $path done ''; - preFixup = '' - makeWrapperArgs+=( - --prefix LD_LIBRARY_PATH : "$out/lib" - ) - ''; + preFixup = '' + makeWrapperArgs+=( + --prefix LD_LIBRARY_PATH : "$out/lib" + ) + ''; - passthru = { - updateScript = gitUpdater { }; - }; - - meta = { - description = "Tool to build click packages, mainly used for Ubuntu Touch"; - homepage = "https://gitlab.com/ubports/development/core/click"; - changelog = "https://gitlab.com/ubports/development/core/click/-/blob/${version}/ChangeLog"; - license = lib.licenses.gpl3Only; - mainProgram = "click"; - maintainers = with lib.maintainers; [ - ilyakooo0 - ]; - teams = [ lib.teams.lomiri ]; - platforms = lib.platforms.linux; - pkgConfigModules = [ - "click-0.4" - ]; - }; - }; -in -self -// { - passthru = self.passthru // { + passthru = { tests.pkg-config = testers.hasPkgConfigModules { - package = self; + package = finalAttrs.finalPackage; + versionCheck = true; }; + updateScript = gitUpdater { }; }; -} + + meta = { + description = "Tool to build click packages, mainly used for Ubuntu Touch"; + homepage = "https://gitlab.com/ubports/development/core/click"; + changelog = "https://gitlab.com/ubports/development/core/click/-/blob/${finalAttrs.version}/ChangeLog"; + license = lib.licenses.gpl3Only; + mainProgram = "click"; + maintainers = with lib.maintainers; [ + ilyakooo0 + ]; + teams = [ lib.teams.lomiri ]; + platforms = lib.platforms.linux; + pkgConfigModules = [ + "click-0.4" + ]; + }; +}) From 846dfa7c7760f8e73216f6f961ab5a773f75a68e Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Wed, 11 Mar 2026 19:10:17 +0100 Subject: [PATCH 006/121] libsignon-glib: Fix build with GCC 15 --- ...itions-usage-of-0-argument-functions.patch | 201 ++++++++++++++++++ pkgs/by-name/li/libsignon-glib/package.nix | 5 + 2 files changed, 206 insertions(+) create mode 100644 pkgs/by-name/li/libsignon-glib/1001-Clean-up-declarations-definitions-usage-of-0-argument-functions.patch diff --git a/pkgs/by-name/li/libsignon-glib/1001-Clean-up-declarations-definitions-usage-of-0-argument-functions.patch b/pkgs/by-name/li/libsignon-glib/1001-Clean-up-declarations-definitions-usage-of-0-argument-functions.patch new file mode 100644 index 000000000000..8deb7580725c --- /dev/null +++ b/pkgs/by-name/li/libsignon-glib/1001-Clean-up-declarations-definitions-usage-of-0-argument-functions.patch @@ -0,0 +1,201 @@ +From de01c862388005ad142f38a7066593fe59a56fce Mon Sep 17 00:00:00 2001 +From: OPNA2608 +Date: Wed, 11 Mar 2026 18:55:19 +0100 +Subject: [PATCH] Clean up declarations/definitions & usage of 0 argument + functions + +This project doesn't enforce a C standard to use, so the compiler's default C standard is used. +GCC 15's default C standard is C23, which has removed support for treating a function with an empty parameter list +as a function that accepts some vague amount of arguments. + +() is now treated the same as (void). This was already the intended meaning of such declarations, but +to have the same behaviour on previous C standards, let's be explicit about the void part. + +Since the amount of arguments must now be exactly 0, clean up some calls in tests/check_signon.c that +relied on the previous meaning of () and passed 2 NULLs to such functions. +--- + libsignon-glib/signon-auth-service.c | 2 +- + libsignon-glib/signon-auth-service.h | 2 +- + libsignon-glib/signon-auth-session.c | 2 +- + libsignon-glib/signon-identity-info.c | 2 +- + libsignon-glib/signon-identity-info.h | 2 +- + libsignon-glib/signon-identity.c | 4 ++-- + libsignon-glib/signon-identity.h | 2 +- + libsignon-glib/signon-proxy.c | 4 ++-- + tests/check_signon.c | 10 +++++----- + 9 files changed, 15 insertions(+), 15 deletions(-) + +diff --git a/libsignon-glib/signon-auth-service.c b/libsignon-glib/signon-auth-service.c +index 785ce05..e06de60 100644 +--- a/libsignon-glib/signon-auth-service.c ++++ b/libsignon-glib/signon-auth-service.c +@@ -138,7 +138,7 @@ _signon_auth_service_finish_query_mechanisms (GObject *source_object, + * Returns: an instance of an #SignonAuthService. + */ + SignonAuthService * +-signon_auth_service_new () ++signon_auth_service_new (void) + { + return g_object_new (SIGNON_TYPE_AUTH_SERVICE, NULL); + } +diff --git a/libsignon-glib/signon-auth-service.h b/libsignon-glib/signon-auth-service.h +index 1deb7e0..d6492ad 100644 +--- a/libsignon-glib/signon-auth-service.h ++++ b/libsignon-glib/signon-auth-service.h +@@ -34,7 +34,7 @@ G_BEGIN_DECLS + #define SIGNON_TYPE_AUTH_SERVICE signon_auth_service_get_type () + G_DECLARE_FINAL_TYPE (SignonAuthService, signon_auth_service, SIGNON, AUTH_SERVICE, GObject) + +-SignonAuthService *signon_auth_service_new (); ++SignonAuthService *signon_auth_service_new (void); + + void signon_auth_service_get_methods (SignonAuthService *auth_service, + GCancellable *cancellable, +diff --git a/libsignon-glib/signon-auth-session.c b/libsignon-glib/signon-auth-session.c +index c308017..ba1ce7d 100644 +--- a/libsignon-glib/signon-auth-session.c ++++ b/libsignon-glib/signon-auth-session.c +@@ -232,7 +232,7 @@ destroy_proxy (SignonAuthSession *self) + } + + static GQuark +-auth_session_object_quark () ++auth_session_object_quark (void) + { + static GQuark quark = 0; + +diff --git a/libsignon-glib/signon-identity-info.c b/libsignon-glib/signon-identity-info.c +index 8adfa9b..4af58c8 100644 +--- a/libsignon-glib/signon-identity-info.c ++++ b/libsignon-glib/signon-identity-info.c +@@ -277,7 +277,7 @@ signon_identity_info_to_variant (const SignonIdentityInfo *self) + * + * Returns: a new #SignonIdentityInfo item. + */ +-SignonIdentityInfo *signon_identity_info_new () ++SignonIdentityInfo *signon_identity_info_new (void) + { + SignonIdentityInfo *info = g_slice_new0 (SignonIdentityInfo); + info->methods = g_hash_table_new_full (g_str_hash, g_str_equal, +diff --git a/libsignon-glib/signon-identity-info.h b/libsignon-glib/signon-identity-info.h +index 7305f50..ed60b48 100644 +--- a/libsignon-glib/signon-identity-info.h ++++ b/libsignon-glib/signon-identity-info.h +@@ -55,7 +55,7 @@ typedef enum { + + GType signon_identity_info_get_type (void) G_GNUC_CONST; + +-SignonIdentityInfo *signon_identity_info_new (); ++SignonIdentityInfo *signon_identity_info_new (void); + void signon_identity_info_free (SignonIdentityInfo *info); + + SignonIdentityInfo *signon_identity_info_copy (const SignonIdentityInfo *other); +diff --git a/libsignon-glib/signon-identity.c b/libsignon-glib/signon-identity.c +index eb58a45..647b364 100644 +--- a/libsignon-glib/signon-identity.c ++++ b/libsignon-glib/signon-identity.c +@@ -130,7 +130,7 @@ static void identity_process_updated (SignonIdentity *self); + static void identity_process_removed (SignonIdentity *self); + + static GQuark +-identity_object_quark () ++identity_object_quark (void) + { + static GQuark quark = 0; + +@@ -576,7 +576,7 @@ signon_identity_new_from_db (guint32 id) + * Returns: an instance of an #SignonIdentity. + */ + SignonIdentity* +-signon_identity_new () ++signon_identity_new (void) + { + SignonIdentity *identity; + +diff --git a/libsignon-glib/signon-identity.h b/libsignon-glib/signon-identity.h +index f366f8a..f42a8e8 100644 +--- a/libsignon-glib/signon-identity.h ++++ b/libsignon-glib/signon-identity.h +@@ -36,7 +36,7 @@ G_BEGIN_DECLS + G_DECLARE_FINAL_TYPE (SignonIdentity, signon_identity, SIGNON, IDENTITY, GObject) + + SignonIdentity *signon_identity_new_from_db (guint32 id); +-SignonIdentity *signon_identity_new (); ++SignonIdentity *signon_identity_new (void); + + guint32 signon_identity_get_id (SignonIdentity *identity); + +diff --git a/libsignon-glib/signon-proxy.c b/libsignon-glib/signon-proxy.c +index f37d5c1..4f01443 100644 +--- a/libsignon-glib/signon-proxy.c ++++ b/libsignon-glib/signon-proxy.c +@@ -46,7 +46,7 @@ signon_proxy_default_init (SignonProxyInterface *iface) + } + + static GQuark +-_signon_proxy_ready_quark() ++_signon_proxy_ready_quark (void) + { + static GQuark quark = 0; + +@@ -57,7 +57,7 @@ _signon_proxy_ready_quark() + } + + static GQuark +-_signon_proxy_error_quark() ++_signon_proxy_error_quark (void) + { + static GQuark quark = 0; + +diff --git a/tests/check_signon.c b/tests/check_signon.c +index 3e1e758..405582e 100644 +--- a/tests/check_signon.c ++++ b/tests/check_signon.c +@@ -388,7 +388,7 @@ START_TEST(test_auth_session_creation) + const gchar *method = NULL; + + g_debug("%s", G_STRFUNC); +- SignonIdentity *idty = signon_identity_new(NULL, NULL); ++ SignonIdentity *idty = signon_identity_new(); + fail_unless (idty != NULL, "Cannot create Identity object"); + + SignonAuthSession *auth_session = signon_identity_create_session(idty, +@@ -442,7 +442,7 @@ START_TEST(test_auth_session_process_async) + gboolean ok; + + g_debug("%s", G_STRFUNC); +- SignonIdentity *idty = signon_identity_new(NULL, NULL); ++ SignonIdentity *idty = signon_identity_new(); + fail_unless (idty != NULL, "Cannot create Identity object"); + + SignonAuthSession *auth_session = signon_identity_create_session(idty, +@@ -751,7 +751,7 @@ new_identity() + GList *acl = g_list_append (NULL, signon_security_context_new_from_values ("*", "*")); + guint id = 0; + +- identity = signon_identity_new(NULL, NULL); ++ identity = signon_identity_new(); + fail_unless (SIGNON_IS_IDENTITY (identity)); + + SignonIdentityInfo *info = signon_identity_info_new (); +@@ -864,7 +864,7 @@ static void store_credentials_identity_cb (GObject *source_object, + START_TEST(test_store_credentials_identity) + { + g_debug("%s", G_STRFUNC); +- SignonIdentity *idty = signon_identity_new(NULL, NULL); ++ SignonIdentity *idty = signon_identity_new(); + fail_unless (idty != NULL); + fail_unless (SIGNON_IS_IDENTITY (idty), + "Failed to initialize the Identity."); +@@ -911,7 +911,7 @@ START_TEST(test_verify_secret_identity) + GList *acl = g_list_append (NULL, signon_security_context_new_from_values ("*", "*")); + + g_debug("%s", G_STRFUNC); +- SignonIdentity *idty = signon_identity_new(NULL, NULL); ++ SignonIdentity *idty = signon_identity_new(); + fail_unless (idty != NULL); + fail_unless (SIGNON_IS_IDENTITY (idty), + "Failed to initialize the Identity."); +-- +2.51.2 + diff --git a/pkgs/by-name/li/libsignon-glib/package.nix b/pkgs/by-name/li/libsignon-glib/package.nix index 09e981c7488a..92d0d5e03a29 100644 --- a/pkgs/by-name/li/libsignon-glib/package.nix +++ b/pkgs/by-name/li/libsignon-glib/package.nix @@ -35,6 +35,11 @@ stdenv.mkDerivation (finalAttrs: { fetchSubmodules = true; }; + patches = [ + # Remove when https://gitlab.com/accounts-sso/libsignon-glib/-/merge_requests/23 merged & in release + ./1001-Clean-up-declarations-definitions-usage-of-0-argument-functions.patch + ]; + nativeBuildInputs = [ check docbook_xml_dtd_412 From 36a560410203ca37c700b6d06851ef1825dbf819 Mon Sep 17 00:00:00 2001 From: Ahmed Khanzada Date: Thu, 12 Mar 2026 12:39:38 -0700 Subject: [PATCH 007/121] claude-code-acp: 0.16.1 -> 0.21.0, rename to claude-agent-acp --- .../package.nix | 16 ++++++++-------- pkgs/development/node-packages/aliases.nix | 1 + 2 files changed, 9 insertions(+), 8 deletions(-) rename pkgs/by-name/cl/{claude-code-acp => claude-agent-acp}/package.nix (51%) diff --git a/pkgs/by-name/cl/claude-code-acp/package.nix b/pkgs/by-name/cl/claude-agent-acp/package.nix similarity index 51% rename from pkgs/by-name/cl/claude-code-acp/package.nix rename to pkgs/by-name/cl/claude-agent-acp/package.nix index 92c4bec7ade0..d8633b21a70a 100644 --- a/pkgs/by-name/cl/claude-code-acp/package.nix +++ b/pkgs/by-name/cl/claude-agent-acp/package.nix @@ -5,23 +5,23 @@ }: buildNpmPackage (finalAttrs: { - pname = "claude-code-acp"; - version = "0.16.1"; + pname = "claude-agent-acp"; + version = "0.21.0"; src = fetchFromGitHub { owner = "zed-industries"; - repo = "claude-code-acp"; + repo = "claude-agent-acp"; tag = "v${finalAttrs.version}"; - hash = "sha256-/HeAz0jdXhLhYGcwTgthrE7cGjKjro30GQUmAn4egXs="; + hash = "sha256-6c6bHuso3diW5ZfHiM2xcxGDTNG0LIL0TZd0MFVpW/E="; }; - npmDepsHash = "sha256-poTtwIIPHcgQ2uyIUIWVOpHbdDIzVgympa7aHtuSMok="; + npmDepsHash = "sha256-UtiIcjgNCYMFrRpO5AlUbOyutJ3ipwIbcpMi2BqawEk="; meta = { - description = "ACP-compatible coding agent powered by the Claude Code SDK"; - homepage = "https://github.com/zed-industries/claude-code-acp"; + description = "ACP-compatible coding agent powered by the Claude Agent SDK"; + homepage = "https://github.com/zed-industries/claude-agent-acp"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ storopoli ]; - mainProgram = "claude-code-acp"; + mainProgram = "claude-agent-acp"; }; }) diff --git a/pkgs/development/node-packages/aliases.nix b/pkgs/development/node-packages/aliases.nix index a673be5d9ab9..6c88feb865a7 100644 --- a/pkgs/development/node-packages/aliases.nix +++ b/pkgs/development/node-packages/aliases.nix @@ -78,6 +78,7 @@ mapAliases { "@webassemblyjs/wast-refmt-1.11.1" = pkgs.wast-refmt; # Added 2025-11-06 "@withgraphite/graphite-cli" = pkgs.graphite-cli; # added 2024-01-25 "@yaegassy/coc-nginx" = pkgs.coc-nginx; # Added 2025-11-08 + "@zed-industries/claude-code-acp" = pkgs.claude-agent-acp; # Added 2026-03-12 "@zwave-js/server" = pkgs.zwave-js-server; # Added 2023-09-09 alex = throw "'alex' has been removed because it was unmaintainable in nixpkgs"; # Added 2026-02-12 audiosprite = throw "'audiosprite' has been removed because it was abandoned upstream"; # Added 2025-11-14 From 5a05e8011beafc7bd13d44c42e47e24974dbf7f2 Mon Sep 17 00:00:00 2001 From: Thierry Delafontaine Date: Mon, 23 Feb 2026 10:43:23 +0100 Subject: [PATCH 008/121] protonvpn-gui: renamed to proton-vpn --- pkgs/by-name/pr/{protonvpn-gui => proton-vpn}/package.nix | 2 +- pkgs/top-level/aliases.nix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) rename pkgs/by-name/pr/{protonvpn-gui => proton-vpn}/package.nix (98%) diff --git a/pkgs/by-name/pr/protonvpn-gui/package.nix b/pkgs/by-name/pr/proton-vpn/package.nix similarity index 98% rename from pkgs/by-name/pr/protonvpn-gui/package.nix rename to pkgs/by-name/pr/proton-vpn/package.nix index a08bcb6a5fc5..88caca842619 100644 --- a/pkgs/by-name/pr/protonvpn-gui/package.nix +++ b/pkgs/by-name/pr/proton-vpn/package.nix @@ -11,7 +11,7 @@ }: python3Packages.buildPythonApplication (finalAttrs: { - pname = "protonvpn-gui"; + pname = "proton-vpn"; version = "4.15.0"; pyproject = true; diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index 94f30f687bc0..f601175b3f6f 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1635,6 +1635,7 @@ mapAliases { protonup = throw "'protonup' has been renamed to/replaced by 'protonup-ng'"; # Converted to throw 2025-10-27 protonvpn-cli = throw "protonvpn-cli source code was removed from upstream. Use proton-vpn-cli instead."; # Added 2025-10-16 protonvpn-cli_2 = throw "protonvpn-cli_2 has been removed due to being deprecated. Use proton-vpn-cli instead."; # Added 2025-10-16 + protonvpn-gui = warnAlias "'protonvpn-gui' has been renamed to/replaced by 'proton-vpn'" proton-vpn; # Added 2026-02-23 proxmark3-rrg = throw "'proxmark3-rrg' has been renamed to/replaced by 'proxmark3'"; # Converted to throw 2025-10-27 pscid = throw "'pscid' has been removed because it was unmaintained upstream"; # Added 2025-12-12 pulp = throw "'pulp' has been removed because it was unmaintained upstream"; # Added 2025-12-12 From 4d82c9269efc8078a238913f75cd70d682ea57d5 Mon Sep 17 00:00:00 2001 From: Thierry Delafontaine Date: Mon, 23 Feb 2026 10:52:18 +0100 Subject: [PATCH 009/121] proton-vpn: init darwin version at 6.4.0 - Separated platform-specific configurations into dedicated files: - `linux.nix` for Linux-specific package declaration - `darwin.nix` for macOS-specific package declaration - `package.nix` as the main orchestrator - Added `nix-update-script` to the Linux package - Use `writableTmpDirAsHomeHook` in Linux package --- pkgs/by-name/pr/proton-vpn/darwin.nix | 46 +++++++++++ pkgs/by-name/pr/proton-vpn/linux.nix | 96 +++++++++++++++++++++++ pkgs/by-name/pr/proton-vpn/package.nix | 103 ++++--------------------- 3 files changed, 155 insertions(+), 90 deletions(-) create mode 100644 pkgs/by-name/pr/proton-vpn/darwin.nix create mode 100644 pkgs/by-name/pr/proton-vpn/linux.nix diff --git a/pkgs/by-name/pr/proton-vpn/darwin.nix b/pkgs/by-name/pr/proton-vpn/darwin.nix new file mode 100644 index 000000000000..14df551ac737 --- /dev/null +++ b/pkgs/by-name/pr/proton-vpn/darwin.nix @@ -0,0 +1,46 @@ +{ + lib, + meta, + stdenvNoCC, + _7zz, + fetchurl, + nix-update-script, +}: +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "proton-vpn"; + version = "6.4.0"; + + src = fetchurl { + url = "https://github.com/ProtonVPN/ios-mac-app/releases/download/mac%2F${finalAttrs.version}/ProtonVPN_mac_v${finalAttrs.version}.dmg"; + hash = "sha256-F5NS7NNqxNJcl7gFaqWtWxBxBbV6Btp7cyyDpegEGLQ="; + }; + + sourceRoot = "."; + + nativeBuildInputs = [ _7zz ]; + + installPhase = '' + runHook preInstall + + mkdir -p $out/Applications + cp -R ./ProtonVPN/ProtonVPN.app $out/Applications + + runHook postInstall + ''; + + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "mac/(.*)" + ]; + }; + + meta = meta // { + changelog = "https://github.com/ProtonVPN/ios-mac-app/releases/tag/mac%2F${finalAttrs.version}"; + platforms = [ + "x86_64-darwin" + "aarch64-darwin" + ]; + sourceProvenance = with lib.sourceTypes; [ binaryNativeCode ]; + }; +}) diff --git a/pkgs/by-name/pr/proton-vpn/linux.nix b/pkgs/by-name/pr/proton-vpn/linux.nix new file mode 100644 index 000000000000..2ba403bb7900 --- /dev/null +++ b/pkgs/by-name/pr/proton-vpn/linux.nix @@ -0,0 +1,96 @@ +{ + lib, + meta, + python3Packages, + fetchFromGitHub, + gobject-introspection, + libappindicator-gtk3, + libayatana-appindicator, + libnotify, + wrapGAppsHook4, + writableTmpDirAsHomeHook, + nix-update-script, + withIndicator ? true, +}: +python3Packages.buildPythonApplication (finalAttrs: { + pname = "proton-vpn"; + version = "4.15.0"; + pyproject = true; + + src = fetchFromGitHub { + owner = "ProtonVPN"; + repo = "proton-vpn-gtk-app"; + tag = "v${finalAttrs.version}"; + hash = "sha256-bKUhrbfOLVjknljwW9UPo3Ros1Ayzb+be5KTUjPnIW0="; + }; + + nativeBuildInputs = [ + # Needed for the NM namespace + gobject-introspection + wrapGAppsHook4 + ]; + + buildInputs = [ + libnotify # gir typelib is used + ] + ++ lib.optionals withIndicator [ + # Adds AppIndicator3 namespace + libappindicator-gtk3 + # Adds AyatanaAppIndicator3 namespace + libayatana-appindicator + ]; + + build-system = with python3Packages; [ + setuptools + ]; + + dependencies = with python3Packages; [ + dbus-python + packaging + proton-core + proton-keyring-linux + proton-vpn-api-core + proton-vpn-local-agent + pycairo + pygobject3 + ]; + + dontWrapGApps = true; + + preFixup = '' + makeWrapperArgs+=("''${gappsWrapperArgs[@]}") + ''; + + postInstall = '' + mkdir -p $out/share/{applications,pixmaps} + + # Fix the desktop file to correctly identify the wrapped app and show the icon during runtime + substitute ${finalAttrs.src}/rpmbuild/SOURCES/proton.vpn.app.gtk.desktop $out/share/applications/proton.vpn.app.gtk.desktop \ + --replace-fail "StartupWMClass=protonvpn-app" "StartupWMClass=.protonvpn-app-wrapped" + install -Dm 644 ${finalAttrs.src}/rpmbuild/SOURCES/proton-vpn-logo.svg $out/share/pixmaps + ''; + + preCheck = '' + export XDG_RUNTIME_DIR=$(mktemp -d) + ''; + + nativeCheckInputs = [ + writableTmpDirAsHomeHook + ] + ++ (with python3Packages; [ + pytestCheckHook + pytest-cov-stub + ]); + + disabledTestPaths = [ + # Segmentation fault during widgets tests + "tests/unit/widgets" + ]; + + passthru.updateScript = nix-update-script { }; + + meta = meta // { + platforms = lib.platforms.linux; + mainProgram = "protonvpn-app"; + }; +}) diff --git a/pkgs/by-name/pr/proton-vpn/package.nix b/pkgs/by-name/pr/proton-vpn/package.nix index 88caca842619..f469bf82ddaf 100644 --- a/pkgs/by-name/pr/proton-vpn/package.nix +++ b/pkgs/by-name/pr/proton-vpn/package.nix @@ -1,99 +1,22 @@ { lib, - python3Packages, - fetchFromGitHub, - gobject-introspection, - libappindicator-gtk3, - libayatana-appindicator, - libnotify, - wrapGAppsHook4, - withIndicator ? true, + stdenv, + callPackage, }: - -python3Packages.buildPythonApplication (finalAttrs: { - pname = "proton-vpn"; - version = "4.15.0"; - pyproject = true; - - src = fetchFromGitHub { - owner = "ProtonVPN"; - repo = "proton-vpn-gtk-app"; - tag = "v${finalAttrs.version}"; - hash = "sha256-bKUhrbfOLVjknljwW9UPo3Ros1Ayzb+be5KTUjPnIW0="; - }; - - nativeBuildInputs = [ - # Needed for the NM namespace - gobject-introspection - wrapGAppsHook4 - ]; - - buildInputs = [ - libnotify # gir typelib is used - ] - ++ lib.optionals withIndicator [ - # Adds AppIndicator3 namespace - libappindicator-gtk3 - # Adds AyatanaAppIndicator3 namespace - libayatana-appindicator - ]; - - build-system = with python3Packages; [ - setuptools - ]; - - dependencies = with python3Packages; [ - dbus-python - packaging - proton-core - proton-keyring-linux - proton-vpn-api-core - proton-vpn-local-agent - pycairo - pygobject3 - ]; - - dontWrapGApps = true; - - preFixup = '' - makeWrapperArgs+=("''${gappsWrapperArgs[@]}") - ''; - - postInstall = '' - mkdir -p $out/share/{applications,pixmaps} - - # Fix the desktop file to correctly identify the wrapped app and show the icon during runtime - substitute ${finalAttrs.src}/rpmbuild/SOURCES/proton.vpn.app.gtk.desktop $out/share/applications/proton.vpn.app.gtk.desktop \ - --replace-fail "StartupWMClass=protonvpn-app" "StartupWMClass=.protonvpn-app-wrapped" - install -Dm 644 ${finalAttrs.src}/rpmbuild/SOURCES/proton-vpn-logo.svg $out/share/pixmaps - ''; - - preCheck = '' - # Needed for Permission denied: '/homeless-shelter' - export HOME=$(mktemp -d) - export XDG_RUNTIME_DIR=$(mktemp -d) - ''; - - nativeCheckInputs = with python3Packages; [ - pytestCheckHook - pytest-cov-stub - ]; - - disabledTestPaths = [ - # Segmentation fault during widgets tests - "tests/unit/widgets" - ]; - +let meta = { - description = "Proton VPN GTK app for Linux"; - homepage = "https://github.com/ProtonVPN/proton-vpn-gtk-app"; - license = lib.licenses.gpl3Plus; - platforms = lib.platforms.linux; - mainProgram = "protonvpn-app"; + description = "Official Proton VPN client"; + homepage = "https://protonvpn.com/"; + license = lib.licenses.gpl3Only; maintainers = with lib.maintainers; [ anthonyroussel - sebtm + delafthi rapiteanu + sebtm ]; }; -}) +in +if stdenv.hostPlatform.isDarwin then + callPackage ./darwin.nix { inherit meta; } +else + callPackage ./linux.nix { inherit meta; } From 7da3712a502e66af12429235adc5f19e262a7ba0 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 14 Mar 2026 14:58:24 +0100 Subject: [PATCH 010/121] persistent-cache-cpp: 1.0.9 -> 1.0.10 --- .../pe/persistent-cache-cpp/package.nix | 21 +++++++------------ 1 file changed, 7 insertions(+), 14 deletions(-) diff --git a/pkgs/by-name/pe/persistent-cache-cpp/package.nix b/pkgs/by-name/pe/persistent-cache-cpp/package.nix index e3651b102035..984ea950eb39 100644 --- a/pkgs/by-name/pe/persistent-cache-cpp/package.nix +++ b/pkgs/by-name/pe/persistent-cache-cpp/package.nix @@ -2,7 +2,6 @@ stdenv, lib, fetchFromGitLab, - fetchpatch, gitUpdater, testers, boost, @@ -18,13 +17,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "persistent-cache-cpp"; - version = "1.0.9"; + version = "1.0.10"; src = fetchFromGitLab { owner = "ubports"; repo = "development/core/lib-cpp/persistent-cache-cpp"; - rev = finalAttrs.version; - hash = "sha256-1ETr4b0HEJIM6a4ObtKWtxn0y4gQy9fzBjE4QhMPGqU="; + tag = finalAttrs.version; + hash = "sha256-siZb9D6ZGdKjlxJEgguPi9ZemWS0zY/7RwafWY6u67I="; }; outputs = [ @@ -33,15 +32,6 @@ stdenv.mkDerivation (finalAttrs: { "doc" ]; - patches = [ - # Remove when version > 1.0.9 - (fetchpatch { - name = "0001-persistent-cache-cpp-Fix-compatibility-with-Boost-1.89.patch"; - url = "https://gitlab.com/ubports/development/core/lib-cpp/persistent-cache-cpp/-/commit/121397b58bdb2d6750a41bec0cf1676e4e9b8cf5.patch"; - hash = "sha256-QKPf5E49NNZ+rzCCknJNQjcd/bEgHuh23RBM892Xz1o="; - }) - ]; - postPatch = '' # Wrong concatenation substituteInPlace data/libpersistent-cache-cpp.pc.in \ @@ -86,7 +76,10 @@ stdenv.mkDerivation (finalAttrs: { doCheck = stdenv.buildPlatform.canExecute stdenv.hostPlatform; passthru = { - tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + tests.pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + versionCheck = true; + }; updateScript = gitUpdater { }; }; From c6ccef5d87b05a8cf4231d273a4111481d628f01 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sat, 14 Mar 2026 16:18:29 +0100 Subject: [PATCH 011/121] box64: Set allowedVersions for passthru.updateScript Proper box64 releases so far all end in a dot followed by an even digit. Recent non-release tags have an uneven digit followed by a dash and a second digit. Set allowedVersions argument to gitUpdater to only the former are considered for updates. --- pkgs/applications/emulators/box64/default.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/applications/emulators/box64/default.nix b/pkgs/applications/emulators/box64/default.nix index 35f9ffba24fc..683dbf2567cf 100644 --- a/pkgs/applications/emulators/box64/default.nix +++ b/pkgs/applications/emulators/box64/default.nix @@ -88,7 +88,10 @@ stdenv.mkDerivation (finalAttrs: { ''; passthru = { - updateScript = gitUpdater { rev-prefix = "v"; }; + updateScript = gitUpdater { + rev-prefix = "v"; + allowedVersions = "\\.[02468]$"; + }; tests.hello = runCommand "box64-test-hello" { nativeBuildInputs = [ finalAttrs.finalPackage ]; } '' BOX64_LOG=1 box64 ${lib.getExe hello-x86_64} --version 2>&1 | tee $out ''; From 801b53e830459a674920ce07850564e90cdf4795 Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 19:38:24 +0100 Subject: [PATCH 012/121] clairvoyant: 3.1.10 -> 3.1.12 --- pkgs/by-name/cl/clairvoyant/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/cl/clairvoyant/package.nix b/pkgs/by-name/cl/clairvoyant/package.nix index 5b77c89e452c..4a1f59df74fb 100644 --- a/pkgs/by-name/cl/clairvoyant/package.nix +++ b/pkgs/by-name/cl/clairvoyant/package.nix @@ -15,13 +15,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "clairvoyant"; - version = "3.1.10"; + version = "3.1.12"; src = fetchFromGitHub { owner = "cassidyjames"; repo = "clairvoyant"; rev = finalAttrs.version; - hash = "sha256-CSORiNPqzliIpslV28NRPs/+bc9iblsLTPOm1WxxTjc="; + hash = "sha256-3TdtSa8RQkeUvw+oesHruyy7S/WnsX7FXWnDLowbEkg="; }; nativeBuildInputs = [ @@ -47,7 +47,7 @@ stdenv.mkDerivation (finalAttrs: { description = "Ask questions, get psychic answers"; homepage = "https://github.com/cassidyjames/clairvoyant"; license = lib.licenses.gpl3Plus; - mainProgram = "com.github.cassidyjames.clairvoyant"; + mainProgram = "com.cassidyjames.clairvoyant"; teams = [ lib.teams.gnome-circle ]; }; }) From cd366c7dfec135de203ee33fb718c9eff412c595 Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 19:52:51 +0100 Subject: [PATCH 013/121] commit: 4.4 -> 4.5 --- pkgs/by-name/co/commit/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/co/commit/package.nix b/pkgs/by-name/co/commit/package.nix index 19e68775bf79..093b16de4b0c 100644 --- a/pkgs/by-name/co/commit/package.nix +++ b/pkgs/by-name/co/commit/package.nix @@ -21,13 +21,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "commit"; - version = "4.4"; + version = "4.5"; src = fetchFromGitHub { owner = "sonnyp"; repo = "Commit"; tag = "v${finalAttrs.version}"; - hash = "sha256-ACgt1xZTiHYiCTUvfQ+KP5TYm8tMimGizK1dn9UXzao="; + hash = "sha256-PyxByqvTK/B5Kr+uRZTZxsHcfhLqAjZrJ0/hW7m8zVQ="; fetchSubmodules = true; }; From 0bd1dea6064da9936f9148a3575f6fe9e8db8d08 Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 19:54:31 +0100 Subject: [PATCH 014/121] curtail: 1.15.0 -> 1.15.1 --- pkgs/by-name/cu/curtail/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/cu/curtail/package.nix b/pkgs/by-name/cu/curtail/package.nix index 2e021ff32fef..d00d1bae75fa 100644 --- a/pkgs/by-name/cu/curtail/package.nix +++ b/pkgs/by-name/cu/curtail/package.nix @@ -22,14 +22,14 @@ python3.pkgs.buildPythonApplication (finalAttrs: { pname = "curtail"; - version = "1.15.0"; + version = "1.15.1"; pyproject = false; src = fetchFromGitHub { owner = "Huluti"; repo = "Curtail"; tag = finalAttrs.version; - hash = "sha256-1X3isnhl5Lw+iVLM2WdZEaKphLiikBtg5QlSxgQHqy8="; + hash = "sha256-NPLixVrlM8i+AWcQ/poYGfBn0t8HOTUTryJf3VXy3lM="; }; nativeBuildInputs = [ From bbba12295a9975d8fc441e920e3121d66168cae6 Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 19:58:52 +0100 Subject: [PATCH 015/121] elastic: 0.1.9 -> 1.0.1 --- pkgs/by-name/el/elastic/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/el/elastic/package.nix b/pkgs/by-name/el/elastic/package.nix index d11ea67fb7f7..17f81a1f5530 100644 --- a/pkgs/by-name/el/elastic/package.nix +++ b/pkgs/by-name/el/elastic/package.nix @@ -19,14 +19,14 @@ stdenv.mkDerivation (finalAttrs: { pname = "elastic"; - version = "0.1.9"; + version = "1.0.1"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "World"; repo = "elastic"; rev = finalAttrs.version; - hash = "sha256-jK9RcZ5U1Dwkpu1mlfq/l4347eRCd3Y/KDYYIIkGytk="; + hash = "sha256-ydRKkVYQ1f6Jlymej1Wzoppo6E0FEUvIfrfnDqLRcPY="; }; nativeBuildInputs = [ From 9623891402dbf9c609d814edf9bd6cc2c4078908 Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:05:12 +0100 Subject: [PATCH 016/121] exercise-timer: 1.8.5 -> 1.9.1 --- pkgs/by-name/ex/exercise-timer/package.nix | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/pkgs/by-name/ex/exercise-timer/package.nix b/pkgs/by-name/ex/exercise-timer/package.nix index b5156a0b2c68..d7068ec8d015 100644 --- a/pkgs/by-name/ex/exercise-timer/package.nix +++ b/pkgs/by-name/ex/exercise-timer/package.nix @@ -3,9 +3,11 @@ stdenv, alsa-lib, appstream-glib, + blueprint-compiler, cargo, desktop-file-utils, fetchFromGitHub, + json-glib, glib, gtk4, libadwaita, @@ -16,27 +18,24 @@ rustPlatform, rustc, wrapGAppsHook4, + vala, }: stdenv.mkDerivation (finalAttrs: { pname = "exercise-timer"; - version = "1.8.5"; + version = "1.9.1"; src = fetchFromGitHub { owner = "mfep"; repo = "exercise-timer"; tag = "v${finalAttrs.version}"; - hash = "sha256-yparZ9XmHkjwvgpnERpi8hvRXdb8R+kAyFOFl+exXb4="; + hash = "sha256-81bGX5Oa5z5AbtYDzPcSyFsz0/zWcDw/Ky9n+EfnZNo="; fetchLFS = true; }; - cargoDeps = rustPlatform.fetchCargoVendor { - inherit (finalAttrs) pname version src; - hash = "sha256-JObzeiQHEGIDjOung3o8dpaXVcOoJS2v1hyrcS1fqcI="; - }; - nativeBuildInputs = [ appstream-glib + blueprint-compiler cargo desktop-file-utils glib @@ -44,13 +43,14 @@ stdenv.mkDerivation (finalAttrs: { meson ninja pkg-config - rustPlatform.cargoSetupHook rustc wrapGAppsHook4 + vala ]; buildInputs = [ alsa-lib + json-glib libadwaita ]; From 4d8d526c987f3dc66b62572fd6b53aedff413360 Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:09:17 +0100 Subject: [PATCH 017/121] gnome-decoder: 0.8.0 -> 0.8.1 --- pkgs/by-name/gn/gnome-decoder/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/gn/gnome-decoder/package.nix b/pkgs/by-name/gn/gnome-decoder/package.nix index 1ccbacb57595..9780797015d2 100644 --- a/pkgs/by-name/gn/gnome-decoder/package.nix +++ b/pkgs/by-name/gn/gnome-decoder/package.nix @@ -23,14 +23,14 @@ stdenv.mkDerivation (finalAttrs: { pname = "gnome-decoder"; - version = "0.8.0"; + version = "0.8.1"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "World"; repo = "decoder"; tag = finalAttrs.version; - hash = "sha256-O+DXfR9nZ0iz9IX/SZVX6ESI/vRa4ErEPxdgqSyOye0="; + hash = "sha256-g3ztQ+wiCDY19bc2/IABzXGSQrZltQgrTZ7rSI0RyFs="; }; cargoDeps = rustPlatform.fetchCargoVendor { From 34f04df716b2894fb8cb15f4bebc1e24bb484dab Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:10:43 +0100 Subject: [PATCH 018/121] gnome-graphs: 1.8.4 -> 1.8.7 --- pkgs/by-name/gn/gnome-graphs/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/gn/gnome-graphs/package.nix b/pkgs/by-name/gn/gnome-graphs/package.nix index 287f372adb9b..571ab0e8642f 100644 --- a/pkgs/by-name/gn/gnome-graphs/package.nix +++ b/pkgs/by-name/gn/gnome-graphs/package.nix @@ -19,7 +19,7 @@ python3Packages.buildPythonApplication (finalAttrs: { pname = "gnome-graphs"; - version = "1.8.4"; + version = "1.8.7"; pyproject = false; src = fetchFromGitLab { @@ -27,7 +27,7 @@ python3Packages.buildPythonApplication (finalAttrs: { owner = "World"; repo = "Graphs"; rev = "v${finalAttrs.version}"; - hash = "sha256-up4Hv2gndekDQzEnf7kkskDyRGJ/mqEji7dsuLgnUVI="; + hash = "sha256-nMcpsYW8/WdCKmHnsObAWhDeo7+1vqBGTTXteh6jBus="; }; nativeBuildInputs = [ From e1c8a65c0304d83d3914451d44ec764f4713c3dc Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:12:46 +0100 Subject: [PATCH 019/121] gnome-secrets: 12.0 -> 12.3 --- pkgs/by-name/gn/gnome-secrets/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/gn/gnome-secrets/package.nix b/pkgs/by-name/gn/gnome-secrets/package.nix index 99d5586c3965..09630455f5fd 100644 --- a/pkgs/by-name/gn/gnome-secrets/package.nix +++ b/pkgs/by-name/gn/gnome-secrets/package.nix @@ -23,7 +23,7 @@ python3Packages.buildPythonApplication (finalAttrs: { pname = "gnome-secrets"; - version = "12.0"; + version = "12.3"; pyproject = false; src = fetchFromGitLab { @@ -31,7 +31,7 @@ python3Packages.buildPythonApplication (finalAttrs: { owner = "World"; repo = "secrets"; tag = finalAttrs.version; - hash = "sha256-U+ez/rhaXROcLdXhFY992YzIRBCkR05hxkAYbWIpa/A="; + hash = "sha256-ypkzswfX/qdVtMja2oky8Gein2BO1gzDvjbtcd3Javc="; }; postPatch = '' From 098713dbc3ef4959580027d7cbbe4d47ae1ad4c9 Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:22:31 +0100 Subject: [PATCH 020/121] identity: 25.03 -> 25.10.1 --- pkgs/by-name/id/identity/package.nix | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/id/identity/package.nix b/pkgs/by-name/id/identity/package.nix index 543c906f90ec..761d26f02dec 100644 --- a/pkgs/by-name/id/identity/package.nix +++ b/pkgs/by-name/id/identity/package.nix @@ -12,6 +12,7 @@ gtk4, lcms, libadwaita, + libglycin-gtk4, libseccomp, libwebp, meson, @@ -26,19 +27,19 @@ stdenv.mkDerivation (finalAttrs: { pname = "identity"; - version = "25.03"; + version = "25.10.1"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "YaLTeR"; repo = "identity"; tag = "v${finalAttrs.version}"; - hash = "sha256-JZyhT220ARZ2rX0CZYeFkHx8i9ops7TcfGje0NKebnU="; + hash = "sha256-ThccOze4BkqAprk1Yt+Ughts0DFbBwLDYd4iE8ZMwxo="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit (finalAttrs) pname version src; - hash = "sha256-RCSTxtHXkLsH8smGp2XzQeV9SSpLx5llrFg3cgIsWKY="; + hash = "sha256-Do+20wh9F8xE+fA9Sg+8uyRojOF7Ih4taL/pZszU6xc="; }; strictDeps = true; @@ -69,6 +70,7 @@ stdenv.mkDerivation (finalAttrs: { gtk4 lcms libadwaita + libglycin-gtk4 libseccomp libwebp ]; From 51ce18311212689ab49ad793894d2ee962e6d43e Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:24:31 +0100 Subject: [PATCH 021/121] iotas: 0.12.5 -> 0.12.7 --- pkgs/by-name/io/iotas/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/io/iotas/package.nix b/pkgs/by-name/io/iotas/package.nix index 3ab60dd002c2..15f4e81d3f8b 100644 --- a/pkgs/by-name/io/iotas/package.nix +++ b/pkgs/by-name/io/iotas/package.nix @@ -20,7 +20,7 @@ python3.pkgs.buildPythonApplication (finalAttrs: { pname = "iotas"; - version = "0.12.5"; + version = "0.12.7"; pyproject = false; src = fetchFromGitLab { @@ -28,7 +28,7 @@ python3.pkgs.buildPythonApplication (finalAttrs: { owner = "World"; repo = "iotas"; tag = finalAttrs.version; - hash = "sha256-qbUI2hkW3rRiiBWFADuB9KFMf6Maw+WAkdy6dTE+Yo0="; + hash = "sha256-LA00Szhjk/tzGnzDGm65SCgH6l2fk+8+p4PhIpB7T1I="; }; nativeBuildInputs = [ From 795598af7cb3f338d3d635ca0fab8b4eec9596da Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:27:10 +0100 Subject: [PATCH 022/121] junction: 1.9 -> 1.12 --- pkgs/by-name/ju/junction/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ju/junction/package.nix b/pkgs/by-name/ju/junction/package.nix index e6184d85a8a4..c6e995abf3f9 100644 --- a/pkgs/by-name/ju/junction/package.nix +++ b/pkgs/by-name/ju/junction/package.nix @@ -19,13 +19,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "junction"; - version = "1.9"; + version = "1.12"; src = fetchFromGitHub { owner = "sonnyp"; repo = "junction"; tag = "v${finalAttrs.version}"; - hash = "sha256-gnFig8C46x73gAUl9VVx3Y3hrhEVeP/DvaYHYuv9RTg="; + hash = "sha256-sl/NeElAp/SWHp0BdXycrZYCgm4I4MFx/uHnQf78H8g="; fetchSubmodules = true; }; From 6fd8510460f67daa1feabd5d52f89dbfb5a41363 Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:30:05 +0100 Subject: [PATCH 023/121] komikku: 1.103.0 -> 1.105.0 --- pkgs/by-name/ko/komikku/package.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ko/komikku/package.nix b/pkgs/by-name/ko/komikku/package.nix index 3a101293ac5c..58d41211f771 100644 --- a/pkgs/by-name/ko/komikku/package.nix +++ b/pkgs/by-name/ko/komikku/package.nix @@ -24,14 +24,14 @@ python3.pkgs.buildPythonApplication (finalAttrs: { pname = "komikku"; - version = "1.103.0"; + version = "1.105.0"; pyproject = false; src = fetchFromCodeberg { owner = "valos"; repo = "Komikku"; tag = "v${finalAttrs.version}"; - hash = "sha256-1RYuaVIdiADAmbzXG8vi1eNoDh8yBL3aVfBsMiGd3h4="; + hash = "sha256-Zd+YUFnklu6JbytT/oS8hUU+IcqMfF4f/u6OKmg8uT4="; }; nativeBuildInputs = [ @@ -62,6 +62,7 @@ python3.pkgs.buildPythonApplication (finalAttrs: { dateparser ebooklib emoji + jxlpy keyring lxml natsort From fe0d85dce10c7ad87b7bf2b9900ea5ea16e76538 Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:34:36 +0100 Subject: [PATCH 024/121] lorem: 1.5 -> 1.6 --- pkgs/by-name/lo/lorem/package.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/lo/lorem/package.nix b/pkgs/by-name/lo/lorem/package.nix index 0b8c024946a0..7cf2df260b31 100644 --- a/pkgs/by-name/lo/lorem/package.nix +++ b/pkgs/by-name/lo/lorem/package.nix @@ -18,11 +18,12 @@ stdenv.mkDerivation (finalAttrs: { pname = "lorem"; - version = "1.5"; + version = "1.6"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; - owner = "World/design"; + group = "World"; + owner = "design"; repo = "lorem"; rev = finalAttrs.version; hash = "sha256-q6gpxxNebf2G/lT5wWXT/lVp3zR8QLWB8/sdK+wLTJ8="; From 75e92bc553fc223c77cd973d9eee1e104f9ce61d Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:45:48 +0100 Subject: [PATCH 025/121] shortwave: 5.0.0 -> 5.1.0 --- pkgs/by-name/sh/shortwave/package.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/sh/shortwave/package.nix b/pkgs/by-name/sh/shortwave/package.nix index bb04da0af671..95df5b9cac5f 100644 --- a/pkgs/by-name/sh/shortwave/package.nix +++ b/pkgs/by-name/sh/shortwave/package.nix @@ -20,27 +20,29 @@ rustc, sqlite, wrapGAppsHook4, + libglycin-gtk4, libshumate, libseccomp, + libxml2, lcms2, nix-update-script, }: stdenv.mkDerivation rec { pname = "shortwave"; - version = "5.0.0"; + version = "5.1.0"; src = fetchFromGitLab { domain = "gitlab.gnome.org"; owner = "World"; repo = "Shortwave"; rev = version; - sha256 = "sha256-MbkfbpX2av/o+wC1pORHfaLXnchEIFmhQ5mqPuMElak="; + hash = "sha256-MiaozChp5QF/Q0fCTCgnyGJLyIftTkMAbmfRQ/73QP8="; }; cargoDeps = rustPlatform.fetchCargoVendor { inherit pname version src; - hash = "sha256-DBWg9Xss1ChbPyI3MiN7eTXhSUG37ZaYS/HFxou9d/w="; + hash = "sha256-v6aphHunZrXPiuKRFT+EcWJySmQOOT433ST+m8j1z4w="; }; nativeBuildInputs = [ @@ -63,10 +65,12 @@ stdenv.mkDerivation rec { glib gtk4 libadwaita + libglycin-gtk4 openssl sqlite libshumate libseccomp + libxml2 lcms2 ] ++ (with gst_all_1; [ From 364e901ad30561e0190dfc8b9e082e8098d4aa68 Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:53:33 +0100 Subject: [PATCH 026/121] switcheroo: 2.2.0 -> 2.5.2 --- pkgs/by-name/sw/switcheroo/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/sw/switcheroo/package.nix b/pkgs/by-name/sw/switcheroo/package.nix index cb6199997e44..6b46d92f1335 100644 --- a/pkgs/by-name/sw/switcheroo/package.nix +++ b/pkgs/by-name/sw/switcheroo/package.nix @@ -20,19 +20,19 @@ stdenv.mkDerivation (finalAttrs: { pname = "switcheroo"; - version = "2.2.0"; + version = "2.5.2"; src = fetchFromGitLab { owner = "adhami3310"; repo = "Switcheroo"; rev = "v${finalAttrs.version}"; - hash = "sha256-AwecOA8HWGimhQyCEG3Z3hhwa9RVWssykUXsdvqqs9U="; + hash = "sha256-1SMFkzSH8ekJeP0VOPKxkvUNMh/wRzj31PIy6h051Ng="; }; cargoDeps = rustPlatform.fetchCargoVendor { src = finalAttrs.src; name = "switcheroo-${finalAttrs.version}"; - hash = "sha256-Ose1gx6vwKZCdtMDkyM9Y+f6wt7VDKTI3Wc7kep1428="; + hash = "sha256-QHdzLlmYCktQCUGZhIcuPhmR4rMUDeneptTdyPrwh1E="; }; nativeBuildInputs = [ From 571c4024fbc2ee5416203b37cb0bb1ee58e66e0f Mon Sep 17 00:00:00 2001 From: Hythera <87016780+Hythera@users.noreply.github.com> Date: Sat, 14 Mar 2026 20:54:37 +0100 Subject: [PATCH 027/121] tangram: 3.4 -> 3.5 --- pkgs/by-name/ta/tangram/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ta/tangram/package.nix b/pkgs/by-name/ta/tangram/package.nix index cf96275228dd..a77cfd890dc8 100644 --- a/pkgs/by-name/ta/tangram/package.nix +++ b/pkgs/by-name/ta/tangram/package.nix @@ -27,13 +27,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "tangram"; - version = "3.4"; + version = "3.5"; src = fetchFromGitHub { owner = "sonnyp"; repo = "Tangram"; tag = "v${finalAttrs.version}"; - hash = "sha256-NTTunlWeS44iUxrfvjwB4NBbYjojVP2SxLDvh+aXvOA="; + hash = "sha256-aK/oavYQJJYQaQ+PjxSDjSSvEaYz3G8aGXLdumOEXgk="; fetchSubmodules = true; }; From d22d34bfec4b2c43ec71f400bda1c570f0130a87 Mon Sep 17 00:00:00 2001 From: kyehn Date: Sun, 15 Mar 2026 02:13:36 +0000 Subject: [PATCH 028/121] windsend: 1.6.0 -> 1.7.0 --- pkgs/by-name/wi/windsend/git-hashes.json | 5 +- pkgs/by-name/wi/windsend/package.nix | 43 +- pkgs/by-name/wi/windsend/pubspec.lock.json | 479 +++++++++++++++--- .../sqlite3/default.nix | 14 +- 4 files changed, 457 insertions(+), 84 deletions(-) diff --git a/pkgs/by-name/wi/windsend/git-hashes.json b/pkgs/by-name/wi/windsend/git-hashes.json index aaf02669f3f5..7958d53bc189 100644 --- a/pkgs/by-name/wi/windsend/git-hashes.json +++ b/pkgs/by-name/wi/windsend/git-hashes.json @@ -1,4 +1,5 @@ { - "media_scanner": "sha256-vlHsSmw0/bVDSwB/jwdj/flfcizDjYKHOItOb/jWQGM=", - "open_filex": "sha256-dKLOmk+C9Rzw0wq18I5hkR2T4VcdmT4coimmgF+GzV8=" + "media_scanner": "sha256-FD8sYQpL5/fe1MyYUEyOSe9Wxh7RN5Z8xcaIAh3lxK4=", + "open_filex": "sha256-dKLOmk+C9Rzw0wq18I5hkR2T4VcdmT4coimmgF+GzV8=", + "share_handler": "sha256-iLYzYkc82kU0+a97r3neUNDfVYW+0GhYbT9HtBwBEOE=" } diff --git a/pkgs/by-name/wi/windsend/package.nix b/pkgs/by-name/wi/windsend/package.nix index dc8ba2e404a9..252f66d150b8 100644 --- a/pkgs/by-name/wi/windsend/package.nix +++ b/pkgs/by-name/wi/windsend/package.nix @@ -1,29 +1,56 @@ { lib, - flutter338, + flutter341, fetchFromGitHub, + cmake, copyDesktopItems, makeDesktopItem, + libx11, + libxcursor, + libxinerama, + libxi, + libxext, + libxrandr, + libxtst, + sqlite, }: -flutter338.buildFlutterApplication rec { +flutter341.buildFlutterApplication (finalAttrs: { pname = "windsend"; - version = "1.6.0"; + version = "1.7.0"; src = fetchFromGitHub { owner = "doraemonkeys"; repo = "WindSend"; - tag = "v${version}"; - hash = "sha256-KCtYV7z+QqufXiHzuEoX8XVIPfNPBdp0F1FLiPq+PDM="; + tag = "v${finalAttrs.version}"; + hash = "sha256-zpbCtiGPjGLkcZ98uN0y0modMnhucV4g4Sc9P6cRPIw="; }; pubspecLock = lib.importJSON ./pubspec.lock.json; gitHashes = lib.importJSON ./git-hashes.json; - sourceRoot = "${src.name}/flutter/wind_send"; + sourceRoot = "${finalAttrs.src.name}/flutter/wind_send"; - nativeBuildInputs = [ copyDesktopItems ]; + nativeBuildInputs = [ + cmake + copyDesktopItems + ]; + + buildInputs = [ + libx11 + libxcursor + libxrandr + libxinerama + libxi + libxext + libxtst + sqlite + ]; + + dontUseCmakeConfigure = true; + + env.NIX_CFLAGS_COMPILE = "-Wno-error=unused-result"; desktopItems = [ (makeDesktopItem { @@ -48,4 +75,4 @@ flutter338.buildFlutterApplication rec { maintainers = [ ]; platforms = lib.platforms.linux; }; -} +}) diff --git a/pkgs/by-name/wi/windsend/pubspec.lock.json b/pkgs/by-name/wi/windsend/pubspec.lock.json index 5b36d25e5766..2a4d889a40c5 100644 --- a/pkgs/by-name/wi/windsend/pubspec.lock.json +++ b/pkgs/by-name/wi/windsend/pubspec.lock.json @@ -4,11 +4,11 @@ "dependency": "transitive", "description": { "name": "_fe_analyzer_shared", - "sha256": "c209688d9f5a5f26b2fb47a188131a6fb9e876ae9e47af3737c0b4f58a93470d", + "sha256": "8d7ff3948166b8ec5da0fbb5962000926b8e02f2ed9b3e51d1738905fbd4c98d", "url": "https://pub.dev" }, "source": "hosted", - "version": "91.0.0" + "version": "93.0.0" }, "accessing_security_scoped_resource": { "dependency": "transitive", @@ -24,21 +24,21 @@ "dependency": "transitive", "description": { "name": "analyzer", - "sha256": "f51c8499b35f9b26820cfe914828a6a98a94efd5cc78b37bb7d03debae3a1d08", + "sha256": "de7148ed2fcec579b19f122c1800933dfa028f6d9fd38a152b04b1516cec120b", "url": "https://pub.dev" }, "source": "hosted", - "version": "8.4.1" + "version": "10.0.1" }, "archive": { "dependency": "transitive", "description": { "name": "archive", - "sha256": "2fde1607386ab523f7a36bb3e7edb43bd58e6edaf2ffb29d8a6d578b297fdbbd", + "sha256": "a96e8b390886ee8abb49b7bd3ac8df6f451c621619f52a26e815fdcf568959ff", "url": "https://pub.dev" }, "source": "hosted", - "version": "4.0.7" + "version": "4.0.9" }, "args": { "dependency": "transitive", @@ -80,16 +80,96 @@ "source": "hosted", "version": "2.1.2" }, + "build": { + "dependency": "transitive", + "description": { + "name": "build", + "sha256": "275bf6bb2a00a9852c28d4e0b410da1d833a734d57d39d44f94bfc895a484ec3", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.0.4" + }, + "build_config": { + "dependency": "transitive", + "description": { + "name": "build_config", + "sha256": "4070d2a59f8eec34c97c86ceb44403834899075f66e8a9d59706f8e7834f6f71", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.3.0" + }, + "build_daemon": { + "dependency": "transitive", + "description": { + "name": "build_daemon", + "sha256": "bf05f6e12cfea92d3c09308d7bcdab1906cd8a179b023269eed00c071004b957", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.1.1" + }, + "build_runner": { + "dependency": "direct dev", + "description": { + "name": "build_runner", + "sha256": "7981eb922842c77033026eb4341d5af651562008cdb116bdfa31fc46516b6462", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.12.2" + }, + "built_collection": { + "dependency": "transitive", + "description": { + "name": "built_collection", + "sha256": "376e3dd27b51ea877c28d525560790aee2e6fbb5f20e2f85d5081027d94e2100", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "5.1.1" + }, + "built_value": { + "dependency": "transitive", + "description": { + "name": "built_value", + "sha256": "6ae8a6435a8c6520c7077b107e77f1fb4ba7009633259a4d49a8afd8e7efc5e9", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "8.12.4" + }, "characters": { "dependency": "transitive", "description": { "name": "characters", - "sha256": "f71061c654a3380576a52b451dd5532377954cf9dbd272a78fc8479606670803", + "sha256": "faf38497bda5ead2a8c7615f4f7939df04333478bf32e4173fcb06d428b5716b", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.4.1" + }, + "charcode": { + "dependency": "transitive", + "description": { + "name": "charcode", + "sha256": "fb0f1107cac15a5ea6ef0a6ef71a807b9e4267c713bb93e00e92d737cc8dbd8a", "url": "https://pub.dev" }, "source": "hosted", "version": "1.4.0" }, + "checked_yaml": { + "dependency": "transitive", + "description": { + "name": "checked_yaml", + "sha256": "959525d3162f249993882720d52b7e0c833978df229be20702b33d48d91de70f", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.0.4" + }, "cli_config": { "dependency": "transitive", "description": { @@ -100,6 +180,26 @@ "source": "hosted", "version": "0.2.0" }, + "cli_util": { + "dependency": "transitive", + "description": { + "name": "cli_util", + "sha256": "ff6785f7e9e3c38ac98b2fb035701789de90154024a75b6cb926445e83197d1c", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.4.2" + }, + "clipshare_clipboard_listener": { + "dependency": "direct main", + "description": { + "name": "clipshare_clipboard_listener", + "sha256": "0f4927b147846a19616e7c8289c1e86fd383ee78c52a0d15ddb4ff0971ea400b", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.2.10" + }, "clock": { "dependency": "transitive", "description": { @@ -110,6 +210,26 @@ "source": "hosted", "version": "1.1.2" }, + "code_assets": { + "dependency": "transitive", + "description": { + "name": "code_assets", + "sha256": "83ccdaa064c980b5596c35dd64a8d3ecc68620174ab9b90b6343b753aa721687", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.0.0" + }, + "code_builder": { + "dependency": "transitive", + "description": { + "name": "code_builder", + "sha256": "6a6cab2ba4680d6423f34a9b972a4c9a94ebe1b62ecec4e1a1f2cba91fd1319d", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.11.1" + }, "collection": { "dependency": "direct main", "description": { @@ -134,11 +254,11 @@ "dependency": "direct main", "description": { "name": "cookie_jar", - "sha256": "a6ac027d3ed6ed756bfce8f3ff60cb479e266f3b0fdabd6242b804b6765e52de", + "sha256": "963da02c1ef64cb5ac20de948c9e5940aa351f1e34a12b1d327c83d85b7e8fff", "url": "https://pub.dev" }, "source": "hosted", - "version": "4.0.8" + "version": "4.0.9" }, "coverage": { "dependency": "transitive", @@ -154,11 +274,11 @@ "dependency": "transitive", "description": { "name": "cross_file", - "sha256": "701dcfc06da0882883a2657c445103380e53e647060ad8d9dfb710c100996608", + "sha256": "28bb3ae56f117b5aec029d702a90f57d285cd975c3c5c281eaca38dbc47c5937", "url": "https://pub.dev" }, "source": "hosted", - "version": "0.3.5+1" + "version": "0.3.5+2" }, "crypto": { "dependency": "direct main", @@ -210,15 +330,25 @@ "source": "hosted", "version": "4.0.1" }, + "dart_style": { + "dependency": "transitive", + "description": { + "name": "dart_style", + "sha256": "29f7ecc274a86d32920b1d9cfc7502fa87220da41ec60b55f329559d5732e2b2", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.1.7" + }, "dbus": { "dependency": "transitive", "description": { "name": "dbus", - "sha256": "79e0c23480ff85dc68de79e2cd6334add97e48f7f4865d17686dd6ea81a47e8c", + "sha256": "d0c98dcd4f5169878b6cf8f6e0a52403a9dff371a3e2f019697accbf6f44a270", "url": "https://pub.dev" }, "source": "hosted", - "version": "0.7.11" + "version": "0.7.12" }, "device_info_plus": { "dependency": "direct main", @@ -244,31 +374,51 @@ "dependency": "direct main", "description": { "name": "dio", - "sha256": "d90ee57923d1828ac14e492ca49440f65477f4bb1263575900be731a3dac66a9", + "sha256": "aff32c08f92787a557dd5c0145ac91536481831a01b4648136373cddb0e64f8c", "url": "https://pub.dev" }, "source": "hosted", - "version": "5.9.0" + "version": "5.9.2" }, "dio_cookie_manager": { "dependency": "direct main", "description": { "name": "dio_cookie_manager", - "sha256": "d39c16abcc711c871b7b29bd51c6b5f3059ef39503916c6a9df7e22c4fc595e0", + "sha256": "0db1a7b997a0455e488ac35744c68eed3f2a4280d3ab531835a65641b0a08744", "url": "https://pub.dev" }, "source": "hosted", - "version": "3.3.0" + "version": "3.4.0" }, "dio_web_adapter": { "dependency": "transitive", "description": { "name": "dio_web_adapter", - "sha256": "7586e476d70caecaf1686d21eee7247ea43ef5c345eab9e0cc3583ff13378d78", + "sha256": "2f9e64323a7c3c7ef69567d5c800424a11f8337b8b228bad02524c9fb3c1f340", "url": "https://pub.dev" }, "source": "hosted", - "version": "2.1.1" + "version": "2.1.2" + }, + "drift": { + "dependency": "direct main", + "description": { + "name": "drift", + "sha256": "61f876c0291b194980bafd203f48e85d5fb04e4a7334367d1a89f44004dbcb83", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.32.0" + }, + "drift_dev": { + "dependency": "direct dev", + "description": { + "name": "drift_dev", + "sha256": "d687e955cc4b1706ad49b3860fcc1045c09bbf1d84c3c7383615f7f9c3320aa2", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.32.0" }, "fake_async": { "dependency": "transitive", @@ -294,11 +444,11 @@ "dependency": "transitive", "description": { "name": "ffi", - "sha256": "289279317b4b16eb2bb7e271abccd4bf84ec9bdcbe999e278a94b804f5630418", + "sha256": "6d7fd89431262d8f3125e81b50d3847a091d846eafcd4fdb88dd06f36d705a45", "url": "https://pub.dev" }, "source": "hosted", - "version": "2.1.4" + "version": "2.2.0" }, "file": { "dependency": "transitive", @@ -314,11 +464,11 @@ "dependency": "direct main", "description": { "name": "file_picker", - "sha256": "7872545770c277236fd32b022767576c562ba28366204ff1a5628853cf8f2200", + "sha256": "57d9a1dd5063f85fa3107fb42d1faffda52fdc948cefd5fe5ea85267a5fc7343", "url": "https://pub.dev" }, "source": "hosted", - "version": "10.3.7" + "version": "10.3.10" }, "file_selector": { "dependency": "transitive", @@ -416,6 +566,66 @@ "source": "sdk", "version": "0.0.0" }, + "flutter_image_compress": { + "dependency": "direct main", + "description": { + "name": "flutter_image_compress", + "sha256": "51d23be39efc2185e72e290042a0da41aed70b14ef97db362a6b5368d0523b27", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.4.0" + }, + "flutter_image_compress_common": { + "dependency": "transitive", + "description": { + "name": "flutter_image_compress_common", + "sha256": "c5c5d50c15e97dd7dc72ff96bd7077b9f791932f2076c5c5b6c43f2c88607bfb", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.0.6" + }, + "flutter_image_compress_macos": { + "dependency": "transitive", + "description": { + "name": "flutter_image_compress_macos", + "sha256": "20019719b71b743aba0ef874ed29c50747461e5e8438980dfa5c2031898f7337", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.0.3" + }, + "flutter_image_compress_ohos": { + "dependency": "transitive", + "description": { + "name": "flutter_image_compress_ohos", + "sha256": "e76b92bbc830ee08f5b05962fc78a532011fcd2041f620b5400a593e96da3f51", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.0.3" + }, + "flutter_image_compress_platform_interface": { + "dependency": "transitive", + "description": { + "name": "flutter_image_compress_platform_interface", + "sha256": "579cb3947fd4309103afe6442a01ca01e1e6f93dc53bb4cbd090e8ce34a41889", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.0.5" + }, + "flutter_image_compress_web": { + "dependency": "transitive", + "description": { + "name": "flutter_image_compress_web", + "sha256": "b9b141ac7c686a2ce7bb9a98176321e1182c9074650e47bb140741a44b6f5a96", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.1.5" + }, "flutter_lints": { "dependency": "direct dev", "description": { @@ -468,11 +678,11 @@ "dependency": "direct main", "description": { "name": "fluttertoast", - "sha256": "90778fe0497fe3a09166e8cf2e0867310ff434b794526589e77ec03cf08ba8e8", + "sha256": "144ddd74d49c865eba47abe31cbc746c7b311c82d6c32e571fd73c4264b740e2", "url": "https://pub.dev" }, "source": "hosted", - "version": "8.2.14" + "version": "9.0.0" }, "frontend_server_client": { "dependency": "transitive", @@ -494,6 +704,26 @@ "source": "hosted", "version": "2.1.3" }, + "graphs": { + "dependency": "transitive", + "description": { + "name": "graphs", + "sha256": "741bbf84165310a68ff28fe9e727332eef1407342fca52759cb21ad8177bb8d0", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.3.2" + }, + "hooks": { + "dependency": "transitive", + "description": { + "name": "hooks", + "sha256": "e79ed1e8e1929bc6ecb6ec85f0cb519c887aa5b423705ded0d0f2d9226def388", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.0.2" + }, "http": { "dependency": "transitive", "description": { @@ -524,6 +754,26 @@ "source": "hosted", "version": "4.1.2" }, + "image": { + "dependency": "direct main", + "description": { + "name": "image", + "sha256": "f9881ff4998044947ec38d098bc7c8316ae1186fa786eddffdb867b9bc94dfce", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.8.0" + }, + "image_gallery_saver_plus": { + "dependency": "direct main", + "description": { + "name": "image_gallery_saver_plus", + "sha256": "199b9e24f8d85e98f11e3d35571ab68ae50626ad40e2bb85c84383f69a6950ad", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.0.1" + }, "intl": { "dependency": "direct main", "description": { @@ -588,11 +838,11 @@ "dependency": "transitive", "description": { "name": "json_annotation", - "sha256": "1ce844379ca14835a50d2f019a3099f419082cfdd231cd86a142af94dd5c6bb1", + "sha256": "cb09e7dac6210041fad964ed7fbee004f14258b4eca4040f72d1234062ace4c8", "url": "https://pub.dev" }, "source": "hosted", - "version": "4.9.0" + "version": "4.11.0" }, "leak_tracker": { "dependency": "transitive", @@ -638,11 +888,11 @@ "dependency": "transitive", "description": { "name": "lints", - "sha256": "a5e2b223cb7c9c8efdc663ef484fdd95bb243bff242ef5b13e26883547fce9a0", + "sha256": "12f842a479589fea194fe5c5a3095abc7be0c1f2ddfa9a0e76aed1dbd26a87df", "url": "https://pub.dev" }, "source": "hosted", - "version": "6.0.0" + "version": "6.1.0" }, "logger": { "dependency": "direct main", @@ -678,32 +928,32 @@ "dependency": "transitive", "description": { "name": "matcher", - "sha256": "dc58c723c3c24bf8d3e2d3ad3f2f9d7bd9cf43ec6feaa64181775e60190153f2", + "sha256": "12956d0ad8390bbcc63ca2e1469c0619946ccb52809807067a7020d57e647aa6", "url": "https://pub.dev" }, "source": "hosted", - "version": "0.12.17" + "version": "0.12.18" }, "material_color_utilities": { "dependency": "transitive", "description": { "name": "material_color_utilities", - "sha256": "f7142bb1154231d7ea5f96bc7bde4bda2a0945d2806bb11670e30b850d56bdec", + "sha256": "9c337007e82b1889149c82ed242ed1cb24a66044e30979c44912381e9be4c48b", "url": "https://pub.dev" }, "source": "hosted", - "version": "0.11.1" + "version": "0.13.0" }, "media_scanner": { "dependency": "direct main", "description": { "path": ".", "ref": "master", - "resolved-ref": "1b34bda70b6620c3195e58ce9d4e88bbc92784cf", + "resolved-ref": "cc5b816fe0108009ef5b8616cecb8ad05ab3b147", "url": "https://github.com/Lzyct/media_scanner" }, "source": "git", - "version": "2.2.0" + "version": "2.2.1" }, "meta": { "dependency": "transitive", @@ -725,15 +975,25 @@ "source": "hosted", "version": "2.0.0" }, + "native_toolchain_c": { + "dependency": "transitive", + "description": { + "name": "native_toolchain_c", + "sha256": "92b2ca62c8bd2b8d2f267cdfccf9bfbdb7322f778f8f91b3ce5b5cda23a3899f", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.17.5" + }, "network_info_plus": { "dependency": "direct main", "description": { "name": "network_info_plus", - "sha256": "f926b2ba86aa0086a0dfbb9e5072089bc213d854135c1712f1d29fc89ba3c877", + "sha256": "2866dadcbee2709e20d67737a1556f5675b8b0cdcf2c1659ba74bc21bffede4f", "url": "https://pub.dev" }, "source": "hosted", - "version": "6.1.4" + "version": "7.0.0" }, "network_info_plus_platform_interface": { "dependency": "transitive", @@ -765,6 +1025,16 @@ "source": "hosted", "version": "2.0.2" }, + "objective_c": { + "dependency": "transitive", + "description": { + "name": "objective_c", + "sha256": "100a1c87616ab6ed41ec263b083c0ef3261ee6cd1dc3b0f35f8ddfa4f996fe52", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "9.3.0" + }, "open_filex": { "dependency": "direct main", "description": { @@ -820,11 +1090,11 @@ "dependency": "transitive", "description": { "name": "path_provider_foundation", - "sha256": "6d13aece7b3f5c5a9731eaf553ff9dcbc2eff41087fd2df587fd0fed9a3eb0c4", + "sha256": "2a376b7d6392d80cd3705782d2caa734ca4727776db0b6ec36ef3f1855197699", "url": "https://pub.dev" }, "source": "hosted", - "version": "2.5.1" + "version": "2.6.0" }, "path_provider_linux": { "dependency": "transitive", @@ -920,11 +1190,11 @@ "dependency": "transitive", "description": { "name": "petitparser", - "sha256": "1a97266a94f7350d30ae522c0af07890c70b8e62c71e8e3920d1db4d23c057d1", + "sha256": "91bd59303e9f769f108f8df05e371341b15d59e995e6806aefab827b58336675", "url": "https://pub.dev" }, "source": "hosted", - "version": "7.0.1" + "version": "7.0.2" }, "pixel_snap": { "dependency": "transitive", @@ -980,11 +1250,11 @@ "dependency": "transitive", "description": { "name": "posix", - "sha256": "6323a5b0fa688b6a010df4905a56b00181479e6d10534cecfecede2aa55add61", + "sha256": "185ef7606574f789b40f289c233efa52e96dead518aed988e040a10737febb07", "url": "https://pub.dev" }, "source": "hosted", - "version": "6.0.3" + "version": "6.5.0" }, "pub_semver": { "dependency": "transitive", @@ -996,6 +1266,26 @@ "source": "hosted", "version": "2.2.0" }, + "pubspec_parse": { + "dependency": "transitive", + "description": { + "name": "pubspec_parse", + "sha256": "0560ba233314abbed0a48a2956f7f022cce7c3e1e73df540277da7544cad4082", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "1.5.0" + }, + "recase": { + "dependency": "transitive", + "description": { + "name": "recase", + "sha256": "e4eb4ec2dcdee52dcf99cb4ceabaffc631d7424ee55e56f280bc039737f89213", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.1.0" + }, "saf_stream": { "dependency": "direct main", "description": { @@ -1019,11 +1309,12 @@ "share_handler": { "dependency": "direct main", "description": { - "name": "share_handler", - "sha256": "0a6d007f0e44fbee27164adcd159ecbc88238864313f4e5c58161cae2180328d", - "url": "https://pub.dev" + "path": "share_handler", + "ref": "main", + "resolved-ref": "b30d993620fe6dc3f3d5a1a1b55cf8bcc96e3995", + "url": "https://github.com/doraemonkeys/share_handler" }, - "source": "hosted", + "source": "git", "version": "0.0.25" }, "share_handler_android": { @@ -1060,11 +1351,11 @@ "dependency": "direct main", "description": { "name": "share_plus", - "sha256": "d7dc0630a923883c6328ca31b89aa682bacbf2f8304162d29f7c6aaff03a27a1", + "sha256": "14c8860d4de93d3a7e53af51bff479598c4e999605290756bbbe45cf65b37840", "url": "https://pub.dev" }, "source": "hosted", - "version": "11.1.0" + "version": "12.0.1" }, "share_plus_platform_interface": { "dependency": "transitive", @@ -1090,11 +1381,11 @@ "dependency": "transitive", "description": { "name": "shared_preferences_android", - "sha256": "83af5c682796c0f7719c2bbf74792d113e40ae97981b8f266fa84574573556bc", + "sha256": "8374d6200ab33ac99031a852eba4c8eb2170c4bf20778b3e2c9eccb45384fb41", "url": "https://pub.dev" }, "source": "hosted", - "version": "2.4.18" + "version": "2.4.21" }, "shared_preferences_foundation": { "dependency": "transitive", @@ -1192,6 +1483,16 @@ "source": "sdk", "version": "0.0.0" }, + "source_gen": { + "dependency": "transitive", + "description": { + "name": "source_gen", + "sha256": "adc962c96fffb2de1728ef396a995aaedcafbe635abdca13d2a987ce17e57751", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "4.2.1" + }, "source_map_stack_trace": { "dependency": "transitive", "description": { @@ -1216,11 +1517,41 @@ "dependency": "transitive", "description": { "name": "source_span", - "sha256": "254ee5351d6cb365c859e20ee823c3bb479bf4a293c22d17a9f1bf144ce86f7c", + "sha256": "56a02f1f4cd1a2d96303c0144c93bd6d909eea6bee6bf5a0e0b685edbd4c47ab", "url": "https://pub.dev" }, "source": "hosted", - "version": "1.10.1" + "version": "1.10.2" + }, + "sqlite3": { + "dependency": "transitive", + "description": { + "name": "sqlite3", + "sha256": "caa693ad15a587a2b4fde093b728131a1827903872171089dedb16f7665d3a91", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "3.2.0" + }, + "sqlite3_flutter_libs": { + "dependency": "direct main", + "description": { + "name": "sqlite3_flutter_libs", + "sha256": "eeb9e3a45207649076b808f8a5a74d68770d0b7f26ccef6d5f43106eee5375ad", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.5.42" + }, + "sqlparser": { + "dependency": "transitive", + "description": { + "name": "sqlparser", + "sha256": "faebfaa581dde5b6b55c499f41532c4883943162ebc12d7138c70cfcead733dc", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "0.44.2" }, "stack_trace": { "dependency": "transitive", @@ -1242,6 +1573,16 @@ "source": "hosted", "version": "2.1.4" }, + "stream_transform": { + "dependency": "transitive", + "description": { + "name": "stream_transform", + "sha256": "ad47125e588cfd37a9a7f86c7d6356dde8dfe89d071d293f80ca9e9273a33871", + "url": "https://pub.dev" + }, + "source": "hosted", + "version": "2.1.1" + }, "string_scanner": { "dependency": "transitive", "description": { @@ -1286,31 +1627,31 @@ "dependency": "direct dev", "description": { "name": "test", - "sha256": "75906bf273541b676716d1ca7627a17e4c4070a3a16272b7a3dc7da3b9f3f6b7", + "sha256": "54c516bbb7cee2754d327ad4fca637f78abfc3cbcc5ace83b3eda117e42cd71a", "url": "https://pub.dev" }, "source": "hosted", - "version": "1.26.3" + "version": "1.29.0" }, "test_api": { "dependency": "transitive", "description": { "name": "test_api", - "sha256": "ab2726c1a94d3176a45960b6234466ec367179b87dd74f1611adb1f3b5fb9d55", + "sha256": "93167629bfc610f71560ab9312acdda4959de4df6fac7492c89ff0d3886f6636", "url": "https://pub.dev" }, "source": "hosted", - "version": "0.7.7" + "version": "0.7.9" }, "test_core": { "dependency": "transitive", "description": { "name": "test_core", - "sha256": "0cc24b5ff94b38d2ae73e1eb43cc302b77964fbf67abad1e296025b78deb53d0", + "sha256": "394f07d21f0f2255ec9e3989f21e54d3c7dc0e6e9dbce160e5a9c1a6be0e2943", "url": "https://pub.dev" }, "source": "hosted", - "version": "0.6.12" + "version": "0.6.15" }, "typed_data": { "dependency": "transitive", @@ -1356,11 +1697,11 @@ "dependency": "transitive", "description": { "name": "url_launcher_ios", - "sha256": "cfde38aa257dae62ffe79c87fab20165dfdf6988c1d31b58ebf59b9106062aad", + "sha256": "580fe5dfb51671ae38191d316e027f6b76272b026370708c2d898799750a02b0", "url": "https://pub.dev" }, "source": "hosted", - "version": "6.3.6" + "version": "6.4.1" }, "url_launcher_linux": { "dependency": "transitive", @@ -1396,11 +1737,11 @@ "dependency": "transitive", "description": { "name": "url_launcher_web", - "sha256": "4bd2b7b4dc4d4d0b94e5babfffbca8eac1a126c7f3d6ecbc1a11013faa3abba2", + "sha256": "d0412fcf4c6b31ecfdb7762359b7206ffba3bbffd396c6d9f9c4616ece476c1f", "url": "https://pub.dev" }, "source": "hosted", - "version": "2.4.1" + "version": "2.4.2" }, "url_launcher_windows": { "dependency": "transitive", @@ -1416,11 +1757,11 @@ "dependency": "transitive", "description": { "name": "uuid", - "sha256": "a11b666489b1954e01d992f3d601b1804a33937b5a8fe677bd26b8a9f96f96e8", + "sha256": "1fef9e8e11e2991bb773070d4656b7bd5d850967a2456cfc83cf47925ba79489", "url": "https://pub.dev" }, "source": "hosted", - "version": "4.5.2" + "version": "4.5.3" }, "vector_math": { "dependency": "transitive", @@ -1446,11 +1787,11 @@ "dependency": "transitive", "description": { "name": "watcher", - "sha256": "592ab6e2892f67760543fb712ff0177f4ec76c031f02f5b4ff8d3fc5eb9fb61a", + "sha256": "1398c9f081a753f9226febe8900fce8f7d0a67163334e1c94a2438339d79d635", "url": "https://pub.dev" }, "source": "hosted", - "version": "1.1.4" + "version": "1.2.1" }, "web": { "dependency": "transitive", @@ -1544,7 +1885,7 @@ } }, "sdks": { - "dart": ">=3.10.1 <4.0.0", - "flutter": ">=3.38.0" + "dart": ">=3.10.3 <4.0.0", + "flutter": ">=3.38.4" } } diff --git a/pkgs/development/compilers/dart/package-source-builders/sqlite3/default.nix b/pkgs/development/compilers/dart/package-source-builders/sqlite3/default.nix index ff3ce563c45a..d296c881b80f 100644 --- a/pkgs/development/compilers/dart/package-source-builders/sqlite3/default.nix +++ b/pkgs/development/compilers/dart/package-source-builders/sqlite3/default.nix @@ -7,12 +7,12 @@ { version, src, ... }: -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "sqlite3"; inherit version src; inherit (src) passthru; - setupHook = writeScript "${pname}-setup-hook" '' + setupHook = writeScript "${finalAttrs.pname}-setup-hook" '' sqliteFixupHook() { runtimeDependencies+=('${lib.getLib sqlite}') } @@ -20,12 +20,16 @@ stdenv.mkDerivation rec { preFixupHooks+=(sqliteFixupHook) ''; + postPatch = lib.optionalString (lib.versionAtLeast version "3.2.0") '' + substituteInPlace lib/src/hook/description.dart \ + --replace-fail "return PrecompiledFromGithubAssets(LibraryType.sqlite3);" "return LookupSystem('sqlite3');" + ''; + installPhase = '' runHook preInstall - mkdir -p "$out" - ln -s '${src}'/* "$out" + cp --recursive . "$out" runHook postInstall ''; -} +}) From 614c5b381eb51dc4bf28e3d99a94a4b4c10b5132 Mon Sep 17 00:00:00 2001 From: OPNA2608 Date: Sun, 15 Mar 2026 11:15:52 +0100 Subject: [PATCH 029/121] net-cpp: 3.2.0 -> 3.2.1 --- pkgs/by-name/ne/net-cpp/package.nix | 31 ++++++++++------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/pkgs/by-name/ne/net-cpp/package.nix b/pkgs/by-name/ne/net-cpp/package.nix index 961af44c5a4f..cfe446269d9f 100644 --- a/pkgs/by-name/ne/net-cpp/package.nix +++ b/pkgs/by-name/ne/net-cpp/package.nix @@ -31,13 +31,13 @@ let in stdenv.mkDerivation (finalAttrs: { pname = "net-cpp"; - version = "3.2.0"; + version = "3.2.1"; src = fetchFromGitLab { owner = "ubports"; repo = "development/core/lib-cpp/net-cpp"; - rev = finalAttrs.version; - hash = "sha256-JfVSAwBWtHw7a0CtY5C1xuxThO3FbS4MgNuIO1CGuts="; + tag = finalAttrs.version; + hash = "sha256-1rUPdN62u4eYtrXgoVaeSHro4gnAfFAl1brt+tE45oE="; }; outputs = [ @@ -47,26 +47,14 @@ stdenv.mkDerivation (finalAttrs: { ]; patches = [ - # Remove when version > 3.2.0 + # Remove when version > 3.2.1 (fetchpatch { - name = "0001-net-cpp-fix-compatibility-with-Boost-1.88.patch"; - url = "https://gitlab.com/ubports/development/core/lib-cpp/net-cpp/-/commit/9ff8651b11eb9dc0f64147001e10a57d1546a626.patch"; - hash = "sha256-IEa3nhnv0oa5WmhIDG3OMrZmmoAZFeedAzKXAKVTIQg="; + name = "0001-net-cpp-Look-for-python3-executable-at-configure-time-instead-of-hardcoding-a-path.patch"; + url = "https://gitlab.com/ubports/development/core/lib-cpp/net-cpp/-/commit/811da28f36f34cc2ea32dc96b2c65932d4f954b0.patch"; + hash = "sha256-CC7fEuRNuf5TNEfhFJr9VLWFWfTnFtIvSTUoCcwGe68="; }) ]; - postPatch = - # https://gitlab.com/ubports/development/core/lib-cpp/net-cpp/-/merge_requests/22, too basic to bother with fetchpatch - '' - substituteInPlace src/CMakeLists.txt \ - --replace-fail 'find_package(Boost COMPONENTS system' 'find_package(Boost COMPONENTS' - '' - + lib.optionalString finalAttrs.finalPackage.doCheck '' - # Use wrapped python. Removing just the /usr/bin doesn't seem to work? - substituteInPlace tests/httpbin.h.in \ - --replace '/usr/bin/python3' '${lib.getExe pythonEnv}' - ''; - strictDeps = true; nativeBuildInputs = [ @@ -107,7 +95,10 @@ stdenv.mkDerivation (finalAttrs: { enableParallelChecking = false; passthru = { - tests.pkg-config = testers.testMetaPkgConfig finalAttrs.finalPackage; + tests.pkg-config = testers.hasPkgConfigModules { + package = finalAttrs.finalPackage; + versionCheck = true; + }; updateScript = gitUpdater { }; }; From 83fb7bff591a864445f6df0a793e230086c66dc6 Mon Sep 17 00:00:00 2001 From: Tiago Ferreira Date: Mon, 2 Mar 2026 23:08:43 +0000 Subject: [PATCH 030/121] colima: add krunkit to PATH on aarch64-darwin Enables `colima start --vm-type krunkit` to work out of the box on Apple Silicon by conditionally including krunkit in the wrapper PATH when available on the host platform. --- pkgs/by-name/co/colima/package.nix | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/co/colima/package.nix b/pkgs/by-name/co/colima/package.nix index 45e4eb62a74f..c03ab54dd7df 100644 --- a/pkgs/by-name/co/colima/package.nix +++ b/pkgs/by-name/co/colima/package.nix @@ -5,6 +5,7 @@ buildGoModule, fetchFromGitHub, installShellFiles, + krunkit, lima-full, makeWrapper, procps, @@ -60,11 +61,14 @@ buildGoModule (finalAttrs: { postInstall = '' wrapProgram $out/bin/colima \ --prefix PATH : ${ - lib.makeBinPath [ - # Suppress warning on `colima start`: https://github.com/abiosoft/colima/issues/1333 - lima-full - qemu - ] + lib.makeBinPath ( + [ + # Suppress warning on `colima start`: https://github.com/abiosoft/colima/issues/1333 + lima-full + qemu + ] + ++ lib.optional (lib.meta.availableOn stdenv.hostPlatform krunkit) krunkit + ) } installShellCompletion --cmd colima \ From 4927a38b982116b1ab0616d7287d2caa5ecdbb67 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Tue, 17 Mar 2026 03:16:36 +0000 Subject: [PATCH 031/121] warmup-s3-archives: 1.0.0 -> 1.1.0 --- pkgs/by-name/wa/warmup-s3-archives/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/wa/warmup-s3-archives/package.nix b/pkgs/by-name/wa/warmup-s3-archives/package.nix index eb936ee9541b..0f81dac52b8a 100644 --- a/pkgs/by-name/wa/warmup-s3-archives/package.nix +++ b/pkgs/by-name/wa/warmup-s3-archives/package.nix @@ -8,16 +8,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "warmup-s3-archives"; - version = "1.0.0"; + version = "1.1.0"; src = fetchFromGitLab { owner = "philipmw"; repo = "warmup-s3-archives"; tag = "v${finalAttrs.version}"; - hash = "sha256-TJluuylxxFc66NidXCHxZdQN2VNv2QjFodUDXIQolZQ="; + hash = "sha256-0moqSc87B3LFL7P5qoSqvdkf+RwLbiWkzGhjR2jgTR4="; }; - cargoHash = "sha256-cPjjSYDsMsZO3Wj9wbAhSACbJGDINrE70cj+Lj4QYQE="; + cargoHash = "sha256-sWSsxGj8+tSNs2JlhDZt+ulo89rPqZM8FjHpbUdeC5w="; passthru.updateScript = nix-update-script { }; From 078c110d4adaebbd359c9fc2699fd3cf82f99e23 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Wed, 18 Mar 2026 09:59:18 +0000 Subject: [PATCH 032/121] hydrus: 662 -> 663 --- pkgs/by-name/hy/hydrus/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/hy/hydrus/package.nix b/pkgs/by-name/hy/hydrus/package.nix index 8d340a225a18..d108f61d9e14 100644 --- a/pkgs/by-name/hy/hydrus/package.nix +++ b/pkgs/by-name/hy/hydrus/package.nix @@ -16,14 +16,14 @@ python3Packages.buildPythonApplication (finalAttrs: { pname = "hydrus"; - version = "662"; + version = "663"; pyproject = false; src = fetchFromGitHub { owner = "hydrusnetwork"; repo = "hydrus"; tag = "v${finalAttrs.version}"; - hash = "sha256-p5yIZlnS5EWkJYvDfyjdebEKRv/u9rLXH3g4G1esn+A="; + hash = "sha256-xIQx3aCLbFtdiugLDZsZpsv6TOUj84f6U+80rDZ9mZk="; }; nativeBuildInputs = [ From deedea0e9fc5d80e6c829d556e16392efdc4e318 Mon Sep 17 00:00:00 2001 From: Patrick Chilton Date: Wed, 18 Mar 2026 16:02:02 +0100 Subject: [PATCH 033/121] colmap: unstable-3.12.5-openimageio -> 4.0.2 --- .../colmap/disambiguate-gradientchecker.patch | 19 + pkgs/by-name/co/colmap/openimageio.patch | 4927 ----------------- pkgs/by-name/co/colmap/package.nix | 22 +- .../suitesparse-no-include-subdir.patch | 22 + 4 files changed, 56 insertions(+), 4934 deletions(-) create mode 100644 pkgs/by-name/co/colmap/disambiguate-gradientchecker.patch delete mode 100644 pkgs/by-name/co/colmap/openimageio.patch create mode 100644 pkgs/by-name/co/colmap/suitesparse-no-include-subdir.patch diff --git a/pkgs/by-name/co/colmap/disambiguate-gradientchecker.patch b/pkgs/by-name/co/colmap/disambiguate-gradientchecker.patch new file mode 100644 index 000000000000..f0ec5ea2d147 --- /dev/null +++ b/pkgs/by-name/co/colmap/disambiguate-gradientchecker.patch @@ -0,0 +1,19 @@ +commit a1f0a46b4932ed1c98ceb872e6b346b370f1b638 +Author: Patrick Chilton +Date: Wed Mar 18 15:59:05 2026 +0100 + + Disambiguate ceres::GradientChecker constructor + +diff --git a/src/colmap/estimators/cost_functions/reprojection_error_test.cc b/src/colmap/estimators/cost_functions/reprojection_error_test.cc +index 25e6ffdc..7a1e4777 100644 +--- a/src/colmap/estimators/cost_functions/reprojection_error_test.cc ++++ b/src/colmap/estimators/cost_functions/reprojection_error_test.cc +@@ -106,7 +106,7 @@ TEST(ReprojErrorCostFunctor, AnalyticalVersusAutoDiff) { + + ceres::NumericDiffOptions numeric_diff_options; + ceres::GradientChecker gradient_checker( +- analytical_cost_function.get(), nullptr, numeric_diff_options); ++ analytical_cost_function.get(), static_cast*>(nullptr), numeric_diff_options); + ceres::GradientChecker::ProbeResults results; + EXPECT_TRUE( + gradient_checker.Probe(parameter_blocks.data(), kEps, &results)); diff --git a/pkgs/by-name/co/colmap/openimageio.patch b/pkgs/by-name/co/colmap/openimageio.patch deleted file mode 100644 index 780a3c4ba256..000000000000 --- a/pkgs/by-name/co/colmap/openimageio.patch +++ /dev/null @@ -1,4927 +0,0 @@ -diff --git a/.github/workflows/build-mac.yml b/.github/workflows/build-mac.yml -index bb4b844d..dbb9eccd 100644 ---- a/.github/workflows/build-mac.yml -+++ b/.github/workflows/build-mac.yml -@@ -48,29 +48,31 @@ jobs: - - name: Setup Mac - run: | - # Fix `brew link` error. -- find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete -+ find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete - -+ brew uninstall cmake # Workaround for CI failures. - brew install \ - cmake \ - ninja \ - boost \ - eigen \ -- freeimage \ -+ openimageio \ - curl \ - metis \ - glog \ - googletest \ - ceres-solver \ -- qt5 \ -+ qt \ - glew \ - cgal \ - sqlite3 \ -- ccache -+ ccache \ -+ libomp - brew link --force libomp - - - name: Configure and build - run: | -- export PATH="/usr/local/opt/qt@5/bin:$PATH" -+ export PATH="/usr/local/opt/qt/bin:$PATH" - cmake --version - mkdir build - cd build -@@ -78,7 +80,7 @@ jobs: - -GNinja \ - -DCMAKE_BUILD_TYPE=${{ matrix.config.cmakeBuildType }} \ - -DTESTS_ENABLED=ON \ -- -DQt5_DIR="$(brew --prefix qt@5)/lib/cmake/Qt5" -+ -DQt6_DIR="$(brew --prefix qt)/lib/cmake/Qt6" - ninja - - - name: Run tests -diff --git a/.github/workflows/build-pycolmap.yml b/.github/workflows/build-pycolmap.yml -index 03cb18b4..6063c215 100644 ---- a/.github/workflows/build-pycolmap.yml -+++ b/.github/workflows/build-pycolmap.yml -@@ -21,9 +21,9 @@ jobs: - strategy: - matrix: - config: [ -- {os: ubuntu-latest}, -- {os: macos-14, arch: arm64, deploymentTarget: 14.0}, -- {os: windows-latest}, -+ {os: ubuntu-24.04}, -+ # {os: macos-14, arch: arm64, deploymentTarget: 14.0}, -+ {os: windows-2025}, - ] - env: - COMPILER_CACHE_VERSION: 1 -diff --git a/.github/workflows/build-ubuntu.yml b/.github/workflows/build-ubuntu.yml -index 617c6c0a..5f2f7fba 100644 ---- a/.github/workflows/build-ubuntu.yml -+++ b/.github/workflows/build-ubuntu.yml -@@ -23,6 +23,7 @@ jobs: - config: [ - { - os: ubuntu-24.04, -+ qtVersion: 6, - cmakeBuildType: RelWithDebInfo, - asanEnabled: false, - guiEnabled: true, -@@ -33,6 +34,7 @@ jobs: - }, - { - os: ubuntu-22.04, -+ qtVersion: 6, - cmakeBuildType: Release, - asanEnabled: false, - guiEnabled: true, -@@ -43,6 +45,7 @@ jobs: - }, - { - os: ubuntu-22.04, -+ qtVersion: 5, - cmakeBuildType: Release, - asanEnabled: false, - guiEnabled: false, -@@ -53,6 +56,7 @@ jobs: - }, - { - os: ubuntu-24.04, -+ qtVersion: 6, - cmakeBuildType: Release, - asanEnabled: true, - guiEnabled: false, -@@ -63,6 +67,7 @@ jobs: - }, - { - os: ubuntu-24.04, -+ qtVersion: 6, - cmakeBuildType: ClangTidy, - asanEnabled: false, - guiEnabled: false, -@@ -125,6 +130,12 @@ jobs: - - - name: Setup Ubuntu - run: | -+ if [ "${{ matrix.config.qtVersion }}" == "5" ]; then -+ qt_packages="qtbase5-dev libqt5opengl5-dev libcgal-qt5-dev" -+ elif [ "${{ matrix.config.qtVersion }}" == "6" ]; then -+ qt_packages="qt6-base-dev libqt6opengl6-dev libqt6openglwidgets6" -+ fi -+ - sudo apt-get update && sudo apt-get install -y \ - build-essential \ - cmake \ -@@ -134,31 +145,29 @@ jobs: - libboost-system-dev \ - libeigen3-dev \ - libceres-dev \ -- libfreeimage-dev \ -+ libopenimageio-dev \ -+ openimageio-tools \ - libmetis-dev \ - libgoogle-glog-dev \ - libgtest-dev \ - libgmock-dev \ - libsqlite3-dev \ - libglew-dev \ -- qtbase5-dev \ -- libqt5opengl5-dev \ -+ $qt_packages \ - libcgal-dev \ -- libcgal-qt5-dev \ - libgl1-mesa-dri \ - libunwind-dev \ - libcurl4-openssl-dev \ - libmkl-full-dev \ - xvfb - -+ # Fix issue in Ubuntu's openimageio CMake config. -+ # We don't depend on any of openimageio's OpenCV functionality, -+ # but it still requires the OpenCV include directory to exist. -+ sudo mkdir -p /usr/include/opencv4 -+ - if [ "${{ matrix.config.cudaEnabled }}" == "true" ]; then -- if [ "${{ matrix.config.os }}" == "ubuntu-20.04" ]; then -- sudo apt-get install -y \ -- nvidia-cuda-toolkit \ -- nvidia-cuda-toolkit-gcc -- echo "CC=/usr/bin/cuda-gcc" >> $GITHUB_ENV -- echo "CXX=/usr/bin/cuda-g++" >> $GITHUB_ENV -- elif [ "${{ matrix.config.os }}" == "ubuntu-22.04" ]; then -+ if [ "${{ matrix.config.os }}" == "ubuntu-22.04" ]; then - sudo apt-get install -y \ - nvidia-cuda-toolkit \ - nvidia-cuda-toolkit-gcc \ -diff --git a/.github/workflows/build-windows.yml b/.github/workflows/build-windows.yml -index bab35e18..0d2433fe 100644 ---- a/.github/workflows/build-windows.yml -+++ b/.github/workflows/build-windows.yml -@@ -22,14 +22,14 @@ jobs: - matrix: - config: [ - { -- os: windows-2022, -+ os: windows-2025, - cmakeBuildType: Release, - cudaEnabled: true, - testsEnabled: true, - exportPackage: true, - }, - { -- os: windows-2022, -+ os: windows-2025, - cmakeBuildType: Release, - cudaEnabled: false, - testsEnabled: true, -@@ -42,7 +42,6 @@ jobs: - COMPILER_CACHE_DIR: ${{ github.workspace }}/compiler-cache - CCACHE_DIR: ${{ github.workspace }}/compiler-cache/ccache - CCACHE_BASEDIR: ${{ github.workspace }} -- VCPKG_COMMIT_ID: 0cb95c860ea83aafc1b24350510b30dec535989a - GLOG_v: 2 - GLOG_logtostderr: 1 - CUDA_MAJOR_VERSION: 12 -@@ -51,7 +50,7 @@ jobs: - - steps: - - uses: actions/checkout@v4 -- -+ - # We define the vcpkg binary sources using separate variables for read and - # write operations: - # * Read sources are defined as inline. These can be read by anyone and, -@@ -82,7 +81,7 @@ jobs: - key: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }}-${{ github.run_id }}-${{ github.run_number }} - restore-keys: v${{ env.COMPILER_CACHE_VERSION }}-${{ matrix.config.os }}-${{ matrix.config.cmakeBuildType }}-${{ matrix.config.asanEnabled }}--${{ matrix.config.cudaEnabled }} - path: ${{ env.COMPILER_CACHE_DIR }} -- -+ - - name: Install ccache - shell: pwsh - run: | -@@ -109,7 +108,6 @@ jobs: - cd ${{ github.workspace }} - git clone https://github.com/microsoft/vcpkg - cd vcpkg -- git reset --hard ${{ env.VCPKG_COMMIT_ID }} - ./bootstrap-vcpkg.bat - - - name: Install CMake and Ninja -@@ -166,7 +164,7 @@ jobs: - ../vcpkg/vcpkg.exe export --raw --output-dir vcpkg_export --output colmap - cp vcpkg_export/colmap/installed/x64-windows/bin/*.dll install/bin - cp vcpkg_export/colmap/installed/x64-windows-release/bin/*.dll install/bin -- cp -r vcpkg_export/colmap/installed/x64-windows/plugins install -+ cp -r vcpkg_export/colmap/installed/x64-windows/Qt6/plugins install - if ($${{ matrix.config.cudaEnabled }}) { - cp "${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/bin/cudart64_*.dll" install/bin - cp "${{ steps.cuda-toolkit.outputs.CUDA_PATH }}/bin/curand64_*.dll" install/bin -diff --git a/cmake/FindDependencies.cmake b/cmake/FindDependencies.cmake -index a0c3ff41..8833f115 100644 ---- a/cmake/FindDependencies.cmake -+++ b/cmake/FindDependencies.cmake -@@ -27,7 +27,7 @@ find_package(Boost ${COLMAP_FIND_TYPE} COMPONENTS - - find_package(Eigen3 ${COLMAP_FIND_TYPE}) - --find_package(FreeImage ${COLMAP_FIND_TYPE}) -+find_package(OpenImageIO ${COLMAP_FIND_TYPE}) - - find_package(Metis ${COLMAP_FIND_TYPE}) - -@@ -88,7 +88,7 @@ endif() - if(DOWNLOAD_ENABLED) - # The OpenSSL package in vcpkg seems broken under Windows and leads to - # missing certificate verification when connecting to SSL servers. We -- # therefore use curl[schannel] (i.e., native Windows SSL/TLS) under Windows -+ # therefore use curl[sspi] (i.e., native Windows SSL/TLS) under Windows - # and curl[openssl] otherwise. - find_package(CURL QUIET) - set(CRYPTO_FOUND FALSE) -@@ -156,7 +156,7 @@ if(CUDA_ENABLED) - - declare_imported_cuda_target(cudart ${CUDA_LIBRARIES}) - declare_imported_cuda_target(curand ${CUDA_LIBRARIES}) -- -+ - set(CUDAToolkit_VERSION "${CUDA_VERSION_STRING}") - set(CUDAToolkit_BIN_DIR "${CUDA_TOOLKIT_ROOT_DIR}/bin") - else() -@@ -198,11 +198,19 @@ else() - endif() - - if(GUI_ENABLED) -- find_package(Qt5 5.4 ${COLMAP_FIND_TYPE} COMPONENTS Core OpenGL Widgets) -+ find_package(QT NAMES Qt5 Qt6 REQUIRED) -+ set(COLMAP_QT_COMPONENTS Core OpenGL Widgets) -+ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) -+ list(APPEND COLMAP_QT_COMPONENTS OpenGLWidgets) -+ endif() -+ find_package(Qt${QT_VERSION_MAJOR} ${COLMAP_FIND_TYPE} ${COLMAP_QT_COMPONENTS}) - message(STATUS "Found Qt") -- message(STATUS " Module : ${Qt5Core_DIR}") -- message(STATUS " Module : ${Qt5OpenGL_DIR}") -- message(STATUS " Module : ${Qt5Widgets_DIR}") -+ message(STATUS " Module : ${Qt${QT_VERSION_MAJOR}Core_DIR}") -+ message(STATUS " Module : ${Qt${QT_VERSION_MAJOR}OpenGL_DIR}") -+ message(STATUS " Module : ${Qt${QT_VERSION_MAJOR}Widgets_DIR}") -+ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) -+ message(STATUS " Module : ${Qt${QT_VERSION_MAJOR}OpenGLWidgets_DIR}") -+ endif() - if(Qt5_FOUND) - # Qt5 was built with -reduce-relocations. - if(Qt5_POSITION_INDEPENDENT_CODE) -@@ -218,13 +226,15 @@ if(GUI_ENABLED) - endif() - endif() - endif() -+ endif() - -+ if(QT_FOUND) - # Enable automatic compilation of Qt resource files. - set(CMAKE_AUTORCC ON) - endif() - endif() - --if(GUI_ENABLED AND Qt5_FOUND) -+if(GUI_ENABLED AND Qt${QT_VERSION_MAJOR}_FOUND) - list(APPEND COLMAP_COMPILE_DEFINITIONS COLMAP_GUI_ENABLED) - message(STATUS "Enabling GUI support") - else() -diff --git a/cmake/FindFreeImage.cmake b/cmake/FindFreeImage.cmake -deleted file mode 100644 -index cf213cf2..00000000 ---- a/cmake/FindFreeImage.cmake -+++ /dev/null -@@ -1,104 +0,0 @@ --# Copyright (c), ETH Zurich and UNC Chapel Hill. --# All rights reserved. --# --# Redistribution and use in source and binary forms, with or without --# modification, are permitted provided that the following conditions are met: --# --# * Redistributions of source code must retain the above copyright --# notice, this list of conditions and the following disclaimer. --# --# * Redistributions in binary form must reproduce the above copyright --# notice, this list of conditions and the following disclaimer in the --# documentation and/or other materials provided with the distribution. --# --# * Neither the name of ETH Zurich and UNC Chapel Hill nor the names of --# its contributors may be used to endorse or promote products derived --# from this software without specific prior written permission. --# --# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" --# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE --# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE --# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDERS OR CONTRIBUTORS BE --# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR --# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF --# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS --# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN --# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) --# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE --# POSSIBILITY OF SUCH DAMAGE. -- -- --# Find package module for FreeImage library. --# --# The following variables are set by this module: --# --# FREEIMAGE_FOUND: TRUE if FreeImage is found. --# freeimage::FreeImage: Imported target to link against. --# --# The following variables control the behavior of this module: --# --# FREEIMAGE_INCLUDE_DIR_HINTS: List of additional directories in which to --# search for FreeImage includes. --# FREEIMAGE_LIBRARY_DIR_HINTS: List of additional directories in which to --# search for FreeImage libraries. -- --set(FREEIMAGE_INCLUDE_DIR_HINTS "" CACHE PATH "FreeImage include directory") --set(FREEIMAGE_LIBRARY_DIR_HINTS "" CACHE PATH "FreeImage library directory") -- --unset(FREEIMAGE_FOUND) -- --find_package(FreeImage CONFIG QUIET) --if(FreeImage_FOUND) -- if(TARGET freeimage::FreeImage) -- set(FREEIMAGE_FOUND TRUE) -- message(STATUS "Found FreeImage") -- message(STATUS " Target : freeimage::FreeImage") -- endif() --else() -- list(APPEND FREEIMAGE_CHECK_INCLUDE_DIRS -- ${FREEIMAGE_INCLUDE_DIR_HINTS} -- /usr/include -- /usr/local/include -- /opt/include -- /opt/local/include -- ) -- -- list(APPEND FREEIMAGE_CHECK_LIBRARY_DIRS -- ${FREEIMAGE_LIBRARY_DIR_HINTS} -- /usr/lib -- /usr/local/lib -- /opt/lib -- /opt/local/lib -- ) -- -- find_path(FREEIMAGE_INCLUDE_DIRS -- NAMES -- FreeImage.h -- PATHS -- ${FREEIMAGE_CHECK_INCLUDE_DIRS}) -- find_library(FREEIMAGE_LIBRARIES -- NAMES -- freeimage -- PATHS -- ${FREEIMAGE_CHECK_LIBRARY_DIRS}) -- -- if(FREEIMAGE_INCLUDE_DIRS AND FREEIMAGE_LIBRARIES) -- set(FREEIMAGE_FOUND TRUE) -- endif() -- -- if(FREEIMAGE_FOUND) -- message(STATUS "Found FreeImage") -- message(STATUS " Includes : ${FREEIMAGE_INCLUDE_DIRS}") -- message(STATUS " Libraries : ${FREEIMAGE_LIBRARIES}") -- endif() -- -- add_library(freeimage::FreeImage INTERFACE IMPORTED) -- target_include_directories( -- freeimage::FreeImage INTERFACE ${FREEIMAGE_INCLUDE_DIRS}) -- target_link_libraries( -- freeimage::FreeImage INTERFACE ${FREEIMAGE_LIBRARIES}) --endif() -- --if(NOT FREEIMAGE_FOUND AND FREEIMAGE_FIND_REQUIRED) -- message(FATAL_ERROR "Could not find FreeImage") --endif() -diff --git a/cmake/colmap-config.cmake.in b/cmake/colmap-config.cmake.in -index 250dfbc6..73ff530c 100644 ---- a/cmake/colmap-config.cmake.in -+++ b/cmake/colmap-config.cmake.in -@@ -43,9 +43,6 @@ set(COLMAP_FOUND FALSE) - - # Set hints for finding dependency packages. - --set(FREEIMAGE_INCLUDE_DIR_HINTS @FREEIMAGE_INCLUDE_DIR_HINTS@) --set(FREEIMAGE_LIBRARY_DIR_HINTS @FREEIMAGE_LIBRARY_DIR_HINTS@) -- - set(METIS_INCLUDE_DIR_HINTS @METIS_INCLUDE_DIR_HINTS@) - set(METIS_LIBRARY_DIR_HINTS @METIS_LIBRARY_DIR_HINTS@) - -diff --git a/doc/cli.rst b/doc/cli.rst -index ce6c3068..24ed0861 100644 ---- a/doc/cli.rst -+++ b/doc/cli.rst -@@ -166,7 +166,7 @@ the available options, e.g.:: - Options can either be specified via command-line or by defining - them in a .ini project file passed to ``--project_path``. - -- -h [ --help ] -+ -h [ --help ] - --default_random_seed arg (=0) - --log_to_stderr arg (=1) - --log_level arg (=0) -@@ -187,10 +187,10 @@ the available options, e.g.:: - --ImageReader.default_focal_length_factor arg (=1.2) - --ImageReader.camera_mask_path arg - --FeatureExtraction.type arg (=SIFT) -+ --FeatureExtraction.max_image_size arg (=3200) - --FeatureExtraction.num_threads arg (=-1) - --FeatureExtraction.use_gpu arg (=1) - --FeatureExtraction.gpu_index arg (=-1) -- --SiftExtraction.max_image_size arg (=3200) - --SiftExtraction.max_num_features arg (=8192) - --SiftExtraction.first_octave arg (=-1) - --SiftExtraction.num_octaves arg (=4) -diff --git a/doc/faq.rst b/doc/faq.rst -index 4611e63f..f73b05ed 100644 ---- a/doc/faq.rst -+++ b/doc/faq.rst -@@ -121,7 +121,7 @@ Example of images.txt:: - - 4 0.698777 0.714625 -0.023996 0.021129 -0.048184 0.004529 -0.313427 2 image0004.png - --Each image above must have the same ``image_id`` (first column) as in the database (next step). -+Each image above must have the same ``image_id`` (first column) as in the database (next step). - This database can be inspected either in the GUI (under ``Database management > Processing``), - or, one can create a reconstruction with colmap and later export it as text in order to see - the images.txt file it creates. -@@ -217,9 +217,9 @@ camera centers of a subset or all registered images. The 3D similarity - transformation between the reconstructed model and the target coordinate frame - of the geo-registration is determined from these correspondences. - --The geo-registered 3D coordinates can either be extracted from the database --(tvec_prior field) or from a user specified text file. --For text-files, the geo-registered 3D coordinates of the camera centers for -+The geo-registered 3D coordinates can either be extracted from the database -+(tvec_prior field) or from a user specified text file. -+For text-files, the geo-registered 3D coordinates of the camera centers for - images must be specified with the following format:: - - image_name1.jpg X1 Y1 Z1 -@@ -232,7 +232,7 @@ In case of GPS coordinates, a conversion will be performed to turn those into - cartesian coordinates. The conversion can be done from GPS to ECEF - (Earth-Centered-Earth-Fixed) or to ENU (East-North-Up) coordinates. If ENU coordinates - are used, the first image GPS coordinates will define the origin of the ENU frame. --It is also possible to use ECEF coordinates for alignment and then rotate the aligned -+It is also possible to use ECEF coordinates for alignment and then rotate the aligned - reconstruction into the ENU plane. - - Note that at least 3 images must be specified to estimate a 3D similarity -@@ -344,7 +344,7 @@ extraction step). But note that this might result in a significant slow-down of - the reconstruction pipeline. Please, also note that feature extraction on the - CPU can consume excessive RAM for large images in the default settings, which - might require manually reducing the maximum image size using --``--SiftExtraction.max_image_size`` and/or setting -+``--FeatureExtraction.max_image_size`` and/or setting - ``--SiftExtraction.first_octave 0`` or by manually limiting the number of - threads using ``--FeatureExtraction.num_threads``. - -diff --git a/doc/install.rst b/doc/install.rst -index 505e2516..1cc3c6cb 100755 ---- a/doc/install.rst -+++ b/doc/install.rst -@@ -81,19 +81,30 @@ Dependencies from the default Ubuntu repositories:: - libboost-graph-dev \ - libboost-system-dev \ - libeigen3-dev \ -- libfreeimage-dev \ -+ libopenimageio-dev \ -+ openimageio-tools \ - libmetis-dev \ - libgoogle-glog-dev \ - libgtest-dev \ - libgmock-dev \ - libsqlite3-dev \ - libglew-dev \ -- qtbase5-dev \ -- libqt5opengl5-dev \ -+ qt6-base-dev \ -+ libqt6opengl6-dev \ -+ libqt6openglwidgets6 \ - libcgal-dev \ - libceres-dev \ - libcurl4-openssl-dev \ -+ libssl-dev \ - libmkl-full-dev -+ # Fix issue in Ubuntu's openimageio CMake config. -+ # We don't depend on any of openimageio's OpenCV functionality, -+ # but it still requires the OpenCV include directory to exist. -+ sudo mkdir -p /usr/include/opencv4 -+ -+Alternatively, you can also build against Qt 5 instead of Qt 6 using:: -+ -+ qtbase5-dev libqt5opengl5-dev - - To compile with **CUDA support**, also install Ubuntu's default CUDA package:: - -@@ -121,11 +132,6 @@ Run COLMAP:: - colmap -h - colmap gui - --Under **Ubuntu 18.04**, the CMake configuration scripts of CGAL are broken and --you must also install the CGAL Qt5 package:: -- -- sudo apt-get install libcgal-qt5-dev -- - Under **Ubuntu 22.04**, there is a problem when compiling with Ubuntu's default - CUDA package and GCC, and you must compile against GCC 10:: - -@@ -150,14 +156,14 @@ Dependencies from `Homebrew `__:: - ninja \ - boost \ - eigen \ -- freeimage \ -+ openimageio \ - curl \ - libomp \ - metis \ - glog \ - googletest \ - ceres-solver \ -- qt5 \ -+ qt \ - glew \ - cgal \ - sqlite3 -@@ -169,18 +175,15 @@ Configure and compile COLMAP:: - cd colmap - mkdir build - cd build -- cmake .. \ -- -GNinja \ -- -DQt5_DIR="$(brew --prefix qt@5)/lib/cmake/Qt5" -+ cmake -GNinja - ninja - sudo ninja install - --If you have Qt 6 installed on your system as well, you might have to temporarily -+If you have Qt 5 installed on your system as well, you might have to temporarily - link your Qt 5 installation while configuring CMake:: - -- brew link qt5 -- cmake ... (from previous code block) -- brew unlink qt5 -+ brew unlink qt && brew link --force qt -+ cmake ... - - Run COLMAP:: - -@@ -329,7 +332,7 @@ with the source code ``hello_world.cc``:: - } - - Then compile and run your code as:: -- -+ - mkdir build - cd build - export colmap_DIR=${CMAKE_INSTALL_PREFIX}/share/colmap -diff --git a/doc/pycolmap/index.rst b/doc/pycolmap/index.rst -index f532102e..2048f78e 100644 ---- a/doc/pycolmap/index.rst -+++ b/doc/pycolmap/index.rst -@@ -27,7 +27,7 @@ from source, follow these steps: - * On Windows, after installing COLMAP via VCPKG, run in powershell:: - - python -m pip install . ` -- --cmake.define.CMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` -+ --cmake.define.CMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" ` - --cmake.define.VCPKG_TARGET_TRIPLET="x64-windows" - - Some features, such as cost functions, require that `PyCeres -diff --git a/doc/tutorial.rst b/doc/tutorial.rst -index 939b462e..70edc085 100755 ---- a/doc/tutorial.rst -+++ b/doc/tutorial.rst -@@ -163,14 +163,13 @@ Data Structure - - COLMAP assumes that all input images are in one input directory with potentially - nested sub-directories. It recursively considers all images stored in this --directory, and it supports various different image formats (see `FreeImage --`_). Other files are --automatically ignored. If high performance is a requirement, then you should --separate any files that are not images. Images are identified uniquely by their --relative file path. For later processing, such as image undistortion or dense --reconstruction, the relative folder structure should be preserved. COLMAP does --not modify the input images or directory and all extracted data is stored in a --single, self-contained SQLite database file (see :doc:`database`). -+directory, and it supports various different image formats by OpenImageIO. Other -+files are automatically ignored. If high performance is a requirement, then you -+should separate any files that are not images. Images are identified uniquely by -+their relative file path. For later processing, such as image undistortion or -+dense reconstruction, the relative folder structure should be preserved. COLMAP -+does not modify the input images or directory and all extracted data is stored -+in a single, self-contained SQLite database file (see :doc:`database`). - - The first step is to start the graphical user interface of COLMAP by running the - pre-built binaries (Windows: ``COLMAP.bat``, Mac: ``COLMAP.app``) or by executing -diff --git a/docker/Dockerfile b/docker/Dockerfile -index d1a339cc..1c62bccf 100644 ---- a/docker/Dockerfile -+++ b/docker/Dockerfile -@@ -24,20 +24,28 @@ RUN apt-get update && \ - libboost-graph-dev \ - libboost-system-dev \ - libeigen3-dev \ -- libfreeimage-dev \ -+ libopenimageio-dev \ -+ openimageio-tools \ - libmetis-dev \ - libgoogle-glog-dev \ - libgtest-dev \ - libgmock-dev \ - libsqlite3-dev \ - libglew-dev \ -- qtbase5-dev \ -- libqt5opengl5-dev \ -+ qt6-base-dev \ -+ libqt6opengl6-dev \ -+ libqt6openglwidgets6 \ - libcgal-dev \ - libceres-dev \ - libcurl4-openssl-dev \ -+ libssl-dev \ - libmkl-full-dev - -+# Fix issue in Ubuntu's openimageio CMake config. -+# We don't depend on any of openimageio's OpenCV functionality, -+# but it still requires the OpenCV include directory to exist. -+RUN mkdir -p /usr/include/opencv4 -+ - # Build and install COLMAP. - RUN git clone https://github.com/colmap/colmap.git - RUN cd colmap && \ -@@ -68,15 +76,17 @@ RUN apt-get update && \ - libopengl0 \ - libmetis5 \ - libceres4t64 \ -- libfreeimage3 \ -+ libopenimageio2.4t64 \ - libgcc-s1 \ - libgl1 \ - libglew2.2 \ - libgoogle-glog0v6t64 \ -- libqt5core5a \ -- libqt5gui5 \ -- libqt5widgets5 \ -+ libqt6core6 \ -+ libqt6gui6 \ -+ libqt6widgets6 \ -+ libqt6openglwidgets6 \ - libcurl4 \ -+ libssl3t64 \ - libmkl-locale \ - libmkl-intel-lp64 \ - libmkl-intel-thread \ -diff --git a/pyproject.toml b/pyproject.toml -index 0afede3b..9a2922d2 100644 ---- a/pyproject.toml -+++ b/pyproject.toml -@@ -1,7 +1,7 @@ - [build-system] - requires = [ - "scikit-build-core>=0.3.3", -- "pybind11==3.0.0", -+ "pybind11==3.0.1", - "pybind11_stubgen @ git+https://github.com/sarlinpe/pybind11-stubgen@sarlinpe/fix-2025-08-20", - "numpy", - "ruff==0.12.7", -@@ -44,9 +44,6 @@ archs = ["auto64"] - test-requires = "pytest mypy==1.17.0 enlighten==1.13.0" - test-command = "python -c \"import pycolmap; print(pycolmap.__version__)\" && python -m mypy --package pycolmap --implicit-optional && pytest {project}/python/examples/custom_incremental_pipeline_test.py" - --[tool.cibuildwheel.environment] --VCPKG_COMMIT_ID = "0cb95c860ea83aafc1b24350510b30dec535989a" -- - [tool.cibuildwheel.linux] - before-all = "{project}/python/ci/install-colmap-almalinux.sh" - -diff --git a/python/README.md b/python/README.md -index e0dfda95..6a889454 100644 ---- a/python/README.md -+++ b/python/README.md -@@ -28,7 +28,7 @@ python -m pip install . - - On Windows, after installing COLMAP [via VCPKG](https://colmap.github.io/install.html#id3), run in powershell: - ```powershell - python -m pip install . ` -- --cmake.define.CMAKE_TOOLCHAIN_FILE="$VCPKG_INSTALLATION_ROOT/scripts/buildsystems/vcpkg.cmake" ` -+ --cmake.define.CMAKE_TOOLCHAIN_FILE="$VCPKG_ROOT/scripts/buildsystems/vcpkg.cmake" ` - --cmake.define.VCPKG_TARGET_TRIPLET="x64-windows" - ``` - -diff --git a/python/ci/install-colmap-almalinux.sh b/python/ci/install-colmap-almalinux.sh -index a93393b8..4adfb7e0 100755 ---- a/python/ci/install-colmap-almalinux.sh -+++ b/python/ci/install-colmap-almalinux.sh -@@ -38,7 +38,6 @@ export PATH="${COMPILER_TOOLS_DIR}:${PATH}" - # Setup vcpkg - git clone https://github.com/microsoft/vcpkg ${VCPKG_INSTALLATION_ROOT} - cd ${VCPKG_INSTALLATION_ROOT} --git checkout ${VCPKG_COMMIT_ID} - ./bootstrap-vcpkg.sh - ./vcpkg integrate install - -diff --git a/python/ci/install-colmap-macos.sh b/python/ci/install-colmap-macos.sh -index 7c403ce3..c688f2ba 100755 ---- a/python/ci/install-colmap-macos.sh -+++ b/python/ci/install-colmap-macos.sh -@@ -5,7 +5,7 @@ CURRDIR=$(pwd) - # Fix `brew link` error. - find /usr/local/bin -lname '*/Library/Frameworks/Python.framework/*' -delete - --brew update -+brew uninstall cmake # Workaround for CI failures. - brew install git cmake ninja gfortran ccache libomp - brew link --force libomp - -@@ -17,7 +17,6 @@ ln -sf $(which gfortran-14) "$(dirname $(which gfortran-14))/gfortran" - # Setup vcpkg - git clone https://github.com/microsoft/vcpkg ${VCPKG_INSTALLATION_ROOT} - cd ${VCPKG_INSTALLATION_ROOT} --git checkout ${VCPKG_COMMIT_ID} - ./bootstrap-vcpkg.sh - ./vcpkg integrate install - -diff --git a/python/ci/install-colmap-windows.ps1 b/python/ci/install-colmap-windows.ps1 -index 7ccb763b..5653d177 100755 ---- a/python/ci/install-colmap-windows.ps1 -+++ b/python/ci/install-colmap-windows.ps1 -@@ -12,12 +12,11 @@ If (!(Test-Path -path "${COMPILER_TOOLS_DIR}/ccache.exe" -PathType Leaf)) { - cd ${CURRDIR} - git clone https://github.com/microsoft/vcpkg ${env:VCPKG_INSTALLATION_ROOT} - cd ${env:VCPKG_INSTALLATION_ROOT} --git checkout "${env:VCPKG_COMMIT_ID}" - ./bootstrap-vcpkg.bat - - cd ${CURRDIR} - & "./scripts/shell/enter_vs_dev_shell.ps1" --& "${env:VCPKG_INSTALLATION_ROOT}/vcpkg.exe" integrate install -+& "${env:VCPKG_ROOT}/vcpkg.exe" integrate install - - # Build COLMAP - mkdir build -diff --git a/python/ci/test-colmap-windows.ps1 b/python/ci/test-colmap-windows.ps1 -index bf1bfd67..3cfc6eed 100644 ---- a/python/ci/test-colmap-windows.ps1 -+++ b/python/ci/test-colmap-windows.ps1 -@@ -1,4 +1,4 @@ --& "./scripts/shell/enter_vs_dev_shell.ps1" --& "${env:VCPKG_INSTALLATION_ROOT}/vcpkg.exe" integrate install -+& "$PSScriptRoot/../../scripts/shell/enter_vs_dev_shell.ps1" -+& "${env:VCPKG_ROOT}/vcpkg.exe" integrate install - - & python -c "import pycolmap; print(pycolmap.__version__)" -diff --git a/python/examples/custom_bundle_adjustment.py b/python/examples/custom_bundle_adjustment.py -index 5e5aaed6..a43935b5 100644 ---- a/python/examples/custom_bundle_adjustment.py -+++ b/python/examples/custom_bundle_adjustment.py -@@ -4,6 +4,7 @@ C++ with equivalent logic. As a result, one can add customized residuals on top - of the exposed ceres problem from conventional bundle adjustment. - """ - -+import collections - import copy - - import pycolmap -@@ -60,6 +61,10 @@ def adjust_global_bundle(mapper, mapper_options, ba_options): - if frame_id in mapper.existing_frame_ids: - ba_config.set_constant_rig_from_world_pose(frame_id) - -+ for rig_id in mapper_options.constant_rigs: -+ for sensor_id in reconstruction.rig(rig_id).sensors: -+ ba_config.set_constant_sensor_from_rig_pose(sensor_id) -+ - for camera_id in mapper_options.constant_cameras: - ba_config.set_constant_cam_intrinsics(camera_id) - -@@ -145,24 +150,22 @@ def adjust_local_bundle( - ba_config.set_constant_rig_from_world_pose(frame_id) - - # Fix rig poses, if not all frames within the local bundle. -- num_frames_per_rig = {} -+ num_frames_per_rig = collections.defaultdict(int) - for frame_id in frame_ids: - frame = reconstruction.frame(frame_id) -- if frame.rig_id not in num_frames_per_rig: -- num_frames_per_rig[frame.rig_id] = 0 - num_frames_per_rig[frame.rig_id] += 1 - for rig_id, num_frames_local in num_frames_per_rig.items(): -- if num_frames_local < mapper.num_reg_frames_per_rig[rig_id]: -- rig = reconstruction.rig(rig_id) -- for sensor_id, _ in rig.sensors.items(): -+ if ( -+ rig_id in mapper_options.constant_rigs -+ or num_frames_local < mapper.num_reg_frames_per_rig[rig_id] -+ ): -+ for sensor_id in reconstruction.rig(rig_id).sensors: - ba_config.set_constant_sensor_from_rig_pose(sensor_id) - - # Fix camera intrinsics, if not all images within local bundle. -- num_images_per_camera = {} -+ num_images_per_camera = collections.defaultdict(int) - for image_id in ba_config.images: - image = reconstruction.images[image_id] -- if image.camera_id not in num_images_per_camera: -- num_images_per_camera[image.camera_id] = 0 - num_images_per_camera[image.camera_id] += 1 - for camera_id, num_images_local in num_images_per_camera.items(): - if ( -diff --git a/scripts/shell/build_mac_app.sh b/scripts/shell/build_mac_app.sh -index 499f5c59..ff01b88b 100755 ---- a/scripts/shell/build_mac_app.sh -+++ b/scripts/shell/build_mac_app.sh -@@ -66,7 +66,11 @@ install_name_tool -change @rpath/libtbb.dylib /usr/local/lib/libtbb.dylib $BASE_ - install_name_tool -change @rpath/libtbbmalloc.dylib /usr/local/lib/libtbbmalloc.dylib $BASE_PATH/COLMAP.app/Contents/MacOS/COLMAP - - echo "Linking dynamic libraries" --/usr/local/opt/qt5/bin/macdeployqt "$BASE_PATH/COLMAP.app" -+if [ -d "$(brew --prefix)/opt/qt6" ]; then -+ $(brew --prefix)/opt/qt6/bin/macdeployqt "$BASE_PATH/COLMAP.app" -+else -+ $(brew --prefix)/opt/qt5/bin/macdeployqt "$BASE_PATH/COLMAP.app" -+fi - - echo "Wrapping binary" - cat <"$BASE_PATH/COLMAP.app/Contents/MacOS/colmap_gui.sh" -diff --git a/src/colmap/controllers/automatic_reconstruction.cc b/src/colmap/controllers/automatic_reconstruction.cc -index dac39310..ea0eb484 100644 ---- a/src/colmap/controllers/automatic_reconstruction.cc -+++ b/src/colmap/controllers/automatic_reconstruction.cc -@@ -96,6 +96,7 @@ AutomaticReconstructionController::AutomaticReconstructionController( - - ImageReaderOptions& reader_options = *option_manager_.image_reader; - reader_options.image_path = *option_manager_.image_path; -+ reader_options.as_rgb = option_manager_.feature_extraction->RequiresRGB(); - if (!options_.mask_path.empty()) { - reader_options.mask_path = options_.mask_path; - option_manager_.image_reader->mask_path = options_.mask_path; -diff --git a/src/colmap/controllers/feature_extraction.cc b/src/colmap/controllers/feature_extraction.cc -index dc75e29d..6b613a05 100644 ---- a/src/colmap/controllers/feature_extraction.cc -+++ b/src/colmap/controllers/feature_extraction.cc -@@ -204,7 +204,7 @@ class FeatureExtractorThread : public Thread { - &image_data.keypoints, - &image_data.descriptors); - } -- if (image_data.mask.Data()) { -+ if (!image_data.mask.IsEmpty()) { - MaskKeypoints(image_data.mask, - &image_data.keypoints, - &image_data.descriptors); -@@ -214,7 +214,9 @@ class FeatureExtractorThread : public Thread { - } - } - -- image_data.bitmap.Deallocate(); -+ // Release the memory, since it is not used afterwards. -+ image_data.bitmap = Bitmap(); -+ image_data.mask = Bitmap(); - - output_queue_->Push(std::move(image_data)); - } else { -@@ -281,7 +283,7 @@ class FeatureWriterThread : public Thread { - image_data.camera.has_prior_focal_length ? " (Prior)" : ""); - LOG(INFO) << " Features: " << image_data.keypoints.size() - << " (" << extractor_type_str_ << ")"; -- if (image_data.mask.Data()) { -+ if (!image_data.mask.IsEmpty()) { - LOG(INFO) << " Mask: Yes"; - } - -@@ -367,11 +369,12 @@ class FeatureExtractorController : public Thread { - extractor_queue_ = std::make_unique>(kQueueSize); - writer_queue_ = std::make_unique>(kQueueSize); - -- const int max_image_size = extraction_options_.MaxImageSize(); -- if (max_image_size > 0) { -+ if (extraction_options_.max_image_size > 0) { - for (int i = 0; i < num_threads; ++i) { - resizers_.emplace_back(std::make_unique( -- max_image_size, resizer_queue_.get(), extractor_queue_.get())); -+ extraction_options_.max_image_size, -+ resizer_queue_.get(), -+ extractor_queue_.get())); - } - } - -@@ -403,7 +406,8 @@ class FeatureExtractorController : public Thread { - } else { - const static FeatureExtractionOptions kDefaultExtractionOptions; - if (extraction_options_.num_threads == -1 && -- max_image_size == kDefaultExtractionOptions.MaxImageSize() && -+ extraction_options_.max_image_size == -+ kDefaultExtractionOptions.max_image_size && - extraction_options_.sift->first_octave == - kDefaultExtractionOptions.sift->first_octave) { - LOG(WARNING) -@@ -455,7 +459,7 @@ class FeatureExtractorController : public Thread { - } - } - -- const bool should_resize = extraction_options_.MaxImageSize() > 0; -+ const bool should_resize = extraction_options_.max_image_size > 0; - - while (image_reader_.NextIndex() < image_reader_.NumImages()) { - if (IsStopped()) { -@@ -475,7 +479,9 @@ class FeatureExtractorController : public Thread { - &image_data.mask); - - if (image_data.status != ImageReader::Status::SUCCESS) { -- image_data.bitmap.Deallocate(); -+ // Release the memory, since it is not used afterwards. -+ image_data.bitmap = Bitmap(); -+ image_data.mask = Bitmap(); - } - - if (should_resize) { -diff --git a/src/colmap/controllers/image_reader.cc b/src/colmap/controllers/image_reader.cc -index ae38ac93..0c6a3c12 100644 ---- a/src/colmap/controllers/image_reader.cc -+++ b/src/colmap/controllers/image_reader.cc -@@ -135,7 +135,7 @@ ImageReader::Status ImageReader::Next(Rig* rig, - // Read image. - ////////////////////////////////////////////////////////////////////////////// - -- if (!bitmap->Read(image_path, false)) { -+ if (!bitmap->Read(image_path, /*as_rgb=*/options_.as_rgb)) { - return Status::BITMAP_ERROR; - } - -diff --git a/src/colmap/controllers/image_reader.h b/src/colmap/controllers/image_reader.h -index 9527fb40..ebd04313 100644 ---- a/src/colmap/controllers/image_reader.h -+++ b/src/colmap/controllers/image_reader.h -@@ -82,6 +82,9 @@ struct ImageReaderOptions { - // value `default_focal_length_factor * max(width, height)`. - double default_focal_length_factor = 1.2; - -+ // Whether to read images as grayscale or RGB. -+ bool as_rgb = false; -+ - bool Check() const; - }; - -diff --git a/src/colmap/controllers/image_reader_test.cc b/src/colmap/controllers/image_reader_test.cc -index 5ac7c083..6bace906 100644 ---- a/src/colmap/controllers/image_reader_test.cc -+++ b/src/colmap/controllers/image_reader_test.cc -@@ -40,9 +40,8 @@ - namespace colmap { - namespace { - --Bitmap CreateTestBitmap() { -- Bitmap bitmap; -- bitmap.Allocate(1, 3, false); -+Bitmap CreateTestBitmap(bool as_rgb) { -+ Bitmap bitmap(1, 3, as_rgb); - bitmap.SetPixel(0, 0, BitmapColor(1)); - bitmap.SetPixel(1, 0, BitmapColor(2)); - bitmap.SetPixel(2, 0, BitmapColor(3)); -@@ -50,25 +49,26 @@ Bitmap CreateTestBitmap() { - } - - class ParameterizedImageReaderTests -- : public ::testing::TestWithParam< -- std::tuple> {}; -+ : public ::testing::TestWithParam> {}; - - TEST_P(ParameterizedImageReaderTests, Nominal) { -- const auto [kNumImages, kWithMasks, kWithExistingImages] = GetParam(); -+ const auto [kNumImages, kWithMasks, kWithExistingImages, kAsRGB] = GetParam(); - - auto database = Database::Open(kInMemorySqliteDatabasePath); - - const std::string test_dir = CreateTestDir(); - ImageReaderOptions options; - options.image_path = test_dir + "/images"; -+ options.as_rgb = kAsRGB; - CreateDirIfNotExists(options.image_path); - if (kWithMasks) { - options.mask_path = test_dir + "/masks"; - CreateDirIfNotExists(options.mask_path); - } -- const Bitmap test_bitmap = CreateTestBitmap(); -+ const Bitmap test_bitmap = CreateTestBitmap(kAsRGB); - for (int i = 0; i < kNumImages; ++i) { - const std::string image_name = std::to_string(i) + ".png"; - test_bitmap.Write(options.image_path + "/" + image_name); -@@ -117,8 +117,8 @@ TEST_P(ParameterizedImageReaderTests, Nominal) { - EXPECT_EQ(camera.width, test_bitmap.Width()); - EXPECT_EQ(camera.height, test_bitmap.Height()); - EXPECT_EQ(image.Name(), std::to_string(i) + ".png"); -- EXPECT_EQ(bitmap.ConvertToRowMajorArray(), -- test_bitmap.ConvertToRowMajorArray()); -+ EXPECT_EQ(bitmap.IsRGB(), kAsRGB); -+ EXPECT_EQ(bitmap.RowMajorData(), test_bitmap.RowMajorData()); - if (kWithExistingImages) { - EXPECT_EQ(database->NumRigs(), kNumImages); - EXPECT_EQ(database->NumCameras(), kNumImages); -@@ -135,12 +135,29 @@ TEST_P(ParameterizedImageReaderTests, Nominal) { - EXPECT_EQ(database->NumCameras(), kNumImages); - } - --INSTANTIATE_TEST_SUITE_P(ImageReaderTests, -- ParameterizedImageReaderTests, -- ::testing::Values(std::make_tuple(0, false, true), -- std::make_tuple(5, false, false), -- std::make_tuple(5, true, false), -- std::make_tuple(5, false, true))); -+INSTANTIATE_TEST_SUITE_P( -+ ImageReaderTests, -+ ParameterizedImageReaderTests, -+ ::testing::Values(std::make_tuple(/*num_images=*/0, -+ /*with_masks=*/false, -+ /*with_existing_images=*/true, -+ /*as_rgb=*/true), -+ std::make_tuple(/*num_images=*/5, -+ /*with_masks=*/false, -+ /*with_existing_images=*/false, -+ /*as_rgb=*/true), -+ std::make_tuple(/*num_images=*/5, -+ /*with_masks=*/true, -+ /*with_existing_images=*/false, -+ /*as_rgb=*/true), -+ std::make_tuple(/*num_images=*/5, -+ /*with_masks=*/true, -+ /*with_existing_images=*/false, -+ /*as_rgb=*/false), -+ std::make_tuple(/*num_images=*/5, -+ /*with_masks=*/false, -+ /*with_existing_images=*/true, -+ /*as_rgb=*/true))); - - } // namespace - } // namespace colmap -diff --git a/src/colmap/controllers/incremental_pipeline.cc b/src/colmap/controllers/incremental_pipeline.cc -index 348bd053..13654b55 100644 ---- a/src/colmap/controllers/incremental_pipeline.cc -+++ b/src/colmap/controllers/incremental_pipeline.cc -@@ -87,6 +87,7 @@ IncrementalMapper::Options IncrementalPipelineOptions::Mapper() const { - options.num_threads = num_threads; - options.local_ba_num_images = ba_local_num_images; - options.fix_existing_frames = fix_existing_frames; -+ options.constant_rigs = constant_rigs; - options.constant_cameras = constant_cameras; - options.use_prior_position = use_prior_position; - options.use_robust_loss_on_prior_position = use_robust_loss_on_prior_position; -diff --git a/src/colmap/controllers/incremental_pipeline.h b/src/colmap/controllers/incremental_pipeline.h -index bdc52e0e..9dd5d742 100644 ---- a/src/colmap/controllers/incremental_pipeline.h -+++ b/src/colmap/controllers/incremental_pipeline.h -@@ -153,6 +153,10 @@ struct IncrementalPipelineOptions { - // If reconstruction is provided as input, fix the existing frame poses. - bool fix_existing_frames = false; - -+ // List of rigs for which to fix the sensor_from_rig transformation, -+ // independent of ba_refine_sensor_from_rig. -+ std::unordered_set constant_rigs; -+ - // List of cameras for which to fix the camera parameters independent - // of refine_focal_length, refine_principal_point, and refine_extra_params. - std::unordered_set constant_cameras; -diff --git a/src/colmap/controllers/incremental_pipeline_test.cc b/src/colmap/controllers/incremental_pipeline_test.cc -index 6e8b2037..a17a1589 100644 ---- a/src/colmap/controllers/incremental_pipeline_test.cc -+++ b/src/colmap/controllers/incremental_pipeline_test.cc -@@ -30,6 +30,7 @@ - #include "colmap/controllers/incremental_pipeline.h" - - #include "colmap/estimators/alignment.h" -+#include "colmap/geometry/rigid3_matchers.h" - #include "colmap/scene/database.h" - #include "colmap/scene/synthetic.h" - #include "colmap/util/testing.h" -@@ -84,6 +85,15 @@ bool AreReconstructionsIdentical(const Reconstruction& gt, - return false; - } - -+ for (const auto& [camera_id, camera] : gt.Cameras()) { -+ if (!computed.ExistsCamera(camera_id)) { -+ return false; -+ } -+ if (camera.params != computed.Camera(camera_id).params) { -+ return false; -+ } -+ } -+ - for (const auto& [image_id, image] : computed.Images()) { - if (!gt.ExistsImage(image_id)) { - return false; -@@ -106,16 +116,6 @@ bool AreReconstructionsIdentical(const Reconstruction& gt, - return true; - } - --void ExpectReconstructionsIdentical(const Reconstruction& gt, -- const Reconstruction& computed) { -- EXPECT_TRUE(AreReconstructionsIdentical(gt, computed)); --} -- --void ExpectReconstructionsDifferent(const Reconstruction& gt, -- const Reconstruction& computed) { -- EXPECT_FALSE(AreReconstructionsIdentical(gt, computed)); --} -- - TEST(IncrementalPipeline, WithoutNoise) { - const std::string database_path = CreateTestDir() + "/database.db"; - -@@ -185,6 +185,59 @@ TEST(IncrementalPipeline, WithoutNoiseAndWithNonTrivialFrames) { - } - } - -+TEST(IncrementalPipeline, WithNonTrivialFramesAndConstantRigsAndCameras) { -+ const std::string database_path = CreateTestDir() + "/database.db"; -+ -+ auto database = Database::Open(database_path); -+ Reconstruction gt_reconstruction; -+ SyntheticDatasetOptions synthetic_dataset_options; -+ synthetic_dataset_options.num_rigs = 2; -+ synthetic_dataset_options.num_cameras_per_rig = 2; -+ synthetic_dataset_options.num_frames_per_rig = 7; -+ synthetic_dataset_options.num_points3D = 100; -+ synthetic_dataset_options.point2D_stddev = 0; -+ synthetic_dataset_options.camera_has_prior_focal_length = false; -+ synthetic_dataset_options.sensor_from_rig_translation_stddev = 0.05; -+ synthetic_dataset_options.sensor_from_rig_rotation_stddev = 30; -+ SynthesizeDataset( -+ synthetic_dataset_options, >_reconstruction, database.get()); -+ -+ constexpr int kConstantRigId = 1; -+ constexpr int kConstantCameraId = 1; -+ -+ auto reconstruction_manager = std::make_shared(); -+ auto options = std::make_shared(); -+ options->constant_rigs.insert(kConstantRigId); -+ options->constant_cameras.insert(kConstantCameraId); -+ IncrementalPipeline mapper(options, -+ /*image_path=*/"", -+ database_path, -+ reconstruction_manager); -+ mapper.Run(); -+ -+ ASSERT_EQ(reconstruction_manager->Size(), 1); -+ auto& reconstruction = *reconstruction_manager->Get(0); -+ ExpectReconstructionsNear(gt_reconstruction, -+ reconstruction, -+ /*max_rotation_error_deg=*/1e-2, -+ /*max_proj_center_error=*/1e-3, -+ /*num_obs_tolerance=*/0, -+ /*align=*/true, -+ /*check_scale=*/true); -+ -+ for (const auto& [sensor_id, sensor_from_rig] : -+ reconstruction.Rig(kConstantRigId).Sensors()) { -+ EXPECT_THAT( -+ sensor_from_rig.value(), -+ Rigid3dNear( -+ gt_reconstruction.Rig(kConstantRigId).SensorFromRig(sensor_id), -+ /*rtol=*/1e-6, -+ /*ttol=*/1e-6)); -+ } -+ EXPECT_EQ(reconstruction.Camera(kConstantCameraId).params, -+ gt_reconstruction.Camera(kConstantCameraId).params); -+} -+ - TEST(IncrementalPipeline, WithoutNoiseAndWithPanoramicNonTrivialFrames) { - const std::string database_path = CreateTestDir() + "/database.db"; - -@@ -570,6 +623,8 @@ TEST(IncrementalPipeline, GPSPriorBasedSfMWithNoise) { - } - - TEST(IncrementalPipeline, SfMWithRandomSeedStability) { -+ SetPRNGSeed(1); -+ - const std::string database_path = CreateTestDir() + "/database.db"; - - auto database = Database::Open(database_path); -@@ -577,9 +632,9 @@ TEST(IncrementalPipeline, SfMWithRandomSeedStability) { - SyntheticDatasetOptions synthetic_dataset_options; - synthetic_dataset_options.num_rigs = 2; - synthetic_dataset_options.num_cameras_per_rig = 1; -- synthetic_dataset_options.num_frames_per_rig = 7; -+ synthetic_dataset_options.num_frames_per_rig = 5; - synthetic_dataset_options.num_points3D = 100; -- synthetic_dataset_options.point2D_stddev = 2.5; -+ synthetic_dataset_options.point2D_stddev = 1; - synthetic_dataset_options.use_prior_position = false; - SynthesizeDataset( - synthetic_dataset_options, >_reconstruction, database.get()); -@@ -600,48 +655,53 @@ TEST(IncrementalPipeline, SfMWithRandomSeedStability) { - return reconstruction_manager; - }; - -- // Single-thread execution -+ // Single-threaded execution. - { -+ constexpr int kRandomSeed = 42; - auto reconstruction_manager0 = -- run_mapper(/*num_threads=*/1, /*random_seed=*/42); -+ run_mapper(/*num_threads=*/1, /*random_seed=*/kRandomSeed); - auto reconstruction_manager1 = -- run_mapper(/*num_threads=*/1, /*random_seed=*/42); -- // Same seed should produce identical reconstructions in single-thread mode -- -- ExpectReconstructionsIdentical(*reconstruction_manager0->Get(0), -- *reconstruction_manager1->Get(0)); -- -- // Different seed should produce different reconstructions -- auto reconstruction_manager2 = -- run_mapper(/*num_threads=*/1, /*random_seed=*/123); -- ExpectReconstructionsDifferent(*reconstruction_manager0->Get(0), -- *reconstruction_manager2->Get(0)); -+ run_mapper(/*num_threads=*/1, /*random_seed=*/kRandomSeed); -+ EXPECT_TRUE(AreReconstructionsIdentical(*reconstruction_manager0->Get(0), -+ *reconstruction_manager1->Get(0))); -+ -+ // Different seed should produce different reconstructions. Notice that, for -+ // some seeds, we may still get identical results, so we try a few different -+ // seeds until we get a different result. -+ bool different_result = false; -+ for (int random_seed = kRandomSeed + 1; random_seed < kRandomSeed + 10; -+ ++random_seed) { -+ auto reconstruction_manager2 = -+ run_mapper(/*num_threads=*/1, /*random_seed=*/random_seed); -+ if (!AreReconstructionsIdentical(*reconstruction_manager0->Get(0), -+ *reconstruction_manager2->Get(0))) { -+ different_result = true; -+ break; -+ } -+ } -+ EXPECT_TRUE(different_result); - } - -- // Multi-thread execution -+ // Multi-threaded execution. - { - auto reconstruction_manager0 = - run_mapper(/*num_threads=*/-1, /*random_seed=*/42); - auto reconstruction_manager1 = - run_mapper(/*num_threads=*/-1, /*random_seed=*/42); - // Same seed should produce similar results, up to floating-point variations -- // in optimization -+ // in optimization. - ExpectReconstructionsNear(*reconstruction_manager0->Get(0), - *reconstruction_manager1->Get(0), -- /*max_rotation_error_deg=*/1e-14, -- /*max_proj_center_error=*/1e-14, -+ /*max_rotation_error_deg=*/1e-10, -+ /*max_proj_center_error=*/1e-10, - /*num_obs_tolerance=*/0.01, - /*align=*/false); -- -- auto reconstruction_manager2 = -- run_mapper(/*num_threads=*/-1, /*random_seed=*/123); -- // Different seed may produce different reconstructions -- ExpectReconstructionsDifferent(*reconstruction_manager0->Get(0), -- *reconstruction_manager2->Get(0)); - } - } - - TEST(IncrementalPipeline, PriorBasedSfMWithRandomSeedStability) { -+ SetPRNGSeed(1); -+ - const std::string database_path = CreateTestDir() + "/database.db"; - - auto database = Database::Open(database_path); -@@ -651,11 +711,11 @@ TEST(IncrementalPipeline, PriorBasedSfMWithRandomSeedStability) { - synthetic_dataset_options.num_cameras_per_rig = 1; - synthetic_dataset_options.num_frames_per_rig = 7; - synthetic_dataset_options.num_points3D = 100; -- synthetic_dataset_options.point2D_stddev = 2.5; -+ synthetic_dataset_options.point2D_stddev = 1; - synthetic_dataset_options.use_prior_position = true; - SynthesizeDataset( - synthetic_dataset_options, >_reconstruction, database.get()); -- synthetic_dataset_options.prior_position_stddev = 2.0; -+ synthetic_dataset_options.prior_position_stddev = 1.0; - - auto mapper_options = std::make_shared(); - mapper_options->use_prior_position = false; -@@ -673,43 +733,48 @@ TEST(IncrementalPipeline, PriorBasedSfMWithRandomSeedStability) { - return reconstruction_manager; - }; - -- // Single-thread execution -+ // Single-threaded execution. - { -+ constexpr int kRandomSeed = 42; - auto reconstruction_manager0 = -- run_mapper(/*num_threads=*/1, /*random_seed=*/42); -+ run_mapper(/*num_threads=*/1, /*random_seed=*/kRandomSeed); - auto reconstruction_manager1 = -- run_mapper(/*num_threads=*/1, /*random_seed=*/42); -- // Same seed should produce identical reconstructions in single-thread mode -- ExpectReconstructionsIdentical(*reconstruction_manager0->Get(0), -- *reconstruction_manager1->Get(0)); -- -- // Different seed should produce different reconstructions -- auto reconstruction_manager2 = -- run_mapper(/*num_threads=*/1, /*random_seed=*/123); -- ExpectReconstructionsDifferent(*reconstruction_manager0->Get(0), -- *reconstruction_manager2->Get(0)); -+ run_mapper(/*num_threads=*/1, /*random_seed=*/kRandomSeed); -+ EXPECT_TRUE(AreReconstructionsIdentical(*reconstruction_manager0->Get(0), -+ *reconstruction_manager1->Get(0))); -+ -+ // Different seed should produce different reconstructions. Notice that, for -+ // some seeds, we may still get identical results, so we try a few different -+ // seeds until we get a different result. -+ bool different_result = false; -+ for (int random_seed = kRandomSeed + 1; random_seed < kRandomSeed + 10; -+ ++random_seed) { -+ // Different seed should produce different reconstructions. -+ auto reconstruction_manager2 = -+ run_mapper(/*num_threads=*/1, /*random_seed=*/random_seed); -+ if (!AreReconstructionsIdentical(*reconstruction_manager0->Get(0), -+ *reconstruction_manager2->Get(0))) { -+ different_result = true; -+ break; -+ } -+ } -+ EXPECT_TRUE(different_result); - } - -- // Multi-thread execution -+ // Multi-threaded execution. - { - auto reconstruction_manager0 = - run_mapper(/*num_threads=*/-1, /*random_seed=*/42); - auto reconstruction_manager1 = - run_mapper(/*num_threads=*/-1, /*random_seed=*/42); - // Same seed should produce similar results, up to floating-point variations -- // in optimization -+ // in optimization. - ExpectReconstructionsNear(*reconstruction_manager0->Get(0), - *reconstruction_manager1->Get(0), -- /*max_rotation_error_deg=*/1e-13, -- /*max_proj_center_error=*/1e-13, -+ /*max_rotation_error_deg=*/1e-10, -+ /*max_proj_center_error=*/1e-10, - /*num_obs_tolerance=*/0.01, - /*align=*/false); -- -- auto reconstruction_manager2 = -- run_mapper(/*num_threads=*/-1, /*random_seed=*/123); -- // Different seed may produce different reconstructions -- ExpectReconstructionsDifferent(*reconstruction_manager0->Get(0), -- *reconstruction_manager2->Get(0)); - } - } - -diff --git a/src/colmap/controllers/option_manager.cc b/src/colmap/controllers/option_manager.cc -index 06a5498b..14c421d4 100644 ---- a/src/colmap/controllers/option_manager.cc -+++ b/src/colmap/controllers/option_manager.cc -@@ -110,7 +110,7 @@ void OptionManager::ModifyForInternetData() { - } - - void OptionManager::ModifyForLowQuality() { -- feature_extraction->sift->max_image_size = 1000; -+ feature_extraction->max_image_size = 1000; - feature_extraction->sift->max_num_features = 2048; - sequential_pairing->loop_detection_num_images /= 2; - vocab_tree_pairing->max_num_features = 256; -@@ -131,7 +131,7 @@ void OptionManager::ModifyForLowQuality() { - } - - void OptionManager::ModifyForMediumQuality() { -- feature_extraction->sift->max_image_size = 1600; -+ feature_extraction->max_image_size = 1600; - feature_extraction->sift->max_num_features = 4096; - sequential_pairing->loop_detection_num_images /= 1.5; - vocab_tree_pairing->max_num_features = 1024; -@@ -153,7 +153,7 @@ void OptionManager::ModifyForMediumQuality() { - - void OptionManager::ModifyForHighQuality() { - feature_extraction->sift->estimate_affine_shape = true; -- feature_extraction->sift->max_image_size = 2400; -+ feature_extraction->max_image_size = 2400; - feature_extraction->sift->max_num_features = 8192; - feature_matching->guided_matching = true; - vocab_tree_pairing->max_num_features = 4096; -@@ -269,7 +269,7 @@ void OptionManager::AddFeatureExtractionOptions() { - &feature_extraction->gpu_index); - - AddAndRegisterDefaultOption("SiftExtraction.max_image_size", -- &feature_extraction->sift->max_image_size); -+ &feature_extraction->max_image_size); - AddAndRegisterDefaultOption("SiftExtraction.max_num_features", - &feature_extraction->sift->max_num_features); - AddAndRegisterDefaultOption("SiftExtraction.first_octave", -@@ -645,6 +645,8 @@ void OptionManager::AddMapperOptions() { - &mapper->mapper.local_ba_min_tri_angle); - - AddDefaultOption("Mapper.image_list_path", &mapper_image_list_path_); -+ AddDefaultOption("Mapper.constant_rig_list_path", -+ &mapper_constant_rig_list_path_); - AddDefaultOption("Mapper.constant_camera_list_path", - &mapper_constant_camera_list_path_); - -@@ -952,6 +954,12 @@ void OptionManager::Parse(const int argc, char** argv) { - if (!mapper_image_list_path_.empty()) { - mapper->image_names = ReadTextFileLines(mapper_image_list_path_); - } -+ if (!mapper_constant_rig_list_path_.empty()) { -+ for (const std::string& line : -+ ReadTextFileLines(mapper_constant_rig_list_path_)) { -+ mapper->constant_rigs.insert(std::stoi(line)); -+ } -+ } - if (!mapper_constant_camera_list_path_.empty()) { - for (const std::string& line : - ReadTextFileLines(mapper_constant_camera_list_path_)) { -diff --git a/src/colmap/controllers/option_manager.h b/src/colmap/controllers/option_manager.h -index 12bfe68a..3d5bffc6 100644 ---- a/src/colmap/controllers/option_manager.h -+++ b/src/colmap/controllers/option_manager.h -@@ -174,6 +174,7 @@ class OptionManager { - std::string feature_matching_type_; - - std::string mapper_image_list_path_; -+ std::string mapper_constant_rig_list_path_; - std::string mapper_constant_camera_list_path_; - - bool added_log_options_; -diff --git a/src/colmap/exe/feature.cc b/src/colmap/exe/feature.cc -index 59e2d8fa..122c048a 100644 ---- a/src/colmap/exe/feature.cc -+++ b/src/colmap/exe/feature.cc -@@ -106,6 +106,7 @@ int RunFeatureExtractor(int argc, char** argv) { - - ImageReaderOptions reader_options = *options.image_reader; - reader_options.image_path = *options.image_path; -+ reader_options.as_rgb = options.feature_extraction->RequiresRGB(); - - if (camera_mode >= 0) { - UpdateImageReaderOptionsFromCameraMode(reader_options, -diff --git a/src/colmap/exe/gui.cc b/src/colmap/exe/gui.cc -index 040f4427..19a35f02 100644 ---- a/src/colmap/exe/gui.cc -+++ b/src/colmap/exe/gui.cc -@@ -53,13 +53,15 @@ int RunGraphicalUserInterface(int argc, char** argv) { - options.Parse(argc, argv); - } - --#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) -- QApplication::setAttribute(Qt::AA_EnableHighDpiScaling); -- QApplication::setAttribute(Qt::AA_UseHighDpiPixmaps); --#endif -- - QApplication app(argc, argv); - -+#if (QT_VERSION >= QT_VERSION_CHECK(5, 6, 0)) && \ -+ (QT_VERSION < QT_VERSION_CHECK(6, 0, 0)) -+ app.setAttribute(Qt::AA_EnableHighDpiScaling); -+ app.setAttribute(Qt::AA_UseHighDpiPixmaps); -+#endif -+ app.setAttribute(Qt::AA_DontShowIconsInMenus, false); -+ - colmap::MainWindow main_window(options); - main_window.show(); - -diff --git a/src/colmap/feature/CMakeLists.txt b/src/colmap/feature/CMakeLists.txt -index c03e3643..0f3ebea9 100644 ---- a/src/colmap/feature/CMakeLists.txt -+++ b/src/colmap/feature/CMakeLists.txt -@@ -101,5 +101,5 @@ COLMAP_ADD_TEST( - colmap_util - ) - if(TESTS_ENABLED AND GUI_ENABLED) -- target_link_libraries(colmap_feature_sift_test Qt5::Widgets) -+ target_link_libraries(colmap_feature_sift_test Qt${QT_VERSION_MAJOR}::Widgets) - endif() -diff --git a/src/colmap/feature/extractor.cc b/src/colmap/feature/extractor.cc -index 730a3da2..45dfa1d3 100644 ---- a/src/colmap/feature/extractor.cc -+++ b/src/colmap/feature/extractor.cc -@@ -46,17 +46,18 @@ void ThrowUnknownFeatureExtractorType(FeatureExtractorType type) { - FeatureExtractionOptions::FeatureExtractionOptions(FeatureExtractorType type) - : type(type), sift(std::make_shared()) {} - --int FeatureExtractionOptions::MaxImageSize() const { -+bool FeatureExtractionOptions::RequiresRGB() const { - switch (type) { - case FeatureExtractorType::SIFT: -- return sift->max_image_size; -+ return false; - default: - ThrowUnknownFeatureExtractorType(type); - } -- return -1; -+ return false; - } - - bool FeatureExtractionOptions::Check() const { -+ CHECK_OPTION_GT(max_image_size, 0); - if (use_gpu) { - CHECK_OPTION_GT(CSVToVector(gpu_index).size(), 0); - #ifndef COLMAP_GPU_ENABLED -diff --git a/src/colmap/feature/extractor.h b/src/colmap/feature/extractor.h -index c6808a04..d2bcc7dc 100644 ---- a/src/colmap/feature/extractor.h -+++ b/src/colmap/feature/extractor.h -@@ -47,6 +47,9 @@ struct FeatureExtractionOptions { - - FeatureExtractorType type = FeatureExtractorType::SIFT; - -+ // Maximum image size, otherwise image will be down-scaled. -+ int max_image_size = 3200; -+ - // Number of threads for feature extraction. - int num_threads = -1; - -@@ -59,7 +62,8 @@ struct FeatureExtractionOptions { - - std::shared_ptr sift; - -- int MaxImageSize() const; -+ // Whether the selected extractor requires RGB (or grayscale) images. -+ bool RequiresRGB() const; - - bool Check() const; - }; -diff --git a/src/colmap/feature/sift.cc b/src/colmap/feature/sift.cc -index 9aeee62e..79265d65 100644 ---- a/src/colmap/feature/sift.cc -+++ b/src/colmap/feature/sift.cc -@@ -63,7 +63,6 @@ namespace colmap { - constexpr int kSqSiftDescriptorNorm = 512 * 512; - - bool SiftExtractionOptions::Check() const { -- CHECK_OPTION_GT(max_image_size, 0); - CHECK_OPTION_GT(max_num_features, 0); - CHECK_OPTION_GT(octave_resolution, 0); - CHECK_OPTION_GT(peak_threshold, 0.0); -@@ -157,7 +156,7 @@ class SiftCPUFeatureExtractor : public FeatureExtractor { - bool first_octave = true; - while (true) { - if (first_octave) { -- const std::vector data_uint8 = bitmap.ConvertToRowMajorArray(); -+ const std::vector& data_uint8 = bitmap.RowMajorData(); - std::vector data_float(data_uint8.size()); - for (size_t i = 0; i < data_uint8.size(); ++i) { - data_float[i] = static_cast(data_uint8[i]) / 255.0f; -@@ -346,7 +345,7 @@ class CovariantSiftCPUFeatureExtractor : public FeatureExtractor { - vl_covdet_set_edge_threshold(covdet.get(), options_.sift->edge_threshold); - - { -- const std::vector data_uint8 = bitmap.ConvertToRowMajorArray(); -+ const std::vector& data_uint8 = bitmap.RowMajorData(); - std::vector data_float(data_uint8.size()); - for (size_t i = 0; i < data_uint8.size(); ++i) { - data_float[i] = static_cast(data_uint8[i]) / 255.0f; -@@ -573,7 +572,7 @@ class SiftGPUFeatureExtractor : public FeatureExtractor { - << -std::min(0, options.sift->first_octave); - sift_gpu_args.push_back("-maxd"); - sift_gpu_args.push_back( -- std::to_string(options.sift->max_image_size * compensation_factor)); -+ std::to_string(options.max_image_size * compensation_factor)); - - // Keep the highest level features. - sift_gpu_args.push_back("-tc2"); -@@ -647,17 +646,16 @@ class SiftGPUFeatureExtractor : public FeatureExtractor { - // first octave in the pyramid (which is the 'first_octave'). - const int compensation_factor = - 1 << -std::min(0, options_.sift->first_octave); -- THROW_CHECK_EQ(options_.sift->max_image_size * compensation_factor, -+ THROW_CHECK_EQ(options_.max_image_size * compensation_factor, - sift_gpu_.GetMaxDimension()); - - std::lock_guard lock(*sift_gpu_mutexes_[sift_gpu_.gpu_index]); - - // Note, that this produces slightly different results than using SiftGPU - // directly for RGB->GRAY conversion, since it uses different weights. -- const std::vector bitmap_raw_bits = bitmap.ConvertToRawBits(); - const int code = sift_gpu_.RunSIFT(bitmap.Pitch(), - bitmap.Height(), -- bitmap_raw_bits.data(), -+ bitmap.RowMajorData().data(), - GL_LUMINANCE, - GL_UNSIGNED_BYTE); - -diff --git a/src/colmap/feature/sift.h b/src/colmap/feature/sift.h -index 017e6c32..7cdb48b6 100644 ---- a/src/colmap/feature/sift.h -+++ b/src/colmap/feature/sift.h -@@ -35,9 +35,6 @@ - namespace colmap { - - struct SiftExtractionOptions { -- // Maximum image size, otherwise image will be down-scaled. -- int max_image_size = 3200; -- - // Maximum number of features to detect, keeping larger-scale features. - int max_num_features = 8192; - -diff --git a/src/colmap/feature/sift_test.cc b/src/colmap/feature/sift_test.cc -index 5c89eb11..af493016 100644 ---- a/src/colmap/feature/sift_test.cc -+++ b/src/colmap/feature/sift_test.cc -@@ -46,19 +46,19 @@ - namespace colmap { - namespace { - --void CreateImageWithSquare(const int size, Bitmap* bitmap) { -- bitmap->Allocate(size, size, false); -- bitmap->Fill(BitmapColor(0, 0, 0)); -+Bitmap CreateImageWithSquare(const int size) { -+ Bitmap bitmap(size, size, false); -+ bitmap.Fill(BitmapColor(0, 0, 0)); - for (int r = size / 2 - size / 8; r < size / 2 + size / 8; ++r) { - for (int c = size / 2 - size / 8; c < size / 2 + size / 8; ++c) { -- bitmap->SetPixel(r, c, BitmapColor(255)); -+ bitmap.SetPixel(r, c, BitmapColor(255)); - } - } -+ return bitmap; - } - - TEST(ExtractSiftFeaturesCPU, Nominal) { -- Bitmap bitmap; -- CreateImageWithSquare(256, &bitmap); -+ const Bitmap bitmap = CreateImageWithSquare(256); - - FeatureExtractionOptions options(FeatureExtractorType::SIFT); - options.use_gpu = false; -@@ -89,8 +89,7 @@ TEST(ExtractSiftFeaturesCPU, Nominal) { - } - - TEST(ExtractCovariantSiftFeaturesCPU, Nominal) { -- Bitmap bitmap; -- CreateImageWithSquare(256, &bitmap); -+ const Bitmap bitmap = CreateImageWithSquare(256); - - FeatureExtractionOptions options(FeatureExtractorType::SIFT); - options.use_gpu = false; -@@ -121,8 +120,7 @@ TEST(ExtractCovariantSiftFeaturesCPU, Nominal) { - } - - TEST(ExtractCovariantAffineSiftFeaturesCPU, Nominal) { -- Bitmap bitmap; -- CreateImageWithSquare(256, &bitmap); -+ const Bitmap bitmap = CreateImageWithSquare(256); - - FeatureExtractionOptions options(FeatureExtractorType::SIFT); - options.use_gpu = false; -@@ -153,8 +151,7 @@ TEST(ExtractCovariantAffineSiftFeaturesCPU, Nominal) { - } - - TEST(ExtractCovariantAffineSiftFeaturesCPU, Upright) { -- Bitmap bitmap; -- CreateImageWithSquare(256, &bitmap); -+ const Bitmap bitmap = CreateImageWithSquare(256); - - FeatureExtractionOptions options(FeatureExtractorType::SIFT); - options.use_gpu = false; -@@ -186,8 +183,7 @@ TEST(ExtractCovariantAffineSiftFeaturesCPU, Upright) { - } - - TEST(ExtractCovariantDSPSiftFeaturesCPU, Nominal) { -- Bitmap bitmap; -- CreateImageWithSquare(256, &bitmap); -+ const Bitmap bitmap = CreateImageWithSquare(256); - - FeatureExtractionOptions options(FeatureExtractorType::SIFT); - options.use_gpu = false; -@@ -218,8 +214,7 @@ TEST(ExtractCovariantDSPSiftFeaturesCPU, Nominal) { - } - - TEST(ExtractCovariantAffineDSPSiftFeaturesCPU, Nominal) { -- Bitmap bitmap; -- CreateImageWithSquare(256, &bitmap); -+ const Bitmap bitmap = CreateImageWithSquare(256); - - FeatureExtractionOptions options(FeatureExtractorType::SIFT); - options.use_gpu = false; -@@ -260,8 +255,7 @@ TEST(ExtractSiftFeaturesGPU, Nominal) { - void Run() { - opengl_context_.MakeCurrent(); - -- Bitmap bitmap; -- CreateImageWithSquare(256, &bitmap); -+ const Bitmap bitmap = CreateImageWithSquare(256); - - FeatureExtractionOptions options(FeatureExtractorType::SIFT); - options.use_gpu = true; -diff --git a/src/colmap/image/CMakeLists.txt b/src/colmap/image/CMakeLists.txt -index 1e28dc91..2bfe492b 100644 ---- a/src/colmap/image/CMakeLists.txt -+++ b/src/colmap/image/CMakeLists.txt -@@ -42,6 +42,7 @@ COLMAP_ADD_LIBRARY( - PRIVATE_LINK_LIBS - colmap_util - colmap_sensor -+ colmap_vlfeat - ) - if(LSD_ENABLED) - target_link_libraries(colmap_image PRIVATE colmap_lsd) -diff --git a/src/colmap/image/line.cc b/src/colmap/image/line.cc -index e1a13aec..b5036355 100644 ---- a/src/colmap/image/line.cc -+++ b/src/colmap/image/line.cc -@@ -49,21 +49,21 @@ struct RawDeleter { - } // namespace - - #ifdef COLMAP_LSD_ENABLED -+ - std::vector DetectLineSegments(const Bitmap& bitmap, - const double min_length) { - const double min_length_squared = min_length * min_length; - -- std::vector bitmap_data; -+ std::vector bitmap_data_double; - if (bitmap.IsGrey()) { -- bitmap_data = bitmap.ConvertToRowMajorArray(); -+ bitmap_data_double = {bitmap.RowMajorData().begin(), -+ bitmap.RowMajorData().end()}; - } else { - const Bitmap bitmap_gray = bitmap.CloneAsGrey(); -- bitmap_data = bitmap_gray.ConvertToRowMajorArray(); -+ bitmap_data_double = {bitmap_gray.RowMajorData().begin(), -+ bitmap_gray.RowMajorData().end()}; - } - -- std::vector bitmap_data_double(bitmap_data.begin(), -- bitmap_data.end()); -- - int num_segments; - std::unique_ptr segments_data( - lsd(&num_segments, -diff --git a/src/colmap/image/line_test.cc b/src/colmap/image/line_test.cc -index bfd04ada..422291ad 100644 ---- a/src/colmap/image/line_test.cc -+++ b/src/colmap/image/line_test.cc -@@ -35,9 +35,9 @@ namespace colmap { - namespace { - - #ifdef COLMAP_LSD_ENABLED -+ - TEST(DetectLineSegments, Nominal) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, false); -+ Bitmap bitmap(100, 100, false); - for (size_t i = 0; i < 100; ++i) { - bitmap.SetPixel(i, i, BitmapColor(255)); - } -@@ -57,8 +57,7 @@ TEST(DetectLineSegments, Nominal) { - } - - TEST(ClassifyLineSegmentOrientations, Nominal) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, false); -+ Bitmap bitmap(100, 100, false); - for (size_t i = 60; i < 100; ++i) { - bitmap.SetPixel(i, 50, BitmapColor(255)); - bitmap.SetPixel(50, i, BitmapColor(255)); -diff --git a/src/colmap/image/undistortion.cc b/src/colmap/image/undistortion.cc -index ec4b8a7a..839d4e80 100644 ---- a/src/colmap/image/undistortion.cc -+++ b/src/colmap/image/undistortion.cc -@@ -1084,12 +1084,12 @@ void RectifyAndUndistortStereoImages(const UndistortCameraOptions& options, - THROW_CHECK_EQ(distorted_camera2.height, distorted_image2.Height()); - - *undistorted_camera = UndistortCamera(options, distorted_camera1); -- undistorted_image1->Allocate(static_cast(undistorted_camera->width), -+ *undistorted_image1 = Bitmap(static_cast(undistorted_camera->width), - static_cast(undistorted_camera->height), - distorted_image1.IsRGB()); - distorted_image1.CloneMetadata(undistorted_image1); - -- undistorted_image2->Allocate(static_cast(undistorted_camera->width), -+ *undistorted_image2 = Bitmap(static_cast(undistorted_camera->width), - static_cast(undistorted_camera->height), - distorted_image2.IsRGB()); - distorted_image2.CloneMetadata(undistorted_image2); -diff --git a/src/colmap/image/undistortion_test.cc b/src/colmap/image/undistortion_test.cc -index be0fdee5..a7296890 100644 ---- a/src/colmap/image/undistortion_test.cc -+++ b/src/colmap/image/undistortion_test.cc -@@ -110,8 +110,7 @@ TEST(UndistortCamera, BlankPixels) { - Camera::CreateFromModelName(1, "SIMPLE_RADIAL", 100, 100, 100); - distorted_camera.params[3] = 0.5; - -- Bitmap distorted_image; -- distorted_image.Allocate(100, 100, false); -+ Bitmap distorted_image(100, 100, false); - distorted_image.Fill(BitmapColor(255)); - - Bitmap undistorted_image; -@@ -154,8 +153,7 @@ TEST(UndistortCamera, NoBlankPixels) { - Camera::CreateFromModelName(1, "SIMPLE_RADIAL", 100, 100, 100); - distorted_camera.params[3] = 0.5; - -- Bitmap distorted_image; -- distorted_image.Allocate(100, 100, false); -+ Bitmap distorted_image(100, 100, false); - distorted_image.Fill(BitmapColor(255)); - - Bitmap undistorted_image; -@@ -179,9 +177,9 @@ TEST(UndistortCamera, NoBlankPixels) { - for (int x = 0; x < undistorted_image.Width(); ++x) { - BitmapColor color; - EXPECT_TRUE(undistorted_image.GetPixel(x, y, &color)); -- EXPECT_NE(color.r, 0); -- EXPECT_EQ(color.g, 0); -- EXPECT_EQ(color.b, 0); -+ ASSERT_NE(color.r, 0); -+ ASSERT_NE(color.g, 0); -+ ASSERT_NE(color.b, 0); - } - } - } -diff --git a/src/colmap/image/warp.cc b/src/colmap/image/warp.cc -index b8a83969..11cb6605 100644 ---- a/src/colmap/image/warp.cc -+++ b/src/colmap/image/warp.cc -@@ -61,7 +61,7 @@ void WarpImageBetweenCameras(const Camera& source_camera, - THROW_CHECK_EQ(source_camera.height, source_image.Height()); - THROW_CHECK_NOTNULL(target_image); - -- target_image->Allocate(static_cast(source_camera.width), -+ *target_image = Bitmap(static_cast(source_camera.width), - static_cast(source_camera.height), - source_image.IsRGB()); - -@@ -143,7 +143,7 @@ void WarpImageWithHomographyBetweenCameras(const Eigen::Matrix3d& H, - THROW_CHECK_EQ(source_camera.height, source_image.Height()); - THROW_CHECK_NOTNULL(target_image); - -- target_image->Allocate(static_cast(source_camera.width), -+ *target_image = Bitmap(static_cast(source_camera.width), - static_cast(source_camera.height), - source_image.IsRGB()); - -diff --git a/src/colmap/image/warp_test.cc b/src/colmap/image/warp_test.cc -index 13c7feb7..0604b17f 100644 ---- a/src/colmap/image/warp_test.cc -+++ b/src/colmap/image/warp_test.cc -@@ -37,20 +37,20 @@ namespace colmap { - namespace { - namespace { - --void GenerateRandomBitmap(const int width, -- const int height, -- const bool as_rgb, -- Bitmap* bitmap) { -- bitmap->Allocate(width, height, as_rgb); -+const Bitmap GenerateRandomBitmap(const int width, -+ const int height, -+ const bool as_rgb) { -+ Bitmap bitmap(width, height, as_rgb); - for (int x = 0; x < width; ++x) { - for (int y = 0; y < height; ++y) { - BitmapColor color; - color.r = RandomUniformInteger(0, 255); - color.g = RandomUniformInteger(0, 255); - color.b = RandomUniformInteger(0, 255); -- bitmap->SetPixel(x, y, color); -+ bitmap.SetPixel(x, y, color); - } - } -+ return bitmap; - } - - // Check that the two bitmaps are equal, ignoring a 1px boundary. -@@ -91,14 +91,12 @@ void CheckBitmapsTransposed(const Bitmap& bitmap1, const Bitmap& bitmap2) { - - TEST(Warp, IdenticalCameras) { - const Camera camera = Camera::CreateFromModelName(1, "PINHOLE", 1, 100, 100); -- Bitmap source_image_gray; -- GenerateRandomBitmap(100, 100, false, &source_image_gray); -+ const Bitmap source_image_gray = GenerateRandomBitmap(100, 100, false); - Bitmap target_image_gray; - WarpImageBetweenCameras( - camera, camera, source_image_gray, &target_image_gray); - CheckBitmapsEqual(source_image_gray, target_image_gray); -- Bitmap source_image_rgb; -- GenerateRandomBitmap(100, 100, true, &source_image_rgb); -+ const Bitmap source_image_rgb = GenerateRandomBitmap(100, 100, true); - Bitmap target_image_rgb; - WarpImageBetweenCameras(camera, camera, source_image_rgb, &target_image_rgb); - CheckBitmapsEqual(source_image_rgb, target_image_rgb); -@@ -109,8 +107,7 @@ TEST(Warp, ShiftedCameras) { - Camera::CreateFromModelName(1, "PINHOLE", 1, 100, 100); - Camera target_camera = source_camera; - target_camera.SetPrincipalPointX(0.0); -- Bitmap source_image_gray; -- GenerateRandomBitmap(100, 100, true, &source_image_gray); -+ const Bitmap source_image_gray = GenerateRandomBitmap(100, 100, true); - Bitmap target_image_gray; - WarpImageBetweenCameras( - source_camera, target_camera, source_image_gray, &target_image_gray); -@@ -132,18 +129,14 @@ TEST(Warp, ShiftedCameras) { - } - - TEST(Warp, WarpImageWithHomographyIdentity) { -- Bitmap source_image_gray; -- GenerateRandomBitmap(100, 100, false, &source_image_gray); -- Bitmap target_image_gray; -- target_image_gray.Allocate(100, 100, false); -+ const Bitmap source_image_gray = GenerateRandomBitmap(100, 100, false); -+ Bitmap target_image_gray(100, 100, false); - WarpImageWithHomography( - Eigen::Matrix3d::Identity(), source_image_gray, &target_image_gray); - CheckBitmapsEqual(source_image_gray, target_image_gray); - -- Bitmap source_image_rgb; -- GenerateRandomBitmap(100, 100, true, &source_image_rgb); -- Bitmap target_image_rgb; -- target_image_rgb.Allocate(100, 100, true); -+ const Bitmap source_image_rgb = GenerateRandomBitmap(100, 100, true); -+ Bitmap target_image_rgb(100, 100, true); - WarpImageWithHomography( - Eigen::Matrix3d::Identity(), source_image_rgb, &target_image_rgb); - CheckBitmapsEqual(source_image_rgb, target_image_rgb); -@@ -153,27 +146,21 @@ TEST(Warp, WarpImageWithHomographyTransposed) { - Eigen::Matrix3d H; - H << 0, 1, 0, 1, 0, 0, 0, 0, 1; - -- Bitmap source_image_gray; -- GenerateRandomBitmap(100, 100, false, &source_image_gray); -- Bitmap target_image_gray; -- target_image_gray.Allocate(100, 100, false); -+ const Bitmap source_image_gray = GenerateRandomBitmap(100, 100, false); -+ Bitmap target_image_gray(100, 100, false); - WarpImageWithHomography(H, source_image_gray, &target_image_gray); - CheckBitmapsTransposed(source_image_gray, target_image_gray); - -- Bitmap source_image_rgb; -- GenerateRandomBitmap(100, 100, true, &source_image_rgb); -- Bitmap target_image_rgb; -- target_image_rgb.Allocate(100, 100, true); -+ const Bitmap source_image_rgb = GenerateRandomBitmap(100, 100, true); -+ Bitmap target_image_rgb(100, 100, true); - WarpImageWithHomography(H, source_image_rgb, &target_image_rgb); - CheckBitmapsTransposed(source_image_rgb, target_image_rgb); - } - - TEST(Warp, WarpImageWithHomographyBetweenCamerasIdentity) { - const Camera camera = Camera::CreateFromModelName(1, "PINHOLE", 1, 100, 100); -- Bitmap source_image_gray; -- GenerateRandomBitmap(100, 100, false, &source_image_gray); -+ const Bitmap source_image_gray = GenerateRandomBitmap(100, 100, false); - Bitmap target_image_gray; -- target_image_gray.Allocate(100, 100, false); - WarpImageWithHomographyBetweenCameras(Eigen::Matrix3d::Identity(), - camera, - camera, -@@ -181,10 +168,8 @@ TEST(Warp, WarpImageWithHomographyBetweenCamerasIdentity) { - &target_image_gray); - CheckBitmapsEqual(source_image_gray, target_image_gray); - -- Bitmap source_image_rgb; -- GenerateRandomBitmap(100, 100, true, &source_image_rgb); -+ const Bitmap source_image_rgb = GenerateRandomBitmap(100, 100, true); - Bitmap target_image_rgb; -- target_image_rgb.Allocate(100, 100, true); - WarpImageWithHomographyBetweenCameras(Eigen::Matrix3d::Identity(), - camera, - camera, -@@ -199,18 +184,14 @@ TEST(Warp, WarpImageWithHomographyBetweenCamerasTransposed) { - Eigen::Matrix3d H; - H << 0, 1, 0, 1, 0, 0, 0, 0, 1; - -- Bitmap source_image_gray; -- GenerateRandomBitmap(100, 100, false, &source_image_gray); -+ const Bitmap source_image_gray = GenerateRandomBitmap(100, 100, false); - Bitmap target_image_gray; -- target_image_gray.Allocate(100, 100, false); - WarpImageWithHomographyBetweenCameras( - H, camera, camera, source_image_gray, &target_image_gray); - CheckBitmapsTransposed(source_image_gray, target_image_gray); - -- Bitmap source_image_rgb; -- GenerateRandomBitmap(100, 100, true, &source_image_rgb); -+ const Bitmap source_image_rgb = GenerateRandomBitmap(100, 100, true); - Bitmap target_image_rgb; -- target_image_rgb.Allocate(100, 100, true); - WarpImageWithHomographyBetweenCameras( - H, camera, camera, source_image_rgb, &target_image_rgb); - CheckBitmapsTransposed(source_image_rgb, target_image_rgb); -diff --git a/src/colmap/mvs/depth_map.cc b/src/colmap/mvs/depth_map.cc -index 1a18cc9d..fa9c6cd7 100644 ---- a/src/colmap/mvs/depth_map.cc -+++ b/src/colmap/mvs/depth_map.cc -@@ -87,8 +87,7 @@ Bitmap DepthMap::ToBitmap(const float min_percentile, - THROW_CHECK_GT(width_, 0); - THROW_CHECK_GT(height_, 0); - -- Bitmap bitmap; -- bitmap.Allocate(width_, height_, true); -+ Bitmap bitmap(width_, height_, true); - - std::vector valid_depths; - valid_depths.reserve(data_.size()); -diff --git a/src/colmap/mvs/image.cc b/src/colmap/mvs/image.cc -index efb6fb3f..952f9f89 100644 ---- a/src/colmap/mvs/image.cc -+++ b/src/colmap/mvs/image.cc -@@ -66,7 +66,7 @@ void Image::Rescale(const float factor_x, const float factor_y) { - const size_t new_width = std::round(width_ * factor_x); - const size_t new_height = std::round(height_ * factor_y); - -- if (bitmap_.Data() != nullptr) { -+ if (!bitmap_.IsEmpty()) { - bitmap_.Rescale(new_width, new_height); - } - -diff --git a/src/colmap/mvs/normal_map.cc b/src/colmap/mvs/normal_map.cc -index 47389c10..5014db54 100644 ---- a/src/colmap/mvs/normal_map.cc -+++ b/src/colmap/mvs/normal_map.cc -@@ -101,8 +101,7 @@ Bitmap NormalMap::ToBitmap() const { - THROW_CHECK_GT(height_, 0); - THROW_CHECK_EQ(depth_, 3); - -- Bitmap bitmap; -- bitmap.Allocate(width_, height_, true); -+ Bitmap bitmap(width_, height_, true); - - for (size_t y = 0; y < height_; ++y) { - for (size_t x = 0; x < width_; ++x) { -diff --git a/src/colmap/mvs/patch_match_cuda.cu b/src/colmap/mvs/patch_match_cuda.cu -index b7267318..f3080a3a 100644 ---- a/src/colmap/mvs/patch_match_cuda.cu -+++ b/src/colmap/mvs/patch_match_cuda.cu -@@ -1539,9 +1539,7 @@ void PatchMatchCuda::InitRefImage() { - - // Upload to device and filter. - ref_image_.reset(new GpuMatRefImage(ref_width_, ref_height_)); -- const std::vector ref_image_array = -- ref_image.GetBitmap().ConvertToRowMajorArray(); -- ref_image_->Filter(ref_image_array.data(), -+ ref_image_->Filter(ref_image.GetBitmap().RowMajorData().data(), - options_.window_radius, - options_.window_step, - options_.sigma_spatial, -@@ -1576,10 +1574,7 @@ void PatchMatchCuda::InitSourceImages() { - const Image& image = problem_.images->at(problem_.src_image_idxs[i]); - const Bitmap& bitmap = image.GetBitmap(); - uint8_t* dest = src_images_host_data.data() + max_width * max_height * i; -- for (size_t r = 0; r < image.GetHeight(); ++r) { -- memcpy(dest, bitmap.GetScanline(r), image.GetWidth() * sizeof(uint8_t)); -- dest += max_width; -- } -+ memcpy(dest, bitmap.RowMajorData().data(), bitmap.NumBytes()); - } - - // Create source images texture. -diff --git a/src/colmap/scene/reconstruction.cc b/src/colmap/scene/reconstruction.cc -index e7a26ed9..06e83cba 100644 ---- a/src/colmap/scene/reconstruction.cc -+++ b/src/colmap/scene/reconstruction.cc -@@ -830,7 +830,8 @@ bool Reconstruction::ExtractColorsForImage(const image_t image_id, - const class Image& image = Image(image_id); - - Bitmap bitmap; -- if (!bitmap.Read(JoinPaths(path, image.Name()))) { -+ if (!bitmap.Read(JoinPaths(path, image.Name()), -+ /*as_rgb=*/true)) { - return false; - } - -@@ -862,7 +863,8 @@ void Reconstruction::ExtractColorsForAllImages(const std::string& path) { - const std::string image_path = JoinPaths(path, image.Name()); - - Bitmap bitmap; -- if (!bitmap.Read(image_path)) { -+ if (!bitmap.Read(image_path, -+ /*as_rgb=*/true)) { - LOG(WARNING) << "Could not read image " << image.Name() << " at path " - << image_path; - continue; -diff --git a/src/colmap/sensor/CMakeLists.txt b/src/colmap/sensor/CMakeLists.txt -index d8fd80ad..a79e04b1 100644 ---- a/src/colmap/sensor/CMakeLists.txt -+++ b/src/colmap/sensor/CMakeLists.txt -@@ -44,8 +44,7 @@ COLMAP_ADD_LIBRARY( - PRIVATE_LINK_LIBS - colmap_geometry - colmap_util -- colmap_vlfeat -- freeimage::FreeImage -+ OpenImageIO::OpenImageIO - ) - - COLMAP_ADD_TEST( -@@ -53,7 +52,6 @@ COLMAP_ADD_TEST( - SRCS bitmap_test.cc - LINK_LIBS - colmap_sensor -- freeimage::FreeImage - ) - COLMAP_ADD_TEST( - NAME database_test -diff --git a/src/colmap/sensor/bitmap.cc b/src/colmap/sensor/bitmap.cc -index 7dfcc40f..1fb258c1 100644 ---- a/src/colmap/sensor/bitmap.cc -+++ b/src/colmap/sensor/bitmap.cc -@@ -35,99 +35,173 @@ - #include "colmap/util/logging.h" - #include "colmap/util/misc.h" - --#include "thirdparty/VLFeat/imopv.h" -- --#include --#include -- --#ifdef _WIN32 --#ifndef NOMINMAX --#define NOMINMAX --#endif --#include --#endif --#include -+#include -+#include -+#include - - namespace colmap { - namespace { - --#ifdef FREEIMAGE_LIB // Only needed for static FreeImage. -+struct OIIOInitializer { -+ OIIOInitializer() { -+ OIIO::attribute("threads", 1); -+ OIIO::attribute("exr_threads", 1); -+ } - --struct FreeImageInitializer { -- FreeImageInitializer() { FreeImage_Initialise(); } -- ~FreeImageInitializer() { FreeImage_DeInitialise(); } -+#if OIIO_VERSION >= OIIO_MAKE_VERSION(2, 5, 3) -+ ~OIIOInitializer() { OIIO::shutdown(); } -+#endif - }; - --const static auto initializer = FreeImageInitializer(); -+const static auto initializer = OIIOInitializer(); - --#endif // FREEIMAGE_LIB -+struct OIIOMetaData : public Bitmap::MetaData { -+ OIIOMetaData() = default; - --bool ReadExifTag(FIBITMAP* ptr, -- const FREE_IMAGE_MDMODEL model, -- const std::string& tag_name, -- std::string* result) { -- FITAG* tag = nullptr; -- FreeImage_GetMetadata(model, ptr, tag_name.c_str(), &tag); -- if (tag == nullptr) { -- *result = ""; -- return false; -+ OIIO::ImageSpec image_spec; -+ -+ static OIIOMetaData* Upcast(Bitmap::MetaData* meta_data) { -+ return THROW_CHECK_NOTNULL(dynamic_cast(meta_data)); -+ } -+ -+ static std::unique_ptr Clone( -+ const std::unique_ptr& meta_data) { -+ auto cloned = std::make_unique(); -+ *cloned = *Upcast(meta_data.get()); -+ return cloned; -+ } -+}; -+ -+// For backwards compatibility with older OIIO versions without implicit -+// conversion from std::string_view. -+OIIO::string_view OIIOFromStdStringView(std::string_view value) { -+ return {value.data(), value.size()}; -+} -+ -+std::vector ConvertColorSpace(const uint8_t* src_data, -+ int width, -+ int height, -+ int channels, -+ const std::string_view& from, -+ const std::string_view& to) { -+ const OIIO::ImageSpec image_spec( -+ width, height, channels, OIIO::TypeDesc::UINT8); -+ const int pitch = width * channels; -+ const OIIO::ImageBuf src(image_spec, const_cast(src_data)); -+ std::vector tgt_data(height * pitch); -+ OIIO::ImageBuf tgt(image_spec, tgt_data.data()); -+ THROW_CHECK(OIIO::ImageBufAlgo::colorconvert( -+ tgt, src, OIIOFromStdStringView(from), OIIOFromStdStringView(to))); -+ return tgt_data; -+} -+ -+void SetImageSpecColorSpace(OIIO::ImageSpec& image_spec, -+ const OIIO::string_view& colorspace) { -+#if OIIO_VERSION >= OIIO_MAKE_VERSION(3, 0, 0) -+ image_spec.set_colorspace(colorspace); -+#else -+ // Extract logic from 3.0.0 version for backwards compatibility. -+ const OIIO::string_view oldspace = -+ image_spec.get_string_attribute("oiio:ColorSpace"); -+ if (oldspace.size() && colorspace.size() && oldspace == colorspace) { -+ return; -+ } -+ -+ if (colorspace.empty()) { -+ image_spec.erase_attribute("oiio:ColorSpace"); - } else { -- if (tag_name == "FocalPlaneXResolution") { -- // This tag seems to be in the wrong category. -- *result = std::string(FreeImage_TagToString(FIMD_EXIF_INTEROP, tag)); -- } else { -- *result = FreeImage_TagToString(model, tag); -- } -- return true; -+ image_spec.attribute("oiio:ColorSpace", colorspace); - } --} - --bool IsPtrGrey(FIBITMAP* ptr) { -- return FreeImage_GetColorType(ptr) == FIC_MINISBLACK && -- FreeImage_GetBPP(ptr) == 8; --} -+ if (colorspace != "sRGB") { -+ image_spec.erase_attribute("Exif:ColorSpace"); -+ } - --bool IsPtrRGB(FIBITMAP* ptr) { -- return FreeImage_GetColorType(ptr) == FIC_RGB && FreeImage_GetBPP(ptr) == 24; -+ image_spec.erase_attribute("tiff:ColorSpace"); -+ image_spec.erase_attribute("tiff:PhotometricInterpretation"); -+ image_spec.erase_attribute("oiio:Gamma"); -+#endif - } - --bool IsPtrSupported(FIBITMAP* ptr) { return IsPtrGrey(ptr) || IsPtrRGB(ptr); } -+bool IsEquivalentColorSpace(const std::string_view& colorspace1, -+ const std::string_view& colorspace2) { -+#if OIIO_VERSION >= OIIO_MAKE_VERSION(3, 0, 0) -+ return OIIO::equivalent_colorspace(colorspace1, colorspace2); -+#else -+ // Poor (wo)man's version of available functionality in recent OIIO versions. -+ auto is_linear_srgb = [](const std::string_view& colorspace) { -+ return colorspace == "linear" || colorspace == "lin_srgb" || -+ colorspace == "lin_rec709P"; -+ }; -+ if (is_linear_srgb(colorspace1) && is_linear_srgb(colorspace2)) { -+ return true; -+ } else { -+ return colorspace1 == colorspace2; -+ } -+#endif -+} - - } // namespace - --Bitmap::Bitmap() : width_(0), height_(0), channels_(0) {} -+Bitmap::Bitmap() -+ : width_(0), height_(0), channels_(0), linear_colorspace_(true) {} - --Bitmap::Bitmap(const Bitmap& other) : Bitmap() { -- if (other.handle_.ptr != nullptr) { -- SetPtr(FreeImage_Clone(other.handle_.ptr)); -- } -+Bitmap::Bitmap(const int width, -+ const int height, -+ const bool as_rgb, -+ const bool linear_colorspace) { -+ width_ = width; -+ height_ = height; -+ channels_ = as_rgb ? 3 : 1; -+ linear_colorspace_ = linear_colorspace; -+ data_.resize(width_ * height_ * channels_); -+ auto meta_data = std::make_unique(); -+ meta_data->image_spec = -+ OIIO::ImageSpec(width_, height_, channels_, OIIO::TypeDesc::UINT8); -+ SetImageSpecColorSpace(meta_data->image_spec, -+ linear_colorspace ? "linear" : "sRGB"); -+ meta_data_ = std::move(meta_data); - } - --Bitmap::Bitmap(Bitmap&& other) noexcept : Bitmap() { -- handle_ = std::move(other.handle_); -+Bitmap::Bitmap(const Bitmap& other) { - width_ = other.width_; - height_ = other.height_; - channels_ = other.channels_; -+ linear_colorspace_ = other.linear_colorspace_; -+ data_ = other.data_; -+ meta_data_ = OIIOMetaData::Clone(other.meta_data_); -+} -+ -+Bitmap::Bitmap(Bitmap&& other) noexcept { -+ width_ = other.width_; -+ height_ = other.height_; -+ channels_ = other.channels_; -+ linear_colorspace_ = other.linear_colorspace_; -+ data_ = std::move(other.data_); -+ meta_data_ = std::move(other.meta_data_); - other.width_ = 0; - other.height_ = 0; - other.channels_ = 0; - } - --Bitmap::Bitmap(FIBITMAP* data) : Bitmap() { SetPtr(data); } -- - Bitmap& Bitmap::operator=(const Bitmap& other) { -- if (other.handle_.ptr != nullptr) { -- SetPtr(FreeImage_Clone(other.handle_.ptr)); -- } -+ width_ = other.width_; -+ height_ = other.height_; -+ channels_ = other.channels_; -+ linear_colorspace_ = other.linear_colorspace_; -+ data_ = other.data_; -+ meta_data_ = OIIOMetaData::Clone(other.meta_data_); - return *this; - } - - Bitmap& Bitmap::operator=(Bitmap&& other) noexcept { - if (this != &other) { -- handle_ = std::move(other.handle_); - width_ = other.width_; - height_ = other.height_; - channels_ = other.channels_; -+ linear_colorspace_ = other.linear_colorspace_; -+ data_ = std::move(other.data_); -+ meta_data_ = std::move(other.meta_data_); - other.width_ = 0; - other.height_ = 0; - other.channels_ = 0; -@@ -135,167 +209,16 @@ Bitmap& Bitmap::operator=(Bitmap&& other) noexcept { - return *this; - } - --bool Bitmap::Allocate(const int width, const int height, const bool as_rgb) { -- width_ = width; -- height_ = height; -- if (as_rgb) { -- const int kNumBitsPerPixel = 24; -- handle_ = -- FreeImageHandle(FreeImage_Allocate(width, height, kNumBitsPerPixel)); -- channels_ = 3; -- } else { -- const int kNumBitsPerPixel = 8; -- handle_ = -- FreeImageHandle(FreeImage_Allocate(width, height, kNumBitsPerPixel)); -- channels_ = 1; -- } -- return handle_.ptr != nullptr; --} -- --void Bitmap::Deallocate() { -- handle_ = FreeImageHandle(); -- width_ = 0; -- height_ = 0; -- channels_ = 0; --} -- --size_t Bitmap::NumBytes() const { -- if (handle_.ptr != nullptr) { -- return Pitch() * height_; -- } else { -- return 0; -- } --} -- --unsigned int Bitmap::BitsPerPixel() const { -- return FreeImage_GetBPP(handle_.ptr); --} -- --unsigned int Bitmap::Pitch() const { return FreeImage_GetPitch(handle_.ptr); } -- --std::vector Bitmap::ConvertToRowMajorArray() const { -- std::vector array(width_ * height_ * channels_); -- size_t i = 0; -- for (int y = 0; y < height_; ++y) { -- const uint8_t* line = FreeImage_GetScanLine(handle_.ptr, height_ - 1 - y); -- for (int x = 0; x < width_; ++x) { -- for (int d = 0; d < channels_; ++d) { -- array[i] = line[x * channels_ + d]; -- i += 1; -- } -- } -- } -- return array; --} -- --std::vector Bitmap::ConvertToColMajorArray() const { -- std::vector array(width_ * height_ * channels_); -- size_t i = 0; -- for (int d = 0; d < channels_; ++d) { -- for (int x = 0; x < width_; ++x) { -- for (int y = 0; y < height_; ++y) { -- const uint8_t* line = -- FreeImage_GetScanLine(handle_.ptr, height_ - 1 - y); -- array[i] = line[x * channels_ + d]; -- i += 1; -- } -- } -- } -- return array; --} -- --std::vector Bitmap::ConvertToRawBits() const { -- const unsigned int pitch = Pitch(); -- const unsigned int bpp = BitsPerPixel(); -- std::vector raw_bits(pitch * height_ * bpp / 8, 0); -- FreeImage_ConvertToRawBits(raw_bits.data(), -- handle_.ptr, -- pitch, -- bpp, -- FI_RGBA_RED_MASK, -- FI_RGBA_GREEN_MASK, -- FI_RGBA_BLUE_MASK, -- /*topdown=*/true); -- return raw_bits; --} -- --Bitmap Bitmap::ConvertFromRawBits( -- const uint8_t* data, int pitch, int width, int height, bool rgb) { -- const unsigned bpp = rgb ? 24 : 8; -- return Bitmap(FreeImage_ConvertFromRawBitsEx(/*copy_source=*/true, -- const_cast(data), -- FIT_BITMAP, -- width, -- height, -- pitch, -- bpp, -- FI_RGBA_RED_MASK, -- FI_RGBA_GREEN_MASK, -- FI_RGBA_BLUE_MASK, -- /*topdown=*/true)); --} -- --bool Bitmap::GetPixel(const int x, -- const int y, -- BitmapColor* color) const { -- if (x < 0 || x >= width_ || y < 0 || y >= height_) { -- return false; -- } -- -- const uint8_t* line = FreeImage_GetScanLine(handle_.ptr, height_ - 1 - y); -- -- if (IsGrey()) { -- color->r = line[x]; -- return true; -- } else if (IsRGB()) { -- color->r = line[3 * x + FI_RGBA_RED]; -- color->g = line[3 * x + FI_RGBA_GREEN]; -- color->b = line[3 * x + FI_RGBA_BLUE]; -- return true; -- } -- -- return false; --} -- --bool Bitmap::SetPixel(const int x, -- const int y, -- const BitmapColor& color) { -- if (x < 0 || x >= width_ || y < 0 || y >= height_) { -- return false; -- } -- -- uint8_t* line = FreeImage_GetScanLine(handle_.ptr, height_ - 1 - y); -- -- if (IsGrey()) { -- line[x] = color.r; -- return true; -- } else if (IsRGB()) { -- line[3 * x + FI_RGBA_RED] = color.r; -- line[3 * x + FI_RGBA_GREEN] = color.g; -- line[3 * x + FI_RGBA_BLUE] = color.b; -- return true; -- } -- -- return false; --} -- --const uint8_t* Bitmap::GetScanline(const int y) const { -- THROW_CHECK_GE(y, 0); -- THROW_CHECK_LT(y, height_); -- return FreeImage_GetScanLine(handle_.ptr, height_ - 1 - y); --} -- - void Bitmap::Fill(const BitmapColor& color) { -- for (int y = 0; y < height_; ++y) { -- uint8_t* line = FreeImage_GetScanLine(handle_.ptr, height_ - 1 - y); -- for (int x = 0; x < width_; ++x) { -- if (IsGrey()) { -- line[x] = color.r; -- } else if (IsRGB()) { -- line[3 * x + FI_RGBA_RED] = color.r; -- line[3 * x + FI_RGBA_GREEN] = color.g; -- line[3 * x + FI_RGBA_BLUE] = color.b; -- } -+ if (IsGrey()) { -+ std::fill(data_.begin(), data_.end(), color.r); -+ } else { -+ THROW_CHECK_EQ(data_.size() % 3, 0); -+ size_t i = 0; -+ while (i < data_.size()) { -+ data_[i++] = color.r; -+ data_[i++] = color.g; -+ data_[i++] = color.b; - } - } - } -@@ -311,12 +234,9 @@ bool Bitmap::InterpolateNearestNeighbor(const double x, - bool Bitmap::InterpolateBilinear(const double x, - const double y, - BitmapColor* color) const { -- // FreeImage's coordinate system origin is in the lower left of the image. -- const double inv_y = height_ - 1 - y; -- - const int x0 = static_cast(std::floor(x)); - const int x1 = x0 + 1; -- const int y0 = static_cast(std::floor(inv_y)); -+ const int y0 = static_cast(std::floor(y)); - const int y1 = y0 + 1; - - if (x0 < 0 || x1 >= width_ || y0 < 0 || y1 >= height_) { -@@ -324,12 +244,13 @@ bool Bitmap::InterpolateBilinear(const double x, - } - - const double dx = x - x0; -- const double dy = inv_y - y0; -+ const double dy = y - y0; - const double dx_1 = 1 - dx; - const double dy_1 = 1 - dy; - -- const uint8_t* line0 = FreeImage_GetScanLine(handle_.ptr, y0); -- const uint8_t* line1 = FreeImage_GetScanLine(handle_.ptr, y1); -+ const int pitch = width_ * channels_; -+ const uint8_t* line0 = &data_[y0 * pitch]; -+ const uint8_t* line1 = &data_[y1 * pitch]; - - if (IsGrey()) { - // Top row, column-wise linear interpolation. -@@ -348,14 +269,14 @@ bool Bitmap::InterpolateBilinear(const double x, - const uint8_t* p11 = &line1[3 * x1]; - - // Top row, column-wise linear interpolation. -- const double v0_r = dx_1 * p00[FI_RGBA_RED] + dx * p01[FI_RGBA_RED]; -- const double v0_g = dx_1 * p00[FI_RGBA_GREEN] + dx * p01[FI_RGBA_GREEN]; -- const double v0_b = dx_1 * p00[FI_RGBA_BLUE] + dx * p01[FI_RGBA_BLUE]; -+ const double v0_r = dx_1 * p00[0] + dx * p01[0]; -+ const double v0_g = dx_1 * p00[1] + dx * p01[1]; -+ const double v0_b = dx_1 * p00[2] + dx * p01[2]; - - // Bottom row, column-wise linear interpolation. -- const double v1_r = dx_1 * p10[FI_RGBA_RED] + dx * p11[FI_RGBA_RED]; -- const double v1_g = dx_1 * p10[FI_RGBA_GREEN] + dx * p11[FI_RGBA_GREEN]; -- const double v1_b = dx_1 * p10[FI_RGBA_BLUE] + dx * p11[FI_RGBA_BLUE]; -+ const double v1_r = dx_1 * p10[0] + dx * p11[0]; -+ const double v1_g = dx_1 * p10[1] + dx * p11[1]; -+ const double v1_b = dx_1 * p10[2] + dx * p11[2]; - - // Row-wise linear interpolation. - color->r = dy_1 * v0_r + dy * v1_r; -@@ -369,120 +290,94 @@ bool Bitmap::InterpolateBilinear(const double x, - - bool Bitmap::ExifCameraModel(std::string* camera_model) const { - // Read camera make and model -- std::string make_str; -- std::string model_str; -- std::string focal_length; -+ std::string_view make_str; -+ std::string_view model_str; -+ float focal_length = 0; - *camera_model = ""; -- if (ReadExifTag(handle_.ptr, FIMD_EXIF_MAIN, "Make", &make_str)) { -- *camera_model += (make_str + "-"); -+ if (GetMetaData("Make", &make_str)) { -+ *camera_model += std::string(make_str) + "-"; - } else { - *camera_model = ""; - return false; - } -- if (ReadExifTag(handle_.ptr, FIMD_EXIF_MAIN, "Model", &model_str)) { -- *camera_model += (model_str + "-"); -+ if (GetMetaData("Model", &model_str)) { -+ *camera_model += std::string(model_str) + "-"; - } else { - *camera_model = ""; - return false; - } -- if (ReadExifTag(handle_.ptr, -- FIMD_EXIF_EXIF, -- "FocalLengthIn35mmFilm", -- &focal_length) || -- ReadExifTag(handle_.ptr, FIMD_EXIF_EXIF, "FocalLength", &focal_length)) { -- *camera_model += (focal_length + "-"); -+ if (GetMetaData("Exif:FocalLengthIn35mmFilm", "float", &focal_length) || -+ GetMetaData("Exif:FocalLength", "float", &focal_length)) { -+ *camera_model += std::to_string(focal_length) + "-"; - } else { - *camera_model = ""; - return false; - } -- *camera_model += (std::to_string(width_) + "x" + std::to_string(height_)); -+ *camera_model += std::to_string(width_) + "x" + std::to_string(height_); - return true; - } - - bool Bitmap::ExifFocalLength(double* focal_length) const { - const double max_size = std::max(width_, height_); - -- ////////////////////////////////////////////////////////////////////////////// -- // Focal length in 35mm equivalent -- ////////////////////////////////////////////////////////////////////////////// -- -- std::string focal_length_35mm_str; -- if (ReadExifTag(handle_.ptr, -- FIMD_EXIF_EXIF, -- "FocalLengthIn35mmFilm", -- &focal_length_35mm_str)) { -- static const std::regex regex(".*?([0-9.]+).*?mm.*?"); -- std::cmatch result; -- if (std::regex_search(focal_length_35mm_str.c_str(), result, regex)) { -- const double focal_length_35 = std::stold(result[1]); -- if (focal_length_35 > 0) { -- *focal_length = focal_length_35 / 35.0 * max_size; -- return true; -- } -+ float focal_length_35mm = 0; -+ if (GetMetaData("Exif:FocalLengthIn35mmFilm", "float", &focal_length_35mm)) { -+ if (focal_length_35mm > 0) { -+ // Based on https://en.wikipedia.org/wiki/35_mm_equivalent_focal_length -+ // According to CIPA guidelines, 35 mm equivalent focal length is to be -+ // calculated like this: -+ // "focal length in 35 mm camera" = -+ // (Diagonal distance of image area in the 35 mm camera (43.27 mm) / -+ // Diagonal distance of image area on the image sensor of the DSC) -+ // * focal length of the lens of the DSC. -+ const double diagonal = std::sqrt(width_ * width_ + height_ * height_); -+ *focal_length = focal_length_35mm / 43.27 * diagonal; -+ return true; - } - } - -- ////////////////////////////////////////////////////////////////////////////// -- // Focal length in mm -- ////////////////////////////////////////////////////////////////////////////// -- -- std::string focal_length_str; -- if (ReadExifTag( -- handle_.ptr, FIMD_EXIF_EXIF, "FocalLength", &focal_length_str)) { -- std::regex regex(".*?([0-9.]+).*?mm"); -- std::cmatch result; -- if (std::regex_search(focal_length_str.c_str(), result, regex)) { -- const double focal_length_mm = std::stold(result[1]); -- -- // Lookup sensor width in database. -- std::string make_str; -- std::string model_str; -- if (ReadExifTag(handle_.ptr, FIMD_EXIF_MAIN, "Make", &make_str) && -- ReadExifTag(handle_.ptr, FIMD_EXIF_MAIN, "Model", &model_str)) { -- CameraDatabase database; -- double sensor_width; -- if (database.QuerySensorWidth(make_str, model_str, &sensor_width)) { -- *focal_length = focal_length_mm / sensor_width * max_size; -- return true; -+ float focal_length_mm = 0.f; -+ if (GetMetaData("Exif:FocalLength", "float", &focal_length_mm)) { -+ float focal_x_res = 0.f; -+ int focal_x_res_unit = 0; -+ if (GetMetaData("Exif:FocalPlaneXResolution", "float", &focal_x_res) && -+ GetMetaData( -+ "Exif:FocalPlaneResolutionUnit", "int", &focal_x_res_unit)) { -+ if (focal_length_mm > 0 && focal_x_res_unit > 1 && -+ focal_x_res_unit <= 5) { -+ double pixels_per_mm = 0; -+ switch (focal_x_res_unit) { -+ case 2: // inches -+ pixels_per_mm = focal_x_res * 25.4; -+ break; -+ case 3: // cm -+ pixels_per_mm = focal_x_res * 10.0; -+ break; -+ case 4: // mm -+ pixels_per_mm = focal_x_res * 1.0; -+ break; -+ case 5: // um -+ pixels_per_mm = focal_x_res * 0.1; -+ break; -+ default: -+ LOG(FATAL) << "Unexpected FocalPlaneXResolution value"; - } -+ *focal_length = focal_length_mm / pixels_per_mm; -+ return true; - } -+ } - -- // Extract sensor width from EXIF. -- std::string pixel_x_dim_str; -- std::string x_res_str; -- std::string res_unit_str; -- if (ReadExifTag(handle_.ptr, -- FIMD_EXIF_EXIF, -- "PixelXDimension", -- &pixel_x_dim_str) && -- ReadExifTag(handle_.ptr, -- FIMD_EXIF_EXIF, -- "FocalPlaneXResolution", -- &x_res_str) && -- ReadExifTag(handle_.ptr, -- FIMD_EXIF_EXIF, -- "FocalPlaneResolutionUnit", -- &res_unit_str)) { -- regex = std::regex(".*?([0-9.]+).*?"); -- if (std::regex_search(pixel_x_dim_str.c_str(), result, regex)) { -- const double pixel_x_dim = std::stold(result[1]); -- regex = std::regex(".*?([0-9.]+).*?/.*?([0-9.]+).*?"); -- if (std::regex_search(x_res_str.c_str(), result, regex)) { -- const double x_res = std::stold(result[2]) / std::stold(result[1]); -- // Use PixelXDimension instead of actual width of image, since -- // the image might have been resized, but the EXIF data preserved. -- const double ccd_width = x_res * pixel_x_dim; -- if (ccd_width > 0 && focal_length_mm > 0) { -- if (res_unit_str == "cm") { -- *focal_length = focal_length_mm / (ccd_width * 10.0) * max_size; -- return true; -- } else if (res_unit_str == "inches") { -- *focal_length = focal_length_mm / (ccd_width * 25.4) * max_size; -- return true; -- } -- } -- } -- } -+ // Lookup sensor width in database. -+ std::string_view make_str; -+ std::string_view model_str; -+ if (GetMetaData("Make", &make_str) && GetMetaData("Model", &model_str)) { -+ CameraDatabase database; -+ double sensor_width_mm; -+ if (database.QuerySensorWidth(std::string(make_str), -+ std::string(model_str), -+ &sensor_width_mm)) { -+ *focal_length = focal_length_mm / sensor_width_mm * max_size; -+ return true; - } - } - } -@@ -491,199 +386,216 @@ bool Bitmap::ExifFocalLength(double* focal_length) const { - } - - bool Bitmap::ExifLatitude(double* latitude) const { -- std::string str; -+ std::string_view latitude_ref; - double sign = 1.0; -- if (ReadExifTag(handle_.ptr, FIMD_EXIF_GPS, "GPSLatitudeRef", &str)) { -- StringTrim(&str); -- StringToLower(&str); -- if (!str.empty() && str[0] == 's') { -+ if (GetMetaData("GPS:LatitudeRef", &latitude_ref)) { -+ if (latitude_ref == "N" || latitude_ref == "n") { -+ sign = 1.0; -+ } else if (latitude_ref == "S" || latitude_ref == "s") { - sign = -1.0; - } - } -- if (ReadExifTag(handle_.ptr, FIMD_EXIF_GPS, "GPSLatitude", &str)) { -- static const std::regex regex(".*?([0-9.]+):([0-9.]+):([0-9.]+).*?"); -- std::cmatch result; -- if (std::regex_search(str.c_str(), result, regex)) { -- const double hours = std::stold(result[1]); -- const double minutes = std::stold(result[2]); -- const double seconds = std::stold(result[3]); -- double value = hours + minutes / 60.0 + seconds / 3600.0; -- if (value > 0 && sign < 0) { -- value *= sign; -- } -- *latitude = value; -- return true; -+ float deg_min_sec[3] = {0.0}; -+ if (GetMetaData("GPS:Latitude", "point", °_min_sec)) { -+ *latitude = -+ deg_min_sec[0] + deg_min_sec[1] / 60.0 + deg_min_sec[2] / 3600.0; -+ if (*latitude > 0 && sign < 0) { -+ *latitude *= sign; - } -+ return true; - } - return false; - } - - bool Bitmap::ExifLongitude(double* longitude) const { -- std::string str; -+ std::string_view longitude_ref; - double sign = 1.0; -- if (ReadExifTag(handle_.ptr, FIMD_EXIF_GPS, "GPSLongitudeRef", &str)) { -- StringTrim(&str); -- StringToLower(&str); -- if (!str.empty() && str[0] == 'w') { -+ if (GetMetaData("GPS:LongitudeRef", &longitude_ref)) { -+ if (longitude_ref == "W" || longitude_ref == "w") { -+ sign = 1.0; -+ } else if (longitude_ref == "E" || longitude_ref == "e") { - sign = -1.0; - } - } -- if (ReadExifTag(handle_.ptr, FIMD_EXIF_GPS, "GPSLongitude", &str)) { -- static const std::regex regex(".*?([0-9.]+):([0-9.]+):([0-9.]+).*?"); -- std::cmatch result; -- if (std::regex_search(str.c_str(), result, regex)) { -- const double hours = std::stold(result[1]); -- const double minutes = std::stold(result[2]); -- const double seconds = std::stold(result[3]); -- double value = hours + minutes / 60.0 + seconds / 3600.0; -- if (value > 0 && sign < 0) { -- value *= sign; -- } -- *longitude = value; -- return true; -+ float deg_min_sec[3] = {0.0}; -+ if (GetMetaData("GPS:Longitude", "point", °_min_sec)) { -+ *longitude = -+ deg_min_sec[0] + deg_min_sec[1] / 60.0 + deg_min_sec[2] / 3600.0; -+ if (*longitude > 0 && sign < 0) { -+ *longitude *= sign; - } -+ return true; - } - return false; - } - - bool Bitmap::ExifAltitude(double* altitude) const { -- std::string str; -- if (ReadExifTag(handle_.ptr, FIMD_EXIF_GPS, "GPSAltitude", &str)) { -- static const std::regex regex(".*?([0-9.]+).*?/.*?([0-9.]+).*?"); -- std::cmatch result; -- if (std::regex_search(str.c_str(), result, regex)) { -- *altitude = std::stold(result[1]) / std::stold(result[2]); -- return true; -+ std::string_view altitude_ref; -+ double sign = 1.0; -+ if (GetMetaData("GPS:AltitudeRef", &altitude_ref)) { -+ if (altitude_ref == "0") { -+ sign = 1.0; -+ } else if (altitude_ref == "1") { -+ sign = -1.0; - } - } -+ float altitude_float = 0.f; -+ if (GetMetaData("GPS:Altitude", "float", &altitude_float)) { -+ *altitude = altitude_float; -+ if (*altitude > 0 && sign < 0) { -+ *altitude *= sign; -+ } -+ return true; -+ } - return false; - } - --bool Bitmap::Read(const std::string& path, const bool as_rgb) { -+bool Bitmap::Read(const std::string& path, -+ const bool as_rgb, -+ const bool linearize_colorspace) { - if (!ExistsFile(path)) { -+ VLOG(3) << "Failed to read bitmap, because file does not exist"; - return false; - } - -- const FREE_IMAGE_FORMAT format = FreeImage_GetFileType(path.c_str(), 0); -+ OIIO::ImageSpec config; -+ config["oiio:reorient"] = 0; - -- if (format == FIF_UNKNOWN) { -+ const auto input = OIIO::ImageInput::open(path, &config); -+ if (!input) { -+ VLOG(3) << "Failed to read bitmap specs"; - return false; - } - -- handle_ = FreeImageHandle(FreeImage_Load(format, path.c_str())); -- if (handle_.ptr == nullptr) { -+ const OIIO::ImageSpec& image_spec = input->spec(); -+ width_ = image_spec.width; -+ height_ = image_spec.height; -+ channels_ = image_spec.nchannels; -+ if (channels_ != 1 && channels_ != 3) { -+ VLOG(3) << "Bitmap is not grayscale or RGB"; - return false; - } - -- if (!IsPtrRGB(handle_.ptr) && as_rgb) { -- FIBITMAP* converted_bitmap = FreeImage_ConvertTo24Bits(handle_.ptr); -- handle_ = FreeImageHandle(converted_bitmap); -- } else if (!IsPtrGrey(handle_.ptr) && !as_rgb) { -- if (FreeImage_GetBPP(handle_.ptr) != 24) { -- FIBITMAP* converted_bitmap_24 = FreeImage_ConvertTo24Bits(handle_.ptr); -- handle_ = FreeImageHandle(converted_bitmap_24); -+ data_.resize(width_ * height_ * channels_); -+ input->read_image(0, 0, 0, channels_, OIIO::TypeDesc::UINT8, data_.data()); -+ input->close(); -+ -+ auto meta_data = std::make_unique(); -+ meta_data->image_spec = image_spec; -+ meta_data_ = std::move(meta_data); -+ -+ if (linearize_colorspace) { -+ const std::string colorspace = image_spec["oiio:ColorSpace"]; -+ if (IsEquivalentColorSpace(colorspace, "linear")) { -+ data_ = ConvertColorSpace( -+ data_.data(), width_, height_, channels_, colorspace, "linear"); - } -- FIBITMAP* converted_bitmap = FreeImage_ConvertToGreyscale(handle_.ptr); -- handle_ = FreeImageHandle(converted_bitmap); - } - -- if (!IsPtrSupported(handle_.ptr)) { -- handle_ = FreeImageHandle(); -- return false; -+ if (as_rgb && channels_ != 3) { -+ *this = CloneAsRGB(); -+ } else if (!as_rgb && channels_ != 1) { -+ *this = CloneAsGrey(); - } - -- width_ = FreeImage_GetWidth(handle_.ptr); -- height_ = FreeImage_GetHeight(handle_.ptr); -- channels_ = as_rgb ? 3 : 1; -- - return true; - } - --bool Bitmap::Write(const std::string& path, const int flags) const { -- FREE_IMAGE_FORMAT save_format = FreeImage_GetFIFFromFilename(path.c_str()); -- if (save_format == FIF_UNKNOWN) { -- // If format could not be deduced, save as PNG by default. -- save_format = FIF_PNG; -+bool Bitmap::Write(const std::string& path, -+ const bool delinearize_colorspace) const { -+ const auto output = OIIO::ImageOutput::create(path); -+ if (!output) { -+ std::cerr << "Could not create an ImageOutput for " << path -+ << ", error = " << OIIO::geterror() << "\n"; -+ return false; - } - -- int save_flags = flags; -- if (save_format == FIF_JPEG && flags == 0) { -- // Use superb JPEG quality by default to avoid artifacts. -- save_flags = JPEG_QUALITYSUPERB; -+ auto* meta_data = OIIOMetaData::Upcast(meta_data_.get()); -+ -+ const uint8_t* output_data_ptr = data_.data(); -+ std::vector maybe_linearized_output_data; -+ if (delinearize_colorspace && linear_colorspace_) { -+ std::string_view colorspace; -+ if (!GetMetaData("oiio:ColorSpace", &colorspace)) { -+ // Assume sRGB color space if not specified. -+ colorspace = "sRGB"; -+ SetImageSpecColorSpace(meta_data->image_spec, -+ OIIOFromStdStringView(colorspace)); -+ } -+ -+ maybe_linearized_output_data = ConvertColorSpace( -+ data_.data(), width_, height_, channels_, "linear", colorspace); -+ output_data_ptr = maybe_linearized_output_data.data(); - } - -- bool success = false; -- if (save_flags == 0) { -- success = FreeImage_Save(save_format, handle_.ptr, path.c_str()); -- } else { -- success = -- FreeImage_Save(save_format, handle_.ptr, path.c_str(), save_flags); -+ if (HasFileExtension(path, ".jpg") || HasFileExtension(path, ".jpeg")) { -+ std::string_view compression; -+ if (!GetMetaData("Compression", &compression)) { -+ // Save JPEG in superb quality by default to reduce compression artifacts. -+ meta_data->image_spec["Compression"] = "jpeg:100"; -+ } - } - -- return success; --} -+ if (!output->open(path, meta_data->image_spec)) { -+ VLOG(3) << "Could not open " << path << ", error = " << output->geterror() -+ << "\n"; -+ return false; -+ } - --void Bitmap::Smooth(const float sigma_x, const float sigma_y) { -- std::vector array(width_ * height_); -- std::vector array_smoothed(width_ * height_); -- for (int d = 0; d < channels_; ++d) { -- size_t i = 0; -- for (int y = 0; y < height_; ++y) { -- const uint8_t* line = FreeImage_GetScanLine(handle_.ptr, height_ - 1 - y); -- for (int x = 0; x < width_; ++x) { -- array[i] = line[x * channels_ + d]; -- i += 1; -- } -- } -+ if (!output->write_image(OIIO::TypeDesc::UINT8, output_data_ptr)) { -+ VLOG(3) << "Could not write pixels to " << path -+ << ", error = " << output->geterror() << "\n"; -+ return false; -+ } - -- vl_imsmooth_f(array_smoothed.data(), -- width_, -- array.data(), -- width_, -- height_, -- width_, -- sigma_x, -- sigma_y); -- -- i = 0; -- for (int y = 0; y < height_; ++y) { -- uint8_t* line = FreeImage_GetScanLine(handle_.ptr, height_ - 1 - y); -- for (int x = 0; x < width_; ++x) { -- line[x * channels_ + d] = -- TruncateCast(array_smoothed[i]); -- i += 1; -- } -- } -+ if (!output->close()) { -+ VLOG(3) << "Error closing " << path << ", error = " << output->geterror() -+ << "\n"; -+ return false; - } -+ -+ return true; - } - - void Bitmap::Rescale(const int new_width, - const int new_height, - RescaleFilter filter) { -- FREE_IMAGE_FILTER fi_filter = FILTER_BILINEAR; -- switch (filter) { -- case RescaleFilter::kBilinear: -- fi_filter = FILTER_BILINEAR; -- break; -- case RescaleFilter::kBox: -- fi_filter = FILTER_BOX; -- break; -- default: -- LOG(FATAL_THROW) << "Filter not implemented"; -- } -- SetPtr(FreeImage_Rescale(handle_.ptr, new_width, new_height, fi_filter)); --} -+ const OIIO::ImageBuf buf( -+ OIIO::ImageSpec(width_, height_, channels_, OIIO::TypeDesc::UINT8), -+ data_.data()); -+ std::vector new_data(new_width * new_height * channels_); -+ OIIO::ImageBuf new_buf( -+ OIIO::ImageSpec(new_width, new_height, channels_, OIIO::TypeDesc::UINT8), -+ new_data.data()); -+ THROW_CHECK(OIIO::ImageBufAlgo::resize(new_buf, buf)); - --Bitmap Bitmap::Clone() const { -- FIBITMAP* cloned = FreeImage_Clone(handle_.ptr); -- return Bitmap(cloned); -+ width_ = new_width; -+ height_ = new_height; -+ data_ = std::move(new_data); -+ auto* meta_data = OIIOMetaData::Upcast(meta_data_.get()); -+ meta_data->image_spec.width = new_width; -+ meta_data->image_spec.height = new_height; - } - -+Bitmap Bitmap::Clone() const { return *this; } -+ - Bitmap Bitmap::CloneAsGrey() const { - if (IsGrey()) { - return Clone(); - } else { -- return Bitmap(FreeImage_ConvertToGreyscale(handle_.ptr)); -+ Bitmap cloned; -+ cloned.width_ = width_; -+ cloned.height_ = height_; -+ cloned.channels_ = 1; -+ cloned.linear_colorspace_ = linear_colorspace_; -+ cloned.data_.resize(width_ * height_); -+ for (size_t i = 0; i < cloned.data_.size(); ++i) { -+ cloned.data_[i] = -+ std::round(.2126f * data_[3 * i + 0] + .7152f * data_[3 * i + 1] + -+ .0722f * data_[3 * i + 2]); -+ } -+ cloned.meta_data_ = OIIOMetaData::Clone(meta_data_); -+ return cloned; - } - } - -@@ -691,58 +603,72 @@ Bitmap Bitmap::CloneAsRGB() const { - if (IsRGB()) { - return Clone(); - } else { -- return Bitmap(FreeImage_ConvertTo24Bits(handle_.ptr)); -+ THROW_CHECK_EQ(channels_, 1); -+ Bitmap cloned; -+ cloned.width_ = width_; -+ cloned.height_ = height_; -+ cloned.channels_ = 3; -+ cloned.linear_colorspace_ = linear_colorspace_; -+ cloned.data_.resize(width_ * height_ * 3); -+ for (size_t i = 0; i < data_.size(); ++i) { -+ cloned.data_[3 * i + 0] = data_[i]; -+ cloned.data_[3 * i + 1] = data_[i]; -+ cloned.data_[3 * i + 2] = data_[i]; -+ } -+ cloned.meta_data_ = OIIOMetaData::Clone(meta_data_); -+ return cloned; -+ } -+} -+ -+void Bitmap::SetMetaData(const std::string_view& name, -+ const std::string_view& type, -+ const void* value) { -+ THROW_CHECK_NE(type, "string"); -+ auto* meta_data = OIIOMetaData::Upcast(meta_data_.get()); -+ OIIO::TypeDesc type_desc; -+ type_desc.fromstring(OIIOFromStdStringView(type)); -+ THROW_CHECK_NE(type_desc, OIIO::TypeDesc::UNKNOWN); -+ meta_data->image_spec.attribute( -+ OIIOFromStdStringView(name), type_desc, value); -+} -+ -+void Bitmap::SetMetaData(const std::string_view& name, -+ const std::string_view& value) { -+ auto* meta_data = OIIOMetaData::Upcast(meta_data_.get()); -+ meta_data->image_spec.attribute(OIIOFromStdStringView(name), -+ OIIOFromStdStringView(value)); -+} -+ -+bool Bitmap::GetMetaData(const std::string_view& name, -+ const std::string_view& type, -+ void* value) const { -+ THROW_CHECK_NE(type, "string"); -+ auto* meta_data = OIIOMetaData::Upcast(meta_data_.get()); -+ OIIO::TypeDesc type_desc; -+ type_desc.fromstring(OIIOFromStdStringView(type)); -+ THROW_CHECK_NE(type_desc, OIIO::TypeDesc::UNKNOWN); -+ return meta_data->image_spec.getattribute( -+ OIIOFromStdStringView(name), type_desc, value); -+} -+ -+bool Bitmap::GetMetaData(const std::string_view& name, -+ std::string_view* value) const { -+ auto* meta_data = OIIOMetaData::Upcast(meta_data_.get()); -+ OIIO::ustring ustring_value; -+ if (meta_data->image_spec.getattribute( -+ OIIOFromStdStringView(name), OIIO::TypeString, &ustring_value)) { -+ *value = std::string_view(ustring_value.data(), ustring_value.size()); -+ return true; - } -+ return false; - } - - void Bitmap::CloneMetadata(Bitmap* target) const { - THROW_CHECK_NOTNULL(target); -- THROW_CHECK_NOTNULL(target->Data()); -- FreeImage_CloneMetadata(handle_.ptr, target->Data()); --} -- --void Bitmap::SetPtr(FIBITMAP* ptr) { -- THROW_CHECK_NOTNULL(ptr); -- -- if (!IsPtrSupported(ptr)) { -- FreeImageHandle temp_handle(ptr); -- ptr = FreeImage_ConvertTo24Bits(temp_handle.ptr); -- THROW_CHECK(IsPtrSupported(ptr)); -- } -- -- handle_ = FreeImageHandle(ptr); -- width_ = FreeImage_GetWidth(handle_.ptr); -- height_ = FreeImage_GetHeight(handle_.ptr); -- channels_ = IsPtrRGB(handle_.ptr) ? 3 : 1; --} -- --Bitmap::FreeImageHandle::FreeImageHandle() : ptr(nullptr) {} -- --Bitmap::FreeImageHandle::FreeImageHandle(FIBITMAP* ptr) : ptr(ptr) {} -- --Bitmap::FreeImageHandle::~FreeImageHandle() { -- if (ptr != nullptr) { -- FreeImage_Unload(ptr); -- ptr = nullptr; -- } --} -- --Bitmap::FreeImageHandle::FreeImageHandle( -- Bitmap::FreeImageHandle&& other) noexcept { -- ptr = other.ptr; -- other.ptr = nullptr; --} -- --Bitmap::FreeImageHandle& Bitmap::FreeImageHandle::operator=( -- Bitmap::FreeImageHandle&& other) noexcept { -- if (this != &other) { -- if (ptr != nullptr) { -- FreeImage_Unload(ptr); -- } -- ptr = other.ptr; -- other.ptr = nullptr; -- } -- return *this; -+ target->meta_data_ = OIIOMetaData::Clone(meta_data_); -+ auto* target_meta_data = OIIOMetaData::Upcast(target->meta_data_.get()); -+ target_meta_data->image_spec.width = target->Width(); -+ target_meta_data->image_spec.height = target->Height(); - } - - std::ostream& operator<<(std::ostream& stream, const Bitmap& bitmap) { -diff --git a/src/colmap/sensor/bitmap.h b/src/colmap/sensor/bitmap.h -index 925360ba..e07d6aee 100644 ---- a/src/colmap/sensor/bitmap.h -+++ b/src/colmap/sensor/bitmap.h -@@ -36,11 +36,10 @@ - #include - #include - #include -+#include - #include - #include - --struct FIBITMAP; -- - namespace colmap { - - // Templated bitmap color class. -@@ -65,70 +64,47 @@ struct BitmapColor { - T b; - }; - --// Wrapper class around FreeImage bitmaps. -+// Wrapper class around bitmaps. - class Bitmap { - public: - Bitmap(); -+ Bitmap(int width, int height, bool as_rgb, bool linear_colorspace = true); - -- // Copy constructor. - Bitmap(const Bitmap& other); -- // Move constructor. - Bitmap(Bitmap&& other) noexcept; - -- // Create bitmap object from existing FreeImage bitmap object. Note that -- // this class takes ownership of the object. -- explicit Bitmap(FIBITMAP* data); -- -- // Copy assignment. - Bitmap& operator=(const Bitmap& other); -- // Move assignment. - Bitmap& operator=(Bitmap&& other) noexcept; - -- // Allocate bitmap by overwriting the existing data. -- bool Allocate(int width, int height, bool as_rgb); -- -- // Deallocate the bitmap by releasing the existing data. -- void Deallocate(); -- -- // Get pointer to underlying FreeImage object. -- inline const FIBITMAP* Data() const; -- inline FIBITMAP* Data(); -- - // Dimensions of bitmap. - inline int Width() const; - inline int Height() const; - inline int Channels() const; - -- // Number of bits per pixel. This is 8 for grey and 24 for RGB image. -- unsigned int BitsPerPixel() const; -+ // Number of bits per pixel. This is 8 for grey and 24 for RGB images. -+ inline int BitsPerPixel() const; -+ -+ // Number of bytes required to store image. -+ inline size_t NumBytes() const; -+ -+ // Scan line size in bytes, also known as stride. -+ inline int Pitch() const; - -- // Scan width of bitmap which differs from the actual image width to achieve -- // 32 bit aligned memory. Also known as stride. -- unsigned int Pitch() const; -+ // Check whether the image is empty (i.e., width/height=0). -+ inline bool IsEmpty() const; - - // Check whether image is grey- or colorscale. - inline bool IsRGB() const; - inline bool IsGrey() const; - -- // Number of bytes required to store image. -- size_t NumBytes() const; -- -- // Copy raw image data to array. -- std::vector ConvertToRowMajorArray() const; -- std::vector ConvertToColMajorArray() const; -- -- // Convert to/from raw bits. -- std::vector ConvertToRawBits() const; -- static Bitmap ConvertFromRawBits( -- const uint8_t* data, int pitch, int width, int height, bool rgb = true); -+ // Access raw image data array. -+ inline std::vector& RowMajorData(); -+ inline const std::vector& RowMajorData() const; - - // Manipulate individual pixels. For grayscale images, only the red element - // of the RGB color is used. -- bool GetPixel(int x, int y, BitmapColor* color) const; -- bool SetPixel(int x, int y, const BitmapColor& color); -- -- // Get pointer to y-th scanline, where the 0-th scanline is at the top. -- const uint8_t* GetScanline(int y) const; -+ inline bool GetPixel(int x, int y, BitmapColor* color) const; -+ inline bool SetPixel(int x, int y, const BitmapColor& color); - - // Fill entire bitmap with uniform color. For grayscale images, the first - // element of the vector is used. -@@ -148,15 +124,15 @@ class Bitmap { - bool ExifLongitude(double* longitude) const; - bool ExifAltitude(double* altitude) const; - -- // Read bitmap at given path and convert to grey- or colorscale. -- bool Read(const std::string& path, bool as_rgb = true); -- -- // Write image to file. Flags can be used to set e.g. the JPEG quality. -- // Consult the FreeImage documentation for all available flags. -- bool Write(const std::string& path, int flags = 0) const; -+ // Read bitmap at given path and convert to grey- or colorscale. Defaults to -+ // linearizing the colorspace for image processing. -+ bool Read(const std::string& path, -+ bool as_rgb = true, -+ bool linearize_colorspace = false); - -- // Smooth the image using a Gaussian kernel. -- void Smooth(float sigma_x, float sigma_y); -+ // Write bitmap to file at given path. If the bitmap is linearized, write it -+ // de-linearized to the file in sRGB. -+ bool Write(const std::string& path, bool delinearize_colorspace = true) const; - - // Rescale image to the new dimensions. - enum class RescaleFilter { -@@ -172,27 +148,30 @@ class Bitmap { - Bitmap CloneAsGrey() const; - Bitmap CloneAsRGB() const; - -+ // Access metadata information (EXIF). -+ void SetMetaData(const std::string_view& name, -+ const std::string_view& type, -+ const void* value); -+ void SetMetaData(const std::string_view& name, const std::string_view& value); -+ bool GetMetaData(const std::string_view& name, -+ const std::string_view& type, -+ void* value) const; -+ bool GetMetaData(const std::string_view& name, std::string_view* value) const; -+ - // Clone metadata from this bitmap object to another target bitmap object. - void CloneMetadata(Bitmap* target) const; - -- private: -- struct FreeImageHandle { -- FreeImageHandle(); -- explicit FreeImageHandle(FIBITMAP* ptr); -- ~FreeImageHandle(); -- FreeImageHandle(FreeImageHandle&&) noexcept; -- FreeImageHandle& operator=(FreeImageHandle&&) noexcept; -- FreeImageHandle(const FreeImageHandle&) = delete; -- FreeImageHandle& operator=(const FreeImageHandle&) = delete; -- FIBITMAP* ptr; -+ struct MetaData { -+ virtual ~MetaData() = default; - }; - -- void SetPtr(FIBITMAP* ptr); -- -- FreeImageHandle handle_; -+ private: - int width_; - int height_; - int channels_; -+ bool linear_colorspace_; -+ std::vector data_; -+ std::unique_ptr meta_data_; - }; - - std::ostream& operator<<(std::ostream& stream, const Bitmap& bitmap); -@@ -264,15 +243,70 @@ std::ostream& operator<<(std::ostream& output, const BitmapColor& color) { - return output; - } - --FIBITMAP* Bitmap::Data() { return handle_.ptr; } --const FIBITMAP* Bitmap::Data() const { return handle_.ptr; } -- - int Bitmap::Width() const { return width_; } -+ - int Bitmap::Height() const { return height_; } -+ - int Bitmap::Channels() const { return channels_; } - -+size_t Bitmap::NumBytes() const { return data_.size(); } -+ -+int Bitmap::BitsPerPixel() const { return channels_ * 8; } -+ -+int Bitmap::Pitch() const { return width_ * channels_; } -+ -+bool Bitmap::IsEmpty() const { return NumBytes() == 0; } -+ - bool Bitmap::IsRGB() const { return channels_ == 3; } - - bool Bitmap::IsGrey() const { return channels_ == 1; } - -+std::vector& Bitmap::RowMajorData() { return data_; } -+ -+const std::vector& Bitmap::RowMajorData() const { return data_; } -+ -+bool Bitmap::GetPixel(const int x, -+ const int y, -+ BitmapColor* color) const { -+ if (x < 0 || x >= width_ || y < 0 || y >= height_) { -+ return false; -+ } -+ -+ if (IsGrey()) { -+ color->r = data_[y * width_ + x]; -+ color->g = color->r; -+ color->b = color->r; -+ return true; -+ } else if (IsRGB()) { -+ const uint8_t* pixel = &data_[(y * width_ + x) * channels_]; -+ color->r = pixel[0]; -+ color->g = pixel[1]; -+ color->b = pixel[2]; -+ return true; -+ } -+ -+ return false; -+} -+ -+bool Bitmap::SetPixel(const int x, -+ const int y, -+ const BitmapColor& color) { -+ if (x < 0 || x >= width_ || y < 0 || y >= height_) { -+ return false; -+ } -+ -+ if (IsGrey()) { -+ data_[y * width_ + x] = color.r; -+ return true; -+ } else if (IsRGB()) { -+ uint8_t* pixel = &data_[(y * width_ + x) * channels_]; -+ pixel[0] = color.r; -+ pixel[1] = color.g; -+ pixel[2] = color.b; -+ return true; -+ } -+ -+ return false; -+} -+ - } // namespace colmap -diff --git a/src/colmap/sensor/bitmap_test.cc b/src/colmap/sensor/bitmap_test.cc -index 0a1c787a..09998aac 100644 ---- a/src/colmap/sensor/bitmap_test.cc -+++ b/src/colmap/sensor/bitmap_test.cc -@@ -31,7 +31,7 @@ - - #include "colmap/util/testing.h" - --#include -+#include - #include - - namespace colmap { -@@ -53,6 +53,13 @@ TEST(Bitmap, BitmapGrayColor) { - EXPECT_EQ(color.b, 5); - } - -+TEST(Bitmap, BitmapRGBColor) { -+ BitmapColor color(1, 2, 3); -+ EXPECT_EQ(color.r, 1); -+ EXPECT_EQ(color.g, 2); -+ EXPECT_EQ(color.b, 3); -+} -+ - TEST(Bitmap, BitmapColorCast) { - BitmapColor color1(1.1f, 2.9f, -3.0f); - BitmapColor color2 = color1.Cast(); -@@ -68,285 +75,125 @@ TEST(Bitmap, Empty) { - EXPECT_EQ(bitmap.Channels(), 0); - EXPECT_FALSE(bitmap.IsRGB()); - EXPECT_FALSE(bitmap.IsGrey()); -+ EXPECT_TRUE(bitmap.IsEmpty()); - } - - TEST(Bitmap, Print) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, true); -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); - std::ostringstream stream; - stream << bitmap; -- EXPECT_EQ(stream.str(), "Bitmap(width=100, height=100, channels=3)"); -+ EXPECT_EQ(stream.str(), "Bitmap(width=100, height=80, channels=3)"); - } - - TEST(Bitmap, AllocateRGB) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, true); -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); - EXPECT_EQ(bitmap.Width(), 100); -- EXPECT_EQ(bitmap.Height(), 100); -+ EXPECT_EQ(bitmap.Height(), 80); - EXPECT_EQ(bitmap.Channels(), 3); - EXPECT_TRUE(bitmap.IsRGB()); - EXPECT_FALSE(bitmap.IsGrey()); -+ EXPECT_FALSE(bitmap.IsEmpty()); - } - - TEST(Bitmap, AllocateGrey) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, false); -+ Bitmap bitmap(100, 80, /*as_rgb=*/false); - EXPECT_EQ(bitmap.Width(), 100); -- EXPECT_EQ(bitmap.Height(), 100); -+ EXPECT_EQ(bitmap.Height(), 80); - EXPECT_EQ(bitmap.Channels(), 1); - EXPECT_FALSE(bitmap.IsRGB()); - EXPECT_TRUE(bitmap.IsGrey()); --} -- --TEST(Bitmap, Deallocate) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, false); -- bitmap.Deallocate(); -- EXPECT_EQ(bitmap.Width(), 0); -- EXPECT_EQ(bitmap.Height(), 0); -- EXPECT_EQ(bitmap.Channels(), 0); -- EXPECT_EQ(bitmap.NumBytes(), 0); -- EXPECT_FALSE(bitmap.IsRGB()); -- EXPECT_FALSE(bitmap.IsGrey()); -+ EXPECT_FALSE(bitmap.IsEmpty()); - } - - TEST(Bitmap, MoveConstruct) { -- Bitmap bitmap; -- bitmap.Allocate(2, 1, true); -- const auto* data = bitmap.Data(); -+ Bitmap bitmap(2, 1, /*as_rgb=*/true); - Bitmap moved_bitmap(std::move(bitmap)); - EXPECT_EQ(moved_bitmap.Width(), 2); - EXPECT_EQ(moved_bitmap.Height(), 1); - EXPECT_EQ(moved_bitmap.Channels(), 3); -- EXPECT_EQ(moved_bitmap.Data(), data); - // NOLINTBEGIN(bugprone-use-after-move,clang-analyzer-cplusplus.Move) - EXPECT_EQ(bitmap.Width(), 0); - EXPECT_EQ(bitmap.Height(), 0); - EXPECT_EQ(bitmap.Channels(), 0); - EXPECT_EQ(bitmap.NumBytes(), 0); -- EXPECT_EQ(bitmap.Data(), nullptr); - // NOLINTEND(bugprone-use-after-move,clang-analyzer-cplusplus.Move) - } - - TEST(Bitmap, MoveAssign) { -- Bitmap bitmap; -- bitmap.Allocate(2, 1, true); -- const auto* data = bitmap.Data(); -+ Bitmap bitmap(2, 1, /*as_rgb=*/true); - Bitmap moved_bitmap = std::move(bitmap); - EXPECT_EQ(moved_bitmap.Width(), 2); - EXPECT_EQ(moved_bitmap.Height(), 1); - EXPECT_EQ(moved_bitmap.Channels(), 3); -- EXPECT_EQ(moved_bitmap.Data(), data); - // NOLINTBEGIN(bugprone-use-after-move,clang-analyzer-cplusplus.Move) - EXPECT_EQ(bitmap.Width(), 0); - EXPECT_EQ(bitmap.Height(), 0); - EXPECT_EQ(bitmap.Channels(), 0); - EXPECT_EQ(bitmap.NumBytes(), 0); -- EXPECT_EQ(bitmap.Data(), nullptr); - // NOLINTEND(bugprone-use-after-move,clang-analyzer-cplusplus.Move) - } - - TEST(Bitmap, BitsPerPixel) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, true); -+ Bitmap bitmap(1, 1, /*as_rgb=*/true); - EXPECT_EQ(bitmap.BitsPerPixel(), 24); -- bitmap.Allocate(100, 100, false); -+ bitmap = Bitmap(1, 1, /*as_rgb=*/false); - EXPECT_EQ(bitmap.BitsPerPixel(), 8); - } - - TEST(Bitmap, NumBytes) { - Bitmap bitmap; - EXPECT_EQ(bitmap.NumBytes(), 0); -- bitmap.Allocate(100, 100, true); -- EXPECT_EQ(bitmap.NumBytes(), 3 * 100 * 100); -- bitmap.Allocate(100, 100, false); -- EXPECT_EQ(bitmap.NumBytes(), 100 * 100); -+ bitmap = Bitmap(100, 80, /*as_rgb=*/true); -+ EXPECT_EQ(bitmap.NumBytes(), 3 * 100 * 80); -+ bitmap = Bitmap(100, 80, /*as_rgb=*/false); -+ EXPECT_EQ(bitmap.NumBytes(), 100 * 80); - } - --TEST(Bitmap, ConvertToRowMajorArrayRGB) { -- Bitmap bitmap; -- bitmap.Allocate(2, 2, true); -+TEST(Bitmap, RowMajorDataRGB) { -+ Bitmap bitmap(2, 3, /*as_rgb=*/true); - bitmap.SetPixel(0, 0, BitmapColor(0, 0, 0)); - bitmap.SetPixel(0, 1, BitmapColor(1, 0, 0)); -- bitmap.SetPixel(1, 0, BitmapColor(2, 0, 0)); -- bitmap.SetPixel(1, 1, BitmapColor(3, 0, 0)); -- const std::vector array = bitmap.ConvertToRowMajorArray(); -- ASSERT_EQ(array.size(), 12); -- EXPECT_EQ(array[0], 0); -- EXPECT_EQ(array[1], 0); -- EXPECT_EQ(array[2], 0); -- EXPECT_EQ(array[3], 0); -- EXPECT_EQ(array[4], 0); -- EXPECT_EQ(array[5], 2); -- EXPECT_EQ(array[6], 0); -- EXPECT_EQ(array[7], 0); -- EXPECT_EQ(array[8], 1); -- EXPECT_EQ(array[9], 0); -- EXPECT_EQ(array[10], 0); -- EXPECT_EQ(array[11], 3); --} -- --TEST(Bitmap, ConvertToRowMajorArrayGrey) { -- Bitmap bitmap; -- bitmap.Allocate(2, 2, false); -- bitmap.SetPixel(0, 0, BitmapColor(0, 0, 0)); -- bitmap.SetPixel(0, 1, BitmapColor(1, 0, 0)); -- bitmap.SetPixel(1, 0, BitmapColor(2, 0, 0)); -- bitmap.SetPixel(1, 1, BitmapColor(3, 0, 0)); -- const std::vector array = bitmap.ConvertToRowMajorArray(); -- ASSERT_EQ(array.size(), 4); -- EXPECT_EQ(array[0], 0); -- EXPECT_EQ(array[1], 2); -- EXPECT_EQ(array[2], 1); -- EXPECT_EQ(array[3], 3); -+ bitmap.SetPixel(0, 2, BitmapColor(2, 0, 0)); -+ bitmap.SetPixel(1, 0, BitmapColor(3, 0, 0)); -+ bitmap.SetPixel(1, 1, BitmapColor(4, 0, 0)); -+ bitmap.SetPixel(1, 2, BitmapColor(5, 0, 0)); -+ EXPECT_THAT(bitmap.RowMajorData(), -+ testing::ElementsAre( -+ 0, 0, 0, 3, 0, 0, 1, 0, 0, 4, 0, 0, 2, 0, 0, 5, 0, 0)); - } - --TEST(Bitmap, ConvertToColMajorArrayRGB) { -- Bitmap bitmap; -- bitmap.Allocate(2, 2, true); -+TEST(Bitmap, RowMajorDataGrey) { -+ Bitmap bitmap(2, 3, /*as_rgb=*/false); - bitmap.SetPixel(0, 0, BitmapColor(0, 0, 0)); - bitmap.SetPixel(0, 1, BitmapColor(1, 0, 0)); -- bitmap.SetPixel(1, 0, BitmapColor(2, 0, 0)); -- bitmap.SetPixel(1, 1, BitmapColor(3, 0, 0)); -- const std::vector array = bitmap.ConvertToColMajorArray(); -- ASSERT_EQ(array.size(), 12); -- EXPECT_EQ(array[0], 0); -- EXPECT_EQ(array[1], 0); -- EXPECT_EQ(array[2], 0); -- EXPECT_EQ(array[3], 0); -- EXPECT_EQ(array[4], 0); -- EXPECT_EQ(array[5], 0); -- EXPECT_EQ(array[6], 0); -- EXPECT_EQ(array[7], 0); -- EXPECT_EQ(array[8], 0); -- EXPECT_EQ(array[9], 1); -- EXPECT_EQ(array[10], 2); -- EXPECT_EQ(array[11], 3); --} -- --TEST(Bitmap, ConvertToColMajorArrayGrey) { -- Bitmap bitmap; -- bitmap.Allocate(2, 2, false); -- bitmap.SetPixel(0, 0, BitmapColor(0, 0, 0)); -- bitmap.SetPixel(0, 1, BitmapColor(1, 0, 0)); -- bitmap.SetPixel(1, 0, BitmapColor(2, 0, 0)); -- bitmap.SetPixel(1, 1, BitmapColor(3, 0, 0)); -- const std::vector array = bitmap.ConvertToColMajorArray(); -- ASSERT_EQ(array.size(), 4); -- EXPECT_EQ(array[0], 0); -- EXPECT_EQ(array[1], 1); -- EXPECT_EQ(array[2], 2); -- EXPECT_EQ(array[3], 3); --} -- --TEST(Bitmap, ConvertToFromRawBitsGrey) { -- Bitmap bitmap; -- bitmap.Allocate(3, 2, false); -- bitmap.SetPixel(0, 0, BitmapColor(0)); -- bitmap.SetPixel(0, 1, BitmapColor(1)); -- bitmap.SetPixel(1, 0, BitmapColor(2)); -- bitmap.SetPixel(1, 1, BitmapColor(3)); -- -- std::vector raw_bits = bitmap.ConvertToRawBits(); -- ASSERT_EQ(raw_bits.size(), bitmap.Pitch() * bitmap.Height()); -- -- const std::vector raw_bits_copy = raw_bits; -- Bitmap bitmap_copy = Bitmap::ConvertFromRawBits(raw_bits.data(), -- bitmap.Pitch(), -- bitmap.Width(), -- bitmap.Height(), -- /*rgb=*/false); -- EXPECT_EQ(bitmap.Width(), bitmap_copy.Width()); -- EXPECT_EQ(bitmap.Height(), bitmap_copy.Height()); -- EXPECT_EQ(bitmap.Channels(), bitmap_copy.Channels()); -- bitmap.SetPixel(0, 1, BitmapColor(5)); -- bitmap_copy.SetPixel(0, 1, BitmapColor(5)); -- EXPECT_EQ(raw_bits_copy, raw_bits); -- EXPECT_EQ(bitmap.ConvertToRowMajorArray(), -- bitmap_copy.ConvertToRowMajorArray()); --} -- --TEST(Bitmap, ConvertToFromRawBitsRGB) { -- Bitmap bitmap; -- bitmap.Allocate(3, 2, true); -- bitmap.SetPixel(0, 0, BitmapColor(0, 0, 0)); -- bitmap.SetPixel(0, 1, BitmapColor(1, 0, 0)); -- bitmap.SetPixel(1, 0, BitmapColor(2, 0, 0)); -- bitmap.SetPixel(1, 1, BitmapColor(3, 0, 0)); -- -- std::vector raw_bits = bitmap.ConvertToRawBits(); -- ASSERT_EQ(raw_bits.size(), bitmap.Pitch() * bitmap.Height() * 3); -- -- const std::vector raw_bits_copy = raw_bits; -- Bitmap bitmap_copy = Bitmap::ConvertFromRawBits(raw_bits.data(), -- bitmap.Pitch(), -- bitmap.Width(), -- bitmap.Height(), -- /*rgb=*/true); -- EXPECT_EQ(bitmap.Width(), bitmap_copy.Width()); -- EXPECT_EQ(bitmap.Height(), bitmap_copy.Height()); -- EXPECT_EQ(bitmap.Channels(), bitmap_copy.Channels()); -- bitmap.SetPixel(0, 1, BitmapColor(5, 0, 0)); -- bitmap_copy.SetPixel(0, 1, BitmapColor(5, 0, 0)); -- EXPECT_EQ(raw_bits_copy, raw_bits); -- EXPECT_EQ(bitmap.ConvertToRowMajorArray(), -- bitmap_copy.ConvertToRowMajorArray()); -+ bitmap.SetPixel(0, 2, BitmapColor(2, 0, 0)); -+ bitmap.SetPixel(1, 0, BitmapColor(3, 0, 0)); -+ bitmap.SetPixel(1, 1, BitmapColor(4, 0, 0)); -+ bitmap.SetPixel(1, 2, BitmapColor(5, 0, 0)); -+ EXPECT_THAT(bitmap.RowMajorData(), testing::ElementsAre(0, 3, 1, 4, 2, 5)); - } - - TEST(Bitmap, GetAndSetPixelRGB) { -- Bitmap bitmap; -- bitmap.Allocate(1, 1, true); -- bitmap.SetPixel(0, 0, BitmapColor(1, 2, 3)); -+ Bitmap bitmap(2, 3, /*as_rgb=*/true); -+ bitmap.SetPixel(1, 1, BitmapColor(1, 2, 3)); - BitmapColor color; -- EXPECT_TRUE(bitmap.GetPixel(0, 0, &color)); -+ EXPECT_TRUE(bitmap.GetPixel(1, 1, &color)); - EXPECT_EQ(color, BitmapColor(1, 2, 3)); - } - - TEST(Bitmap, GetAndSetPixelGrey) { -- Bitmap bitmap; -- bitmap.Allocate(1, 1, false); -- bitmap.SetPixel(0, 0, BitmapColor(0, 2, 3)); -+ Bitmap bitmap(2, 3, /*as_rgb=*/false); -+ bitmap.SetPixel(1, 1, BitmapColor(0, 2, 3)); - BitmapColor color; -- EXPECT_TRUE(bitmap.GetPixel(0, 0, &color)); -+ EXPECT_TRUE(bitmap.GetPixel(1, 1, &color)); - EXPECT_EQ(color, BitmapColor(0, 0, 0)); -- bitmap.SetPixel(0, 0, BitmapColor(1, 2, 3)); -- EXPECT_TRUE(bitmap.GetPixel(0, 0, &color)); -- EXPECT_EQ(color, BitmapColor(1, 0, 0)); --} -- --TEST(Bitmap, GetScanlineRGB) { -- Bitmap bitmap; -- bitmap.Allocate(3, 3, true); -- bitmap.Fill(BitmapColor(1, 2, 3)); -- for (size_t r = 0; r < 3; ++r) { -- const uint8_t* scanline = bitmap.GetScanline(r); -- for (size_t c = 0; c < 3; ++c) { -- BitmapColor color; -- EXPECT_TRUE(bitmap.GetPixel(r, c, &color)); -- EXPECT_EQ(scanline[c * 3 + FI_RGBA_RED], color.r); -- EXPECT_EQ(scanline[c * 3 + FI_RGBA_GREEN], color.g); -- EXPECT_EQ(scanline[c * 3 + FI_RGBA_BLUE], color.b); -- } -- } --} -- --TEST(Bitmap, GetScanlineGrey) { -- Bitmap bitmap; -- bitmap.Allocate(3, 3, false); -- bitmap.Fill(BitmapColor(1, 2, 3)); -- for (size_t r = 0; r < 3; ++r) { -- const uint8_t* scanline = bitmap.GetScanline(r); -- for (size_t c = 0; c < 3; ++c) { -- BitmapColor color; -- EXPECT_TRUE(bitmap.GetPixel(r, c, &color)); -- EXPECT_EQ(scanline[c], color.r); -- } -- } -+ bitmap.SetPixel(1, 1, BitmapColor(1, 2, 3)); -+ EXPECT_TRUE(bitmap.GetPixel(1, 1, &color)); -+ EXPECT_EQ(color, BitmapColor(1, 1, 1)); - } - - TEST(Bitmap, Fill) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, true); -+ Bitmap bitmap(100, 100, /*as_rgb=*/true); - bitmap.Fill(BitmapColor(1, 2, 3)); - for (int y = 0; y < bitmap.Height(); ++y) { - for (int x = 0; x < bitmap.Width(); ++x) { -@@ -358,76 +205,35 @@ TEST(Bitmap, Fill) { - } - - TEST(Bitmap, InterpolateNearestNeighbor) { -- Bitmap bitmap; -- bitmap.Allocate(11, 11, true); -+ Bitmap bitmap(11, 10, /*as_rgb=*/true); - bitmap.Fill(BitmapColor(0, 0, 0)); -- bitmap.SetPixel(5, 5, BitmapColor(1, 2, 3)); -+ bitmap.SetPixel(5, 4, BitmapColor(1, 2, 3)); - BitmapColor color; -- EXPECT_TRUE(bitmap.InterpolateNearestNeighbor(5, 5, &color)); -+ EXPECT_TRUE(bitmap.InterpolateNearestNeighbor(5, 4, &color)); - EXPECT_EQ(color, BitmapColor(1, 2, 3)); -- EXPECT_TRUE(bitmap.InterpolateNearestNeighbor(5.4999, 5.4999, &color)); -+ EXPECT_TRUE(bitmap.InterpolateNearestNeighbor(5.4999, 4.4999, &color)); - EXPECT_EQ(color, BitmapColor(1, 2, 3)); -- EXPECT_TRUE(bitmap.InterpolateNearestNeighbor(5.5, 5.5, &color)); -+ EXPECT_TRUE(bitmap.InterpolateNearestNeighbor(5.5, 4.5, &color)); - EXPECT_EQ(color, BitmapColor(0, 0, 0)); -- EXPECT_TRUE(bitmap.InterpolateNearestNeighbor(4.5, 5.4999, &color)); -+ EXPECT_TRUE(bitmap.InterpolateNearestNeighbor(4.5, 4.4999, &color)); - EXPECT_EQ(color, BitmapColor(1, 2, 3)); - } - - TEST(Bitmap, InterpolateBilinear) { -- Bitmap bitmap; -- bitmap.Allocate(11, 11, true); -+ Bitmap bitmap(11, 10, /*as_rgb=*/true); - bitmap.Fill(BitmapColor(0, 0, 0)); -- bitmap.SetPixel(5, 5, BitmapColor(1, 2, 3)); -+ bitmap.SetPixel(5, 4, BitmapColor(1, 2, 3)); - BitmapColor color; -- EXPECT_TRUE(bitmap.InterpolateBilinear(5, 5, &color)); -+ EXPECT_TRUE(bitmap.InterpolateBilinear(5, 4, &color)); - EXPECT_EQ(color, BitmapColor(1, 2, 3)); -- EXPECT_TRUE(bitmap.InterpolateBilinear(5.5, 5, &color)); -+ EXPECT_TRUE(bitmap.InterpolateBilinear(5.5, 4, &color)); - EXPECT_EQ(color, BitmapColor(0.5, 1, 1.5)); -- EXPECT_TRUE(bitmap.InterpolateBilinear(5.5, 5.5, &color)); -+ EXPECT_TRUE(bitmap.InterpolateBilinear(5.5, 4.5, &color)); - EXPECT_EQ(color, BitmapColor(0.25, 0.5, 0.75)); - } - --TEST(Bitmap, SmoothRGB) { -- Bitmap bitmap; -- bitmap.Allocate(50, 50, true); -- for (int x = 0; x < 50; ++x) { -- for (int y = 0; y < 50; ++y) { -- bitmap.SetPixel( -- x, y, BitmapColor(y * 50 + x, y * 50 + x, y * 50 + x)); -- } -- } -- bitmap.Smooth(1, 1); -- EXPECT_EQ(bitmap.Width(), 50); -- EXPECT_EQ(bitmap.Height(), 50); -- EXPECT_EQ(bitmap.Channels(), 3); -- for (int x = 0; x < 50; ++x) { -- for (int y = 0; y < 50; ++y) { -- BitmapColor color; -- EXPECT_TRUE(bitmap.GetPixel(x, y, &color)); -- EXPECT_EQ(color.r, color.g); -- EXPECT_EQ(color.r, color.b); -- } -- } --} -- --TEST(Bitmap, SmoothGrey) { -- Bitmap bitmap; -- bitmap.Allocate(50, 50, false); -- for (int x = 0; x < 50; ++x) { -- for (int y = 0; y < 50; ++y) { -- bitmap.SetPixel( -- x, y, BitmapColor(y * 50 + x, y * 50 + x, y * 50 + x)); -- } -- } -- bitmap.Smooth(1, 1); -- EXPECT_EQ(bitmap.Width(), 50); -- EXPECT_EQ(bitmap.Height(), 50); -- EXPECT_EQ(bitmap.Channels(), 1); --} -- - TEST(Bitmap, RescaleRGB) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, true); -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); - Bitmap bitmap1 = bitmap.Clone(); - bitmap1.Rescale(50, 25); - EXPECT_EQ(bitmap1.Width(), 50); -@@ -441,8 +247,7 @@ TEST(Bitmap, RescaleRGB) { - } - - TEST(Bitmap, RescaleGrey) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, false); -+ Bitmap bitmap(100, 80, /*as_rgb=*/false); - Bitmap bitmap1 = bitmap.Clone(); - bitmap1.Rescale(50, 25); - EXPECT_EQ(bitmap1.Width(), 50); -@@ -456,38 +261,191 @@ TEST(Bitmap, RescaleGrey) { - } - - TEST(Bitmap, Clone) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, true); -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); -+ bitmap.Fill(BitmapColor(0, 0, 0)); -+ bitmap.SetPixel(0, 0, BitmapColor(10, 20, 30)); - const Bitmap cloned_bitmap = bitmap.Clone(); - EXPECT_EQ(cloned_bitmap.Width(), 100); -- EXPECT_EQ(cloned_bitmap.Height(), 100); -+ EXPECT_EQ(cloned_bitmap.Height(), 80); - EXPECT_EQ(cloned_bitmap.Channels(), 3); -- EXPECT_NE(bitmap.Data(), cloned_bitmap.Data()); -+ BitmapColor color; -+ EXPECT_TRUE(cloned_bitmap.GetPixel(0, 0, &color)); -+ EXPECT_EQ(color, BitmapColor(10, 20, 30)); - } - - TEST(Bitmap, CloneAsRGB) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, false); -+ Bitmap bitmap(100, 80, /*as_rgb=*/false); -+ bitmap.Fill(BitmapColor(0, 0, 0)); -+ bitmap.SetPixel(0, 0, BitmapColor(10, 0, 0)); - const Bitmap cloned_bitmap = bitmap.CloneAsRGB(); - EXPECT_EQ(cloned_bitmap.Width(), 100); -- EXPECT_EQ(cloned_bitmap.Height(), 100); -+ EXPECT_EQ(cloned_bitmap.Height(), 80); - EXPECT_EQ(cloned_bitmap.Channels(), 3); -- EXPECT_NE(bitmap.Data(), cloned_bitmap.Data()); -+ BitmapColor color; -+ EXPECT_TRUE(cloned_bitmap.GetPixel(0, 0, &color)); -+ EXPECT_EQ(color, BitmapColor(10, 10, 10)); - } - - TEST(Bitmap, CloneAsGrey) { -- Bitmap bitmap; -- bitmap.Allocate(100, 100, true); -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); -+ bitmap.Fill(BitmapColor(0, 0, 0)); -+ bitmap.SetPixel(0, 0, BitmapColor(10, 20, 30)); - const Bitmap cloned_bitmap = bitmap.CloneAsGrey(); - EXPECT_EQ(cloned_bitmap.Width(), 100); -- EXPECT_EQ(cloned_bitmap.Height(), 100); -+ EXPECT_EQ(cloned_bitmap.Height(), 80); - EXPECT_EQ(cloned_bitmap.Channels(), 1); -- EXPECT_NE(bitmap.Data(), cloned_bitmap.Data()); -+ BitmapColor color; -+ EXPECT_TRUE(cloned_bitmap.GetPixel(0, 0, &color)); -+ EXPECT_EQ(color, BitmapColor(19, 19, 19)); -+} -+ -+TEST(Bitmap, SetGetMetaData) { -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); -+ const float kValue = 1.f; -+ bitmap.SetMetaData("foobar", "float", &kValue); -+ float value = 0.f; -+ EXPECT_TRUE(bitmap.GetMetaData("foobar", "float", &value)); -+ EXPECT_EQ(value, kValue); -+ EXPECT_FALSE(bitmap.GetMetaData("does_not_exist", "float", &value)); -+ EXPECT_FALSE(bitmap.GetMetaData("foobar", "int8", &value)); -+} -+ -+TEST(Bitmap, CloneMetaData) { -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); -+ const float kValue = 1.f; -+ bitmap.SetMetaData("foobar", "float", &kValue); -+ -+ Bitmap bitmap2(100, 80, /*as_rgb=*/true); -+ float value = 0.f; -+ EXPECT_FALSE(bitmap2.GetMetaData("foobar", "float", &value)); -+ bitmap.CloneMetadata(&bitmap2); -+ EXPECT_TRUE(bitmap2.GetMetaData("foobar", "float", &value)); -+ EXPECT_EQ(value, kValue); -+} -+ -+TEST(Bitmap, ExifCameraModel) { -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); -+ -+ std::string camera_model; -+ EXPECT_FALSE(bitmap.ExifCameraModel(&camera_model)); -+ -+ bitmap.SetMetaData("Make", "make"); -+ bitmap.SetMetaData("Model", "model"); -+ const float focal_length_in_35mm_film = 50.f; -+ bitmap.SetMetaData( -+ "Exif:FocalLengthIn35mmFilm", "float", &focal_length_in_35mm_film); -+ -+ EXPECT_TRUE(bitmap.ExifCameraModel(&camera_model)); -+ EXPECT_EQ(camera_model, "make-model-50.000000-100x80"); -+} -+ -+TEST(Bitmap, ExifFocalLengthIn35mm) { -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); -+ -+ double focal_length = 0.0; -+ EXPECT_FALSE(bitmap.ExifFocalLength(&focal_length)); -+ -+ const float focal_length_in_35mm_film = 70.f; -+ bitmap.SetMetaData( -+ "Exif:FocalLengthIn35mmFilm", "float", &focal_length_in_35mm_film); -+ -+ EXPECT_TRUE(bitmap.ExifFocalLength(&focal_length)); -+ EXPECT_NEAR(focal_length, 207.17, 0.1); -+} -+ -+TEST(Bitmap, ExifFocalLengthWithPlane) { -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); -+ -+ double focal_length = 0.0; -+ EXPECT_FALSE(bitmap.ExifFocalLength(&focal_length)); -+ -+ const float kFocalLengthVal = 72.f; -+ bitmap.SetMetaData("Exif:FocalLength", "float", &kFocalLengthVal); -+ bitmap.SetMetaData("Make", "canon"); -+ bitmap.SetMetaData("Model", "eos1dsmarkiii"); -+ -+ EXPECT_TRUE(bitmap.ExifFocalLength(&focal_length)); -+ EXPECT_EQ(focal_length, 200); -+} -+ -+TEST(Bitmap, ExifFocalLengthWithDatabaseLookup) { -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); -+ -+ double focal_length = 0.0; -+ EXPECT_FALSE(bitmap.ExifFocalLength(&focal_length)); -+ -+ const float kFocalLengthVal = 120.f; -+ bitmap.SetMetaData("Exif:FocalLength", "float", &kFocalLengthVal); -+ const int kPixelXDim = 100; -+ bitmap.SetMetaData("Exif:PixelXDimension", "int", &kPixelXDim); -+ const float kPlaneXRes = 1.f; -+ bitmap.SetMetaData("Exif:FocalPlaneXResolution", "float", &kPlaneXRes); -+ const int kPlanResUnit = 4; -+ bitmap.SetMetaData("Exif:FocalPlaneResolutionUnit", "int", &kPlanResUnit); -+ -+ EXPECT_TRUE(bitmap.ExifFocalLength(&focal_length)); -+ EXPECT_EQ(focal_length, 120); -+} -+ -+TEST(Bitmap, ExifLatitude) { -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); -+ -+ double latitude = 0.0; -+ EXPECT_FALSE(bitmap.ExifLatitude(&latitude)); -+ -+ bitmap.SetMetaData("GPS:LatitudeRef", "N"); -+ const float kDegMinSec[3] = {46, 30, 900}; -+ bitmap.SetMetaData("GPS:Latitude", "point", kDegMinSec); -+ -+ EXPECT_TRUE(bitmap.ExifLatitude(&latitude)); -+ EXPECT_EQ(latitude, 46.75); -+ -+ bitmap.SetMetaData("GPS:LatitudeRef", "S"); -+ -+ EXPECT_TRUE(bitmap.ExifLatitude(&latitude)); -+ EXPECT_EQ(latitude, -46.75); -+} -+ -+TEST(Bitmap, ExifLongitude) { -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); -+ -+ double longitude = 0.0; -+ EXPECT_FALSE(bitmap.ExifLongitude(&longitude)); -+ -+ bitmap.SetMetaData("GPS:LongitudeRef", "W"); -+ const float kDegMinSec[3] = {92, 30, 900}; -+ bitmap.SetMetaData("GPS:Longitude", "point", kDegMinSec); -+ -+ EXPECT_TRUE(bitmap.ExifLongitude(&longitude)); -+ EXPECT_EQ(longitude, 92.75); -+ -+ bitmap.SetMetaData("GPS:LongitudeRef", "E"); -+ -+ EXPECT_TRUE(bitmap.ExifLongitude(&longitude)); -+ EXPECT_EQ(longitude, -92.75); -+} -+ -+TEST(Bitmap, ExifAltitude) { -+ Bitmap bitmap(100, 80, /*as_rgb=*/true); -+ -+ double altitude = 0.0; -+ EXPECT_FALSE(bitmap.ExifAltitude(&altitude)); -+ -+ bitmap.SetMetaData("GPS:AltitudeRef", "0"); -+ const float kAltitudeVal = 123.456; -+ bitmap.SetMetaData("GPS:Altitude", "float", &kAltitudeVal); -+ -+ EXPECT_TRUE(bitmap.ExifAltitude(&altitude)); -+ EXPECT_EQ(altitude, kAltitudeVal); -+ -+ bitmap.SetMetaData("GPS:AltitudeRef", "1"); -+ -+ EXPECT_TRUE(bitmap.ExifAltitude(&altitude)); -+ EXPECT_EQ(altitude, -kAltitudeVal); - } - - TEST(Bitmap, ReadWriteAsRGB) { -- Bitmap bitmap; -- bitmap.Allocate(2, 3, true); -+ Bitmap bitmap(2, 3, /*as_rgb=*/true); - bitmap.SetPixel(0, 0, BitmapColor(0, 0, 0)); - bitmap.SetPixel(0, 1, BitmapColor(1, 0, 0)); - bitmap.SetPixel(1, 0, BitmapColor(2, 0, 0)); -@@ -501,30 +459,23 @@ TEST(Bitmap, ReadWriteAsRGB) { - EXPECT_TRUE(bitmap.Write(filename)); - - Bitmap read_bitmap; -- -- // Allocate bitmap with different size to test read overwrites existing data. -- read_bitmap.Allocate(bitmap.Width() + 1, bitmap.Height() + 2, true); -- - EXPECT_TRUE(read_bitmap.Read(filename)); - EXPECT_EQ(read_bitmap.Width(), bitmap.Width()); - EXPECT_EQ(read_bitmap.Height(), bitmap.Height()); - EXPECT_EQ(read_bitmap.Channels(), 3); - EXPECT_EQ(read_bitmap.BitsPerPixel(), 24); -- EXPECT_EQ(read_bitmap.ConvertToRowMajorArray(), -- bitmap.ConvertToRowMajorArray()); -+ EXPECT_EQ(read_bitmap.RowMajorData(), bitmap.RowMajorData()); - - EXPECT_TRUE(read_bitmap.Read(filename, /*as_rgb=*/false)); - EXPECT_EQ(read_bitmap.Width(), bitmap.Width()); - EXPECT_EQ(read_bitmap.Height(), bitmap.Height()); - EXPECT_EQ(read_bitmap.Channels(), 1); - EXPECT_EQ(read_bitmap.BitsPerPixel(), 8); -- EXPECT_EQ(read_bitmap.ConvertToRowMajorArray(), -- bitmap.CloneAsGrey().ConvertToRowMajorArray()); -+ EXPECT_EQ(read_bitmap.RowMajorData(), bitmap.CloneAsGrey().RowMajorData()); - } - - TEST(Bitmap, ReadWriteAsGrey) { -- Bitmap bitmap; -- bitmap.Allocate(2, 3, false); -+ Bitmap bitmap(2, 3, /*as_rgb=*/false); - bitmap.SetPixel(0, 0, BitmapColor(0)); - bitmap.SetPixel(0, 1, BitmapColor(1)); - bitmap.SetPixel(1, 0, BitmapColor(2)); -@@ -538,73 +489,92 @@ TEST(Bitmap, ReadWriteAsGrey) { - EXPECT_TRUE(bitmap.Write(filename)); - - Bitmap read_bitmap; -- -- // Allocate bitmap with different size to test read overwrites existing data. -- read_bitmap.Allocate(bitmap.Width() + 1, bitmap.Height() + 2, true); -- - EXPECT_TRUE(read_bitmap.Read(filename)); - EXPECT_EQ(read_bitmap.Width(), bitmap.Width()); - EXPECT_EQ(read_bitmap.Height(), bitmap.Height()); - EXPECT_EQ(read_bitmap.Channels(), 3); - EXPECT_EQ(read_bitmap.BitsPerPixel(), 24); -- EXPECT_EQ(read_bitmap.ConvertToRowMajorArray(), -- bitmap.CloneAsRGB().ConvertToRowMajorArray()); -+ EXPECT_EQ(read_bitmap.RowMajorData(), bitmap.CloneAsRGB().RowMajorData()); - - EXPECT_TRUE(read_bitmap.Read(filename, /*as_rgb=*/false)); - EXPECT_EQ(read_bitmap.Width(), bitmap.Width()); - EXPECT_EQ(read_bitmap.Height(), bitmap.Height()); - EXPECT_EQ(read_bitmap.Channels(), 1); - EXPECT_EQ(read_bitmap.BitsPerPixel(), 8); -- EXPECT_EQ(read_bitmap.ConvertToRowMajorArray(), -- bitmap.ConvertToRowMajorArray()); -+ EXPECT_EQ(read_bitmap.RowMajorData(), bitmap.RowMajorData()); - } - --TEST(Bitmap, ReadRGB16AsGrey) { -- Bitmap bitmap; -- bitmap.Allocate(2, 3, true); -- bitmap.SetPixel(0, 0, BitmapColor(0, 0, 0)); -- bitmap.SetPixel(0, 1, BitmapColor(1, 0, 0)); -- bitmap.SetPixel(1, 0, BitmapColor(2, 0, 0)); -- bitmap.SetPixel(1, 1, BitmapColor(3, 0, 0)); -- bitmap.SetPixel(0, 2, BitmapColor(4, 2, 0)); -- bitmap.SetPixel(1, 2, BitmapColor(5, 2, 1)); -+TEST(Bitmap, ReadWriteAsGreyNonLinear) { -+ Bitmap bitmap(2, 3, /*as_rgb=*/false, /*linear_colorspace=*/false); -+ bitmap.SetPixel(0, 0, BitmapColor(0)); -+ bitmap.SetPixel(0, 1, BitmapColor(1)); -+ bitmap.SetPixel(1, 0, BitmapColor(2)); -+ bitmap.SetPixel(1, 1, BitmapColor(3)); -+ bitmap.SetPixel(0, 2, BitmapColor(4)); -+ bitmap.SetPixel(1, 2, BitmapColor(5)); - - const std::string test_dir = CreateTestDir(); - const std::string filename = test_dir + "/bitmap.png"; - -- // Bitmap class does not support 16 bit color depth -- FIBITMAP* converted_rgb16 = FreeImage_ConvertToType(bitmap.Data(), FIT_RGB16); -- EXPECT_TRUE(converted_rgb16); -- EXPECT_TRUE(FreeImage_Save(FIF_PNG, converted_rgb16, filename.c_str())); -- FreeImage_Unload(converted_rgb16); -- -- // Assert the file was written correctly with 16 bit color depth -- FIBITMAP* written_image = FreeImage_Load(FIF_PNG, filename.c_str()); -- EXPECT_TRUE(written_image); -- EXPECT_EQ(FreeImage_GetBPP(written_image), 48); -- FreeImage_Unload(written_image); -+ EXPECT_TRUE(bitmap.Write(filename, /*delinearize_colorspace=*/false)); - - Bitmap read_bitmap; -- -- // Allocate bitmap with different size to test read overwrites existing data. -- read_bitmap.Allocate(bitmap.Width() + 1, bitmap.Height() + 2, true); -- -- EXPECT_TRUE(read_bitmap.Read(filename)); -- EXPECT_EQ(read_bitmap.Width(), bitmap.Width()); -- EXPECT_EQ(read_bitmap.Height(), bitmap.Height()); -- EXPECT_EQ(read_bitmap.Channels(), 3); -- EXPECT_EQ(read_bitmap.BitsPerPixel(), 24); -- EXPECT_EQ(read_bitmap.ConvertToRowMajorArray(), -- bitmap.ConvertToRowMajorArray()); -- -- EXPECT_TRUE(read_bitmap.Read(filename, /*as_rgb=*/false)); -+ EXPECT_TRUE(read_bitmap.Read( -+ filename, /*as_rgb=*/false, /*linearize_colorspace=*/false)); - EXPECT_EQ(read_bitmap.Width(), bitmap.Width()); - EXPECT_EQ(read_bitmap.Height(), bitmap.Height()); - EXPECT_EQ(read_bitmap.Channels(), 1); - EXPECT_EQ(read_bitmap.BitsPerPixel(), 8); -- EXPECT_EQ(read_bitmap.ConvertToRowMajorArray(), -- bitmap.CloneAsGrey().ConvertToRowMajorArray()); --} -+ EXPECT_EQ(read_bitmap.RowMajorData(), bitmap.RowMajorData()); -+} -+ -+// TEST(Bitmap, ReadRGB16AsGrey) { -+// Bitmap bitmap; -+// bitmap.Allocate(2, 3, /*as_rgb=*/true); -+// bitmap.SetPixel(0, 0, BitmapColor(0, 0, 0)); -+// bitmap.SetPixel(0, 1, BitmapColor(1, 0, 0)); -+// bitmap.SetPixel(1, 0, BitmapColor(2, 0, 0)); -+// bitmap.SetPixel(1, 1, BitmapColor(3, 0, 0)); -+// bitmap.SetPixel(0, 2, BitmapColor(4, 2, 0)); -+// bitmap.SetPixel(1, 2, BitmapColor(5, 2, 1)); -+ -+// const std::string test_dir = CreateTestDir(); -+// const std::string filename = test_dir + "/bitmap.png"; -+ -+// // Bitmap class does not support 16 bit color depth -+// FIBITMAP* converted_rgb16 = FreeImage_ConvertToType(bitmap.Data(), -+// FIT_RGB16); EXPECT_TRUE(converted_rgb16); -+// EXPECT_TRUE(FreeImage_Save(FIF_PNG, converted_rgb16, filename.c_str())); -+// FreeImage_Unload(converted_rgb16); -+ -+// // Assert the file was written correctly with 16 bit color depth -+// FIBITMAP* written_image = FreeImage_Load(FIF_PNG, filename.c_str()); -+// EXPECT_TRUE(written_image); -+// EXPECT_EQ(FreeImage_GetBPP(written_image), 48); -+// FreeImage_Unload(written_image); -+ -+// Bitmap read_bitmap; -+ -+// // Allocate bitmap with different size to test read overwrites existing -+// data. read_bitmap.Allocate(bitmap.Width() + 1, bitmap.Height() + 2, -+// /*as_rgb=*/true); -+ -+// EXPECT_TRUE(read_bitmap.Read(filename)); -+// EXPECT_EQ(read_bitmap.Width(), bitmap.Width()); -+// EXPECT_EQ(read_bitmap.Height(), bitmap.Height()); -+// EXPECT_EQ(read_bitmap.Channels(), 3); -+// EXPECT_EQ(read_bitmap.BitsPerPixel(), 24); -+// EXPECT_EQ(read_bitmap.RowMajorData(), -+// bitmap.RowMajorData()); -+ -+// EXPECT_TRUE(read_bitmap.Read(filename, /*as_rgb=*/false)); -+// EXPECT_EQ(read_bitmap.Width(), bitmap.Width()); -+// EXPECT_EQ(read_bitmap.Height(), bitmap.Height()); -+// EXPECT_EQ(read_bitmap.Channels(), 1); -+// EXPECT_EQ(read_bitmap.BitsPerPixel(), 8); -+// EXPECT_EQ(read_bitmap.RowMajorData(), -+// bitmap.CloneAsGrey().RowMajorData()); -+// } - - } // namespace - } // namespace colmap -diff --git a/src/colmap/sensor/database.cc b/src/colmap/sensor/database.cc -index ab83c83e..03de6e9c 100644 ---- a/src/colmap/sensor/database.cc -+++ b/src/colmap/sensor/database.cc -@@ -37,7 +37,7 @@ const camera_specs_t CameraDatabase::specs_ = InitializeCameraSpecs(); - - bool CameraDatabase::QuerySensorWidth(const std::string& make, - const std::string& model, -- double* sensor_width) { -+ double* sensor_width_mm) { - // Clean the strings from all separators. - std::string cleaned_make = make; - std::string cleaned_model = model; -@@ -60,7 +60,7 @@ bool CameraDatabase::QuerySensorWidth(const std::string& make, - for (const auto& model_elem : make_elem.second) { - if (StringContains(cleaned_model, model_elem.first) || - StringContains(model_elem.first, cleaned_model)) { -- *sensor_width = model_elem.second; -+ *sensor_width_mm = model_elem.second; - if (cleaned_model == model_elem.first) { - // Model exactly matches, return immediately. - return true; -diff --git a/src/colmap/sensor/database.h b/src/colmap/sensor/database.h -index 93af5226..08a86102 100644 ---- a/src/colmap/sensor/database.h -+++ b/src/colmap/sensor/database.h -@@ -45,7 +45,7 @@ struct CameraDatabase { - - bool QuerySensorWidth(const std::string& make, - const std::string& model, -- double* sensor_width); -+ double* sensor_width_mm); - - private: - static const camera_specs_t specs_; -diff --git a/src/colmap/sfm/incremental_mapper.cc b/src/colmap/sfm/incremental_mapper.cc -index 2a054cdd..671f2a8c 100644 ---- a/src/colmap/sfm/incremental_mapper.cc -+++ b/src/colmap/sfm/incremental_mapper.cc -@@ -693,9 +693,8 @@ IncrementalMapper::AdjustLocalBundle( - num_frames_per_rig[frame.RigId()] += 1; - } - for (const auto& [rig_id, num_frames] : num_frames_per_rig) { -- const size_t num_reg_frames_for_rig = -- reg_stats_.num_reg_frames_per_rig.at(rig_id); -- if (num_frames < num_reg_frames_for_rig) { -+ if (options.constant_rigs.count(rig_id) || -+ num_frames < reg_stats_.num_reg_frames_per_rig.at(rig_id)) { - const Rig& rig = reconstruction_->Rig(rig_id); - for (const auto& [sensor_id, _] : rig.Sensors()) { - ba_config.SetConstantSensorFromRigPose(sensor_id); -@@ -708,14 +707,11 @@ IncrementalMapper::AdjustLocalBundle( - num_images_per_camera.reserve(ba_config.NumImages()); - for (const image_t image_id : ba_config.Images()) { - const Image& image = reconstruction_->Image(image_id); -- num_frames_per_rig[image.FramePtr()->RigId()] += 1; - num_images_per_camera[image.CameraId()] += 1; - } - for (const auto& [camera_id, num_images] : num_images_per_camera) { -- const size_t num_reg_images_for_camera = -- reg_stats_.num_reg_images_per_camera.at(camera_id); - if (options.constant_cameras.count(camera_id) || -- num_images < num_reg_images_for_camera) { -+ num_images < reg_stats_.num_reg_images_per_camera.at(camera_id)) { - ba_config.SetConstantCamIntrinsics(camera_id); - } - } -@@ -812,6 +808,13 @@ bool IncrementalMapper::AdjustGlobalBundle( - } - } - -+ for (const auto& rig_id : options.constant_rigs) { -+ const Rig& rig = reconstruction_->Rig(rig_id); -+ for (const auto& [sensor_id, _] : rig.Sensors()) { -+ ba_config.SetConstantSensorFromRigPose(sensor_id); -+ } -+ } -+ - for (const auto& camera_id : options.constant_cameras) { - ba_config.SetConstantCamIntrinsics(camera_id); - } -diff --git a/src/colmap/sfm/incremental_mapper.h b/src/colmap/sfm/incremental_mapper.h -index f56cdc96..20fd0f46 100644 ---- a/src/colmap/sfm/incremental_mapper.h -+++ b/src/colmap/sfm/incremental_mapper.h -@@ -118,6 +118,10 @@ class IncrementalMapper { - // If reconstruction is provided as input, fix the existing image poses. - bool fix_existing_frames = false; - -+ // List of rigs for which to fix the sensor_from_rig transformation, -+ // independent of ba_refine_sensor_from_rig. -+ std::unordered_set constant_rigs; -+ - // List of cameras for which to fix the camera parameters independent - // of refine_focal_length, refine_principal_point, and refine_extra_params. - std::unordered_set constant_cameras; -diff --git a/src/colmap/ui/CMakeLists.txt b/src/colmap/ui/CMakeLists.txt -index 591f3682..38e923ee 100644 ---- a/src/colmap/ui/CMakeLists.txt -+++ b/src/colmap/ui/CMakeLists.txt -@@ -30,6 +30,17 @@ - - set(FOLDER_NAME "ui") - -+set(COLMAP_UI_QT_LIBS -+ Qt${QT_VERSION_MAJOR}::Core -+ Qt${QT_VERSION_MAJOR}::OpenGL -+ Qt${QT_VERSION_MAJOR}::Widgets -+) -+ -+if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) -+ list(APPEND COLMAP_UI_QT_LIBS -+ Qt${QT_VERSION_MAJOR}::OpenGLWidgets) -+endif() -+ - COLMAP_ADD_LIBRARY( - NAME colmap_ui - SRCS -@@ -67,7 +78,5 @@ COLMAP_ADD_LIBRARY( - colmap_image - colmap_scene - colmap_controllers -- Qt5::Core -- Qt5::OpenGL -- Qt5::Widgets -+ ${COLMAP_UI_QT_LIBS} - ) -diff --git a/src/colmap/ui/feature_extraction_widget.cc b/src/colmap/ui/feature_extraction_widget.cc -index 0357a677..b9a6369b 100644 ---- a/src/colmap/ui/feature_extraction_widget.cc -+++ b/src/colmap/ui/feature_extraction_widget.cc -@@ -79,12 +79,12 @@ SIFTExtractionWidget::SIFTExtractionWidget(QWidget* parent, - AddOptionFilePath(&options->image_reader->camera_mask_path, - "camera_mask_path"); - -+ AddOptionInt(&options->feature_extraction->max_image_size, "max_image_size"); - AddOptionInt(&options->feature_extraction->num_threads, "num_threads", -1); - AddOptionBool(&options->feature_extraction->use_gpu, "use_gpu"); - AddOptionText(&options->feature_extraction->gpu_index, "gpu_index"); - - SiftExtractionOptions& sift_options = *options->feature_extraction->sift; -- AddOptionInt(&sift_options.max_image_size, "sift.max_image_size"); - AddOptionInt(&sift_options.max_num_features, "sift.max_num_features"); - AddOptionInt(&sift_options.first_octave, "sift.first_octave", -5); - AddOptionInt(&sift_options.num_octaves, "sift.num_octaves"); -@@ -115,6 +115,7 @@ void SIFTExtractionWidget::Run() { - - ImageReaderOptions reader_options = *options_->image_reader; - reader_options.image_path = *options_->image_path; -+ reader_options.as_rgb = options_->feature_extraction->RequiresRGB(); - - auto extractor = CreateFeatureExtractorController( - *options_->database_path, reader_options, *options_->feature_extraction); -diff --git a/src/colmap/ui/image_viewer_widget.cc b/src/colmap/ui/image_viewer_widget.cc -index c743351c..9b86723a 100644 ---- a/src/colmap/ui/image_viewer_widget.cc -+++ b/src/colmap/ui/image_viewer_widget.cc -@@ -120,8 +120,9 @@ void ImageViewerWidget::ShowPixmap(const QPixmap& pixmap) { - - void ImageViewerWidget::ReadAndShow(const std::string& path) { - Bitmap bitmap; -- if (!bitmap.Read(path, true)) { -+ if (!bitmap.Read(path, /*as_rgb=*/true, /*linearize=*/false)) { - LOG(ERROR) << "Cannot read image at path " << path; -+ return; - } - - ShowBitmap(bitmap); -@@ -167,14 +168,14 @@ FeatureImageViewerWidget::FeatureImageViewerWidget( - this, - &FeatureImageViewerWidget::ShowOrHide); - } -- - void FeatureImageViewerWidget::ReadAndShowWithKeypoints( - const std::string& path, - const FeatureKeypoints& keypoints, - const std::vector& tri_mask) { - Bitmap bitmap; -- if (!bitmap.Read(path, true)) { -+ if (!bitmap.Read(path, /*as_rgb=*/true, /*linearize=*/false)) { - LOG(ERROR) << "Cannot read image at path " << path; -+ return; - } - - image1_ = QPixmap::fromImage(BitmapToQImageRGB(bitmap)); -@@ -215,7 +216,8 @@ void FeatureImageViewerWidget::ReadAndShowWithMatches( - const FeatureMatches& matches) { - Bitmap bitmap1; - Bitmap bitmap2; -- if (!bitmap1.Read(path1, true) || !bitmap2.Read(path2, true)) { -+ if (!bitmap1.Read(path1, /*as_rgb=*/true, /*linearize=*/false) || -+ !bitmap2.Read(path2, /*as_rgb=*/true, /*linearize=*/false)) { - LOG(ERROR) << "Cannot read images at paths " << path1 << " and " << path2; - return; - } -diff --git a/src/colmap/ui/match_matrix_widget.cc b/src/colmap/ui/match_matrix_widget.cc -index 07dcab5f..7298ca60 100644 ---- a/src/colmap/ui/match_matrix_widget.cc -+++ b/src/colmap/ui/match_matrix_widget.cc -@@ -52,8 +52,7 @@ void MatchMatrixWidget::Show() { - }); - - // Allocate the match matrix image. -- Bitmap match_matrix; -- match_matrix.Allocate(images.size(), images.size(), true); -+ Bitmap match_matrix(images.size(), images.size(), true); - match_matrix.Fill(BitmapColor(255)); - - // Map image identifiers to match matrix locations. -diff --git a/src/colmap/ui/model_viewer_widget.cc b/src/colmap/ui/model_viewer_widget.cc -index c7015c91..a51e9d7f 100644 ---- a/src/colmap/ui/model_viewer_widget.cc -+++ b/src/colmap/ui/model_viewer_widget.cc -@@ -734,7 +734,11 @@ QImage ModelViewerWidget::GrabImage() { - - EnableCoordinateGrid(); - -+#if QT_VERSION >= QT_VERSION_CHECK(6, 9, 0) -+ return image.flipped(Qt::Orientation::Vertical); -+#else - return image.mirrored(); -+#endif - } - - void ModelViewerWidget::GrabMovie() { movie_grabber_widget_->show(); } -diff --git a/src/colmap/ui/model_viewer_widget.h b/src/colmap/ui/model_viewer_widget.h -index e2a64715..b56618cd 100644 ---- a/src/colmap/ui/model_viewer_widget.h -+++ b/src/colmap/ui/model_viewer_widget.h -@@ -44,6 +44,9 @@ - #include - #include - #include -+#if QT_VERSION >= QT_VERSION_CHECK(6, 0, 0) -+#include -+#endif - - namespace colmap { - -diff --git a/src/colmap/ui/options_widget.cc b/src/colmap/ui/options_widget.cc -index 2ea0ea84..17cd1b6d 100644 ---- a/src/colmap/ui/options_widget.cc -+++ b/src/colmap/ui/options_widget.cc -@@ -93,6 +93,7 @@ QSpinBox* OptionsWidget::AddOptionInt(int* option, - QSpinBox* spinbox = new QSpinBox(this); - spinbox->setMinimum(min); - spinbox->setMaximum(max); -+ spinbox->setValue(*option); - - AddOptionRow(label_text, spinbox, option); - -@@ -112,6 +113,7 @@ QDoubleSpinBox* OptionsWidget::AddOptionDouble(double* option, - spinbox->setMaximum(max); - spinbox->setSingleStep(step); - spinbox->setDecimals(decimals); -+ spinbox->setValue(*option); - - AddOptionRow(label_text, spinbox, option); - -@@ -131,6 +133,7 @@ QDoubleSpinBox* OptionsWidget::AddOptionDoubleLog(double* option, - spinbox->setMaximum(max); - spinbox->setSingleStep(step); - spinbox->setDecimals(decimals); -+ spinbox->setValue(*option); - - AddOptionRow(label_text, spinbox, option); - -@@ -142,6 +145,7 @@ QDoubleSpinBox* OptionsWidget::AddOptionDoubleLog(double* option, - QCheckBox* OptionsWidget::AddOptionBool(bool* option, - const std::string& label_text) { - QCheckBox* checkbox = new QCheckBox(this); -+ checkbox->setChecked(*option); - - AddOptionRow(label_text, checkbox, option); - -@@ -153,6 +157,7 @@ QCheckBox* OptionsWidget::AddOptionBool(bool* option, - QLineEdit* OptionsWidget::AddOptionText(std::string* option, - const std::string& label_text) { - QLineEdit* line_edit = new QLineEdit(this); -+ line_edit->setText(QString::fromStdString(*option)); - - AddOptionRow(label_text, line_edit, option); - -@@ -164,6 +169,7 @@ QLineEdit* OptionsWidget::AddOptionText(std::string* option, - QLineEdit* OptionsWidget::AddOptionFilePath(std::string* option, - const std::string& label_text) { - QLineEdit* line_edit = new QLineEdit(this); -+ line_edit->setText(QString::fromStdString(*option)); - - AddOptionRow(label_text, line_edit, option); - -@@ -184,6 +190,7 @@ QLineEdit* OptionsWidget::AddOptionFilePath(std::string* option, - QLineEdit* OptionsWidget::AddOptionDirPath(std::string* option, - const std::string& label_text) { - QLineEdit* line_edit = new QLineEdit(this); -+ line_edit->setText(QString::fromStdString(*option)); - - AddOptionRow(label_text, line_edit, option); - -diff --git a/src/colmap/ui/point_viewer_widget.cc b/src/colmap/ui/point_viewer_widget.cc -index dbb08051..2ce58fa0 100644 ---- a/src/colmap/ui/point_viewer_widget.cc -+++ b/src/colmap/ui/point_viewer_widget.cc -@@ -192,7 +192,7 @@ void PointViewerWidget::Show(const point3D_t point3D_id) { - - Bitmap bitmap; - const std::string path = JoinPaths(*options_->image_path, image.Name()); -- if (!bitmap.Read(path, true)) { -+ if (!bitmap.Read(path, /*as_rgb=*/true, /*linearize=*/false)) { - LOG(ERROR) << "Cannot read image at path " << path; - continue; - } -diff --git a/src/colmap/ui/qt_utils.cc b/src/colmap/ui/qt_utils.cc -index 340da967..86f2e8e2 100644 ---- a/src/colmap/ui/qt_utils.cc -+++ b/src/colmap/ui/qt_utils.cc -@@ -57,7 +57,7 @@ QMatrix4x4 EigenToQMatrix(const Eigen::Matrix4f& matrix) { - QImage BitmapToQImageRGB(const Bitmap& bitmap) { - QImage image(bitmap.Width(), bitmap.Height(), QImage::Format_RGB32); - for (int y = 0; y < image.height(); ++y) { -- QRgb* image_line = (QRgb*)image.scanLine(y); -+ QRgb* image_line = reinterpret_cast(image.scanLine(y)); - for (int x = 0; x < image.width(); ++x) { - BitmapColor color; - if (bitmap.GetPixel(x, y, &color)) { -diff --git a/src/colmap/util/CMakeLists.txt b/src/colmap/util/CMakeLists.txt -index 6399bbbb..49260dba 100644 ---- a/src/colmap/util/CMakeLists.txt -+++ b/src/colmap/util/CMakeLists.txt -@@ -79,7 +79,15 @@ if(DOWNLOAD_ENABLED) - endif() - endif() - if(GUI_ENABLED) -- target_link_libraries(colmap_util PUBLIC Qt5::Core Qt5::OpenGL OpenGL::GL) -+ set(COLMAP_UTIL_QT_LIBS -+ Qt${QT_VERSION_MAJOR}::Core -+ Qt${QT_VERSION_MAJOR}::OpenGL -+ ) -+ if(${QT_VERSION_MAJOR} GREATER_EQUAL 6) -+ list(APPEND COLMAP_UTIL_QT_LIBS -+ Qt${QT_VERSION_MAJOR}::OpenGLWidgets) -+ endif() -+ target_link_libraries(colmap_util PUBLIC ${COLMAP_UTIL_QT_LIBS} OpenGL::GL) - endif() - - if(CUDA_ENABLED) -diff --git a/src/pycolmap/feature/extraction.cc b/src/pycolmap/feature/extraction.cc -index c5d228c8..481b6710 100644 ---- a/src/pycolmap/feature/extraction.cc -+++ b/src/pycolmap/feature/extraction.cc -@@ -44,9 +44,9 @@ class Sift { - "settings, explicitly specify them, because the defaults " - "will change in the next major release.", - 1); -+ options_.max_image_size = 7000; - options_.sift->peak_threshold = 0.01; - options_.sift->first_octave = 0; -- options_.sift->max_image_size = 7000; - } - options_.use_gpu = use_gpu_; - THROW_CHECK(options_.Check()); -@@ -54,15 +54,11 @@ class Sift { - } - - sift_output_t Extract(const Eigen::Ref>& image) { -- THROW_CHECK_LE(image.rows(), options_.sift->max_image_size); -- THROW_CHECK_LE(image.cols(), options_.sift->max_image_size); -+ THROW_CHECK_LE(image.rows(), options_.max_image_size); -+ THROW_CHECK_LE(image.cols(), options_.max_image_size); - -- const Bitmap bitmap = -- Bitmap::ConvertFromRawBits(const_cast(image.data()), -- /*pitch=*/image.cols(), -- /*width=*/image.cols(), -- /*height=*/image.rows(), -- /*rgb=*/false); -+ Bitmap bitmap(image.cols(), image.rows(), /*as_rgb=*/false); -+ std::memcpy(bitmap.RowMajorData().data(), image.data(), bitmap.NumBytes()); - - FeatureKeypoints keypoints_; - FeatureDescriptors descriptors_; -@@ -117,10 +113,6 @@ void BindFeatureExtraction(py::module& m) { - auto PySiftExtractionOptions = - py::classh(m, "SiftExtractionOptions") - .def(py::init<>()) -- .def_readwrite( -- "max_image_size", -- &SiftExtractionOptions::max_image_size, -- "Maximum image size, otherwise image will be down-scaled.") - .def_readwrite("max_num_features", - &SiftExtractionOptions::max_num_features, - "Maximum number of features to detect, keeping " -@@ -173,6 +165,10 @@ void BindFeatureExtraction(py::module& m) { - auto PyFeatureExtractionOptions = - py::classh(m, "FeatureExtractionOptions") - .def(py::init<>()) -+ .def_readwrite( -+ "max_image_size", -+ &FeatureExtractionOptions::max_image_size, -+ "Maximum image size, otherwise image will be down-scaled.") - .def_readwrite("num_threads", - &FeatureExtractionOptions::num_threads, - "Number of threads for feature matching and " -diff --git a/src/pycolmap/sensor/bitmap.cc b/src/pycolmap/sensor/bitmap.cc -index 7e28ea9d..42d4873b 100644 ---- a/src/pycolmap/sensor/bitmap.cc -+++ b/src/pycolmap/sensor/bitmap.cc -@@ -36,28 +36,8 @@ void BindBitmap(pybind11::module& m) { - py::buffer_info output_into = output.request(); - uint8_t* output_row_ptr = - reinterpret_cast(output.request().ptr); -- const size_t output_pitch = output_into.shape[1] * channels; -- for (ssize_t y = 0; y < output_into.shape[0]; ++y) { -- if (is_rgb) { -- for (ssize_t x = 0; x < output_into.shape[1]; ++x) { -- // Notice that the underlying FreeImage buffer may order -- // the channels as BGR or in any other format and with -- // different striding, so we have to set each pixel -- // separately. -- // We always return the array in the order R, G, B. -- BitmapColor color; -- THROW_CHECK(self.GetPixel(x, y, &color)); -- output_row_ptr[3 * x] = color.r; -- output_row_ptr[3 * x + 1] = color.g; -- output_row_ptr[3 * x + 2] = color.b; -- } -- } else { -- // Copy (guaranteed contiguous) row memory directly. -- std::memcpy( -- output_row_ptr, self.GetScanline(y), output_into.shape[1]); -- } -- output_row_ptr += output_pitch; -- } -+ std::memcpy( -+ output_row_ptr, self.RowMajorData().data(), self.NumBytes()); - return output; - }) - .def_static( -@@ -75,47 +55,23 @@ void BindBitmap(pybind11::module& m) { - const int height = array.shape(0); - if (width == 0 || height == 0) { - throw std::runtime_error( -- "Input array must have positive width and height"); -+ "Input array must have positive width and height!"); - } - -- if (channels != 1 && channels != 3 && channels != 4) { -+ if (channels != 1 && channels != 3) { - throw std::runtime_error( -- "Input array must have 1, 3, or 4 channels!"); -+ "Input array must have 1 or 3 channels!"); - } - - const bool is_rgb = channels != 1; -- const size_t pitch = width * channels; - -- Bitmap output; -- output.Allocate(width, height, is_rgb); -+ Bitmap output(width, height, is_rgb); - - const uint8_t* input_row_ptr = - static_cast(array.request().ptr); - -- for (int y = 0; y < height; ++y) { -- if (is_rgb) { -- for (int x = 0; x < width; ++x) { -- // We assume that provided array dimensions are R, G, B. -- // Notice that the underlying FreeImage buffer may order -- // the channels as BGR or in any other format and with -- // different striding, so we have to set each pixel -- // separately. -- output.SetPixel( -- x, -- y, -- BitmapColor(input_row_ptr[channels * x], -- input_row_ptr[channels * x + 1], -- input_row_ptr[channels * x + 2])); -- } -- } else { -- // Copy (guaranteed contiguous) row memory directly. -- std::memcpy(const_cast(output.GetScanline(y)), -- input_row_ptr, -- width); -- } -- -- input_row_ptr += pitch; -- } -+ std::memcpy( -+ output.RowMajorData().data(), input_row_ptr, output.NumBytes()); - - return output; - }, -@@ -126,7 +82,7 @@ void BindBitmap(pybind11::module& m) { - .def("write", - &Bitmap::Write, - "path"_a, -- "flags"_a = 0, -+ "delinearize_colorspace"_a, - "Write bitmap to file.") - .def("__repr__", &CreateRepresentation) - .def_static( -diff --git a/src/pycolmap/sfm/incremental_mapper.cc b/src/pycolmap/sfm/incremental_mapper.cc -index e31c9ac8..6b80b1ef 100644 ---- a/src/pycolmap/sfm/incremental_mapper.cc -+++ b/src/pycolmap/sfm/incremental_mapper.cc -@@ -183,6 +183,11 @@ void BindIncrementalPipeline(py::module& m) { - &Opts::fix_existing_frames, - "If reconstruction is provided as input, fix the existing " - "frame poses.") -+ .def_readwrite( -+ "constant_rigs", -+ &Opts::constant_rigs, -+ "List of rigs for which to fix the sensor_from_rig transformation, " -+ "independent of ba_refine_sensor_from_rig.") - .def_readwrite("constant_cameras", - &Opts::constant_cameras, - "List of cameras for which to fix the camera parameters " -@@ -344,6 +349,11 @@ void BindIncrementalMapperOptions(py::module& m) { - &Opts::fix_existing_frames, - "If reconstruction is provided as input, fix the existing " - "frame poses.") -+ .def_readwrite( -+ "constant_rigs", -+ &Opts::constant_rigs, -+ "List of rigs for which to fix the sensor_from_rig transformation, " -+ "independent of ba_refine_sensor_from_rig.") - .def_readwrite("constant_cameras", - &Opts::constant_cameras, - "List of cameras for which to fix the camera parameters " -diff --git a/vcpkg-configuration.json b/vcpkg-configuration.json -new file mode 100644 -index 00000000..ce7d86ba ---- /dev/null -+++ b/vcpkg-configuration.json -@@ -0,0 +1,7 @@ -+{ -+ "default-registry": { -+ "kind": "git", -+ "repository": "https://github.com/Microsoft/vcpkg", -+ "baseline": "912567f6fdd1883e07b070dcc0aa67cec072042a" -+ } -+} -diff --git a/vcpkg.json b/vcpkg.json -index 6adbe3a6..dfc330a2 100644 ---- a/vcpkg.json -+++ b/vcpkg.json -@@ -20,7 +20,6 @@ - ] - }, - "eigen3", -- "freeimage", - "gflags", - "glog", - { -@@ -28,6 +27,7 @@ - "default-features": false - }, - "metis", -+ "openimageio", - "sqlite3", - { - "name": "vcpkg-cmake", -@@ -38,6 +38,16 @@ - "host": true - } - ], -+ "overrides": [ -+ { -+ "name": "metis", -+ "version": "2022-07-27" -+ }, -+ { -+ "name": "gklib", -+ "version": "2023-03-27" -+ } -+ ], - "default-features": [ - "gui", - "download" -@@ -60,7 +70,7 @@ - "description": "Build with GUI support.", - "dependencies": [ - "glew", -- "qt5-base" -+ "qtbase" - ] - }, - "cgal": { -@@ -75,7 +85,7 @@ - { - "name": "curl", - "features": [ -- "schannel" -+ "sspi" - ], - "platform": "windows" - }, -@@ -97,4 +107,4 @@ - ] - } - } --} -\ No newline at end of file -+} diff --git a/pkgs/by-name/co/colmap/package.nix b/pkgs/by-name/co/colmap/package.nix index 2c3c7289cc11..8cd9f89a0ed6 100644 --- a/pkgs/by-name/co/colmap/package.nix +++ b/pkgs/by-name/co/colmap/package.nix @@ -15,6 +15,8 @@ cgal, gmp, mpfr, + suitesparse, + onnxruntime, poselib, lz4, autoAddDriverRunpath, @@ -52,6 +54,8 @@ let mpfr lz4 qt5.qtbase + suitesparse + onnxruntime ] ++ lib.optionals cudaSupport [ cudatoolkit @@ -63,26 +67,30 @@ let inherit (cudaPackages) cudatoolkit; in stdenv'.mkDerivation { - version = "unstable-3.12.5-openimageio"; + version = "4.0.2"; pname = "colmap"; src = fetchFromGitHub { owner = "colmap"; repo = "colmap"; - rev = "f8edccaa36909713b9d3930e1ca65cb364a38b26"; - hash = "sha256-0lD7ywM48ODe11u9D3XSk9btqQ4gs/APBFf9IyiXe6g="; + rev = "d927f7e518fc20afa33390712c4cc20d85b730b8"; + hash = "sha256-+cPkksfCLyEo7A70nuRWnOBEkhx8BFevQ9XWTipEkpM="; }; - # TODO: remove this when https://github.com/colmap/colmap/pull/3459 is in a release - # This was produced with: - # git diff f8edccaa36909713b9d3930e1ca65cb364a38b26 e40c0730020938587c9d4eb7634cbff93cbc2f81 - patches = [ ./openimageio.patch ]; + patches = [ + ./suitesparse-no-include-subdir.patch + # Remove when https://github.com/colmap/colmap/pull/4265 is merged + ./disambiguate-gradientchecker.patch + ]; cmakeFlags = [ (lib.cmakeBool "DOWNLOAD_ENABLED" false) (lib.cmakeBool "UNINSTALL_ENABLED" false) (lib.cmakeBool "FETCH_POSELIB" false) (lib.cmakeBool "FETCH_FAISS" false) + (lib.cmakeBool "FETCH_ONNX" false) (lib.cmakeBool "TESTS_ENABLED" true) + (lib.cmakeFeature "CHOLMOD_INCLUDE_DIR_HINTS" "${suitesparse.dev}/include") + (lib.cmakeFeature "CHOLMOD_LIBRARY_DIR_HINTS" "${suitesparse}/lib") ] ++ lib.optionals cudaSupport [ (lib.cmakeBool "CUDA_ENABLED" cudaSupport) diff --git a/pkgs/by-name/co/colmap/suitesparse-no-include-subdir.patch b/pkgs/by-name/co/colmap/suitesparse-no-include-subdir.patch new file mode 100644 index 000000000000..45bd5046c6b2 --- /dev/null +++ b/pkgs/by-name/co/colmap/suitesparse-no-include-subdir.patch @@ -0,0 +1,22 @@ +diff --git a/cmake/FindCHOLMOD.cmake b/cmake/FindCHOLMOD.cmake +index a5daf0e3..b0f13e3e 100644 +--- a/cmake/FindCHOLMOD.cmake ++++ b/cmake/FindCHOLMOD.cmake +@@ -57,7 +57,7 @@ if(TARGET CHOLMOD::CHOLMOD) + else() + find_path(CHOLMOD_INCLUDE_DIRS + NAMES +- suitesparse/cholmod.h ++ cholmod.h + PATHS + ${CHOLMOD_INCLUDE_DIR_HINTS} + /usr/include +@@ -89,7 +89,7 @@ else() + + add_library(CHOLMOD::CHOLMOD INTERFACE IMPORTED) + target_include_directories( +- CHOLMOD::CHOLMOD INTERFACE ${CHOLMOD_INCLUDE_DIRS}/suitesparse) ++ CHOLMOD::CHOLMOD INTERFACE ${CHOLMOD_INCLUDE_DIRS}) + target_link_libraries( + CHOLMOD::CHOLMOD INTERFACE ${CHOLMOD_LIBRARIES}) + endif() From 7123f4434671910fc19b2630dcc7b6815c2059a7 Mon Sep 17 00:00:00 2001 From: transcaffeine Date: Sat, 14 Mar 2026 09:48:09 +0100 Subject: [PATCH 034/121] python3Packages.strawberry-django: 0.74.1 -> 0.75.1 --- pkgs/development/python-modules/strawberry-django/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/strawberry-django/default.nix b/pkgs/development/python-modules/strawberry-django/default.nix index 777e3ebccbd2..b7b256cc71c7 100644 --- a/pkgs/development/python-modules/strawberry-django/default.nix +++ b/pkgs/development/python-modules/strawberry-django/default.nix @@ -34,14 +34,14 @@ buildPythonPackage rec { pname = "strawberry-django"; - version = "0.74.1"; + version = "0.75.1"; pyproject = true; src = fetchFromGitHub { owner = "strawberry-graphql"; repo = "strawberry-django"; tag = version; - hash = "sha256-8T5lYM5JrxbeDCgvSGvBsimsF+tMwjS1hroqw2Gf7aA="; + hash = "sha256-vosD0JZYZzzl6Mp+AAxdXVox/7ay4FqnwqE6f1lSw3s="; }; postPatch = '' From 0b17b78d01a861a542c3d2542aef09a4a7bcca9c Mon Sep 17 00:00:00 2001 From: transcaffeine Date: Thu, 29 Jan 2026 19:05:04 +0100 Subject: [PATCH 035/121] netbox_4_5: init at 4.5.5 Release notes: - https://github.com/netbox-community/netbox/releases/tag/v4.5.0 - https://github.com/netbox-community/netbox/releases/tag/v4.5.1 - https://github.com/netbox-community/netbox/releases/tag/v4.5.2 - https://github.com/netbox-community/netbox/releases/tag/v4.5.3 - https://github.com/netbox-community/netbox/releases/tag/v4.5.4 - https://github.com/netbox-community/netbox/releases/tag/v4.5.5 Full changelog: https://github.com/netbox-community/netbox/compare/v4.4.9...v4.5.5 --- doc/release-notes/rl-2605.section.md | 4 + nixos/modules/services/web-apps/netbox.nix | 40 ++++-- nixos/tests/all-tests.nix | 1 + nixos/tests/web-apps/netbox-upgrade.nix | 7 +- nixos/tests/web-apps/netbox/default.nix | 30 +++- nixos/tests/web-apps/netbox/testScript.py | 59 +++++--- .../ne/netbox_4_5/custom-static-root.patch | 13 ++ pkgs/by-name/ne/netbox_4_5/package.nix | 132 ++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 +- 9 files changed, 252 insertions(+), 36 deletions(-) create mode 100644 pkgs/by-name/ne/netbox_4_5/custom-static-root.patch create mode 100644 pkgs/by-name/ne/netbox_4_5/package.nix diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index 06e6b8552d72..1a31755170e0 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -165,6 +165,10 @@ - The `programs.captive-browser` module no longer falls back on a setcap wrapper around udhcpc to discover your network's DNS server due to [GHSA-wc3r-c66x-8xmc](https://github.com/NixOS/nixpkgs/security/advisories/GHSA-wc3r-c66x-8xmc) (CVE-2026-25740). If you're using this module, you must either configure `programs.captive-browser.dhcp-dns` manually or enable one of NetworkManager, dhcpcd, or systemd-networkd. +- NetBox was updated to `>= 4.5.5`. Have a look at the breaking changes + of the [4.5 release](https://github.com/netbox-community/netbox/releases/tag/v4.5.0), + make the required changes to your database, if needed, then upgrade by setting `services.netbox.package = pkgs.netbox_4_5;` in your configuration. + - The `services.yggdrasil` module has been refactored with the following breaking changes: - The `services.yggdrasil.configFile` option has been removed. Configuration should now be specified directly via `services.yggdrasil.settings`. - The `services.yggdrasil.persistentKeys` option has been removed. To maintain persistent keys and IPv6 addresses across reboots, use `services.yggdrasil.settings.PrivateKeyPath` to securely load your private key from a file via systemd credentials. The private key must be in PEM format (PKCS #8). diff --git a/nixos/modules/services/web-apps/netbox.nix b/nixos/modules/services/web-apps/netbox.nix index f49b8271928d..d380ab60bc41 100644 --- a/nixos/modules/services/web-apps/netbox.nix +++ b/nixos/modules/services/web-apps/netbox.nix @@ -119,11 +119,11 @@ in package = lib.mkOption { type = lib.types.package; default = - if lib.versionAtLeast config.system.stateVersion "25.11" then pkgs.netbox_4_4 else pkgs.netbox_4_2; + if lib.versionAtLeast config.system.stateVersion "26.05" then pkgs.netbox_4_5 else pkgs.netbox_4_4; defaultText = lib.literalExpression '' - if lib.versionAtLeast config.system.stateVersion "25.11" - then pkgs.netbox_4_4 - else pkgs.netbox_4_2; + if lib.versionAtLeast config.system.stateVersion "26.05" + then pkgs.netbox_4_5 + else pkgs.netbox_4_4; ''; description = '' NetBox package to use. @@ -165,6 +165,15 @@ in ''; }; + apiTokenPeppersFile = lib.mkOption { + type = with lib.types; nullOr path; + description = '' + Path to a file containing the API_TOKEN_PEPPER that will be configured for the pepper_id with the id 1. + This is required for netbox >= 4.5. For generating this pepper, + [consider using `$INSTALL_ROOT/netbox/generate_secret_key.py`](https://netboxlabs.com/docs/netbox/configuration/required-parameters/#api_token_peppers) + ''; + }; + extraConfig = lib.mkOption { type = lib.types.lines; default = ""; @@ -237,10 +246,12 @@ in GIT_PATH = "${pkgs.gitMinimal}/bin/git"; - DATABASE = { - NAME = "netbox"; - USER = "netbox"; - HOST = "/run/postgresql"; + DATABASES = { + "default" = { + NAME = "netbox"; + USER = "netbox"; + HOST = "/run/postgresql"; + }; }; # Redis database settings. Redis is used for caching and for queuing @@ -283,6 +294,12 @@ in with open("${cfg.secretKeyFile}", "r") as file: SECRET_KEY = file.readline() '' + + (lib.optionalString (cfg.apiTokenPeppersFile != null) '' + with open("${cfg.apiTokenPeppersFile}", "r") as pepper_file: + API_TOKEN_PEPPERS = { + 1: pepper_file.readline(), + }; + '') + (lib.optionalString (cfg.keycloakClientSecret != null) '' with open("${cfg.keycloakClientSecret}", "r") as file: SOCIAL_AUTH_KEYCLOAK_SECRET = file.readline() @@ -446,5 +463,12 @@ in }; users.groups.netbox = { }; users.groups."${config.services.redis.servers.netbox.user}".members = [ "netbox" ]; + + assertions = [ + { + assertion = (lib.versionAtLeast cfg.package.version "4.5") -> (cfg.apiTokenPeppersFile != null); + message = "NetBox 4.5 or newer require setting `services.netbox.apiTokenPeppersFile`"; + } + ]; }; } diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index de66d01e1c09..d7644f4254c2 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1073,6 +1073,7 @@ in netbox_4_2 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_2; }; netbox_4_3 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_3; }; netbox_4_4 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_4; }; + netbox_4_5 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_5; }; netdata = runTest ./netdata.nix; networking.networkd = handleTest ./networking/networkd-and-scripted.nix { networkd = true; }; networking.networkmanager = handleTest ./networking/networkmanager.nix { }; diff --git a/nixos/tests/web-apps/netbox-upgrade.nix b/nixos/tests/web-apps/netbox-upgrade.nix index 5b60e8939ccb..ee84a6b34fd8 100644 --- a/nixos/tests/web-apps/netbox-upgrade.nix +++ b/nixos/tests/web-apps/netbox-upgrade.nix @@ -1,7 +1,7 @@ { lib, pkgs, ... }: let - oldNetbox = "netbox_4_3"; - newNetbox = "netbox_4_4"; + oldNetbox = "netbox_4_4"; + newNetbox = "netbox_4_5"; apiVersion = version: @@ -38,6 +38,9 @@ in secretKeyFile = pkgs.writeText "secret" '' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ''; + apiTokenPeppersFile = pkgs.writeText "pepper" '' + kp7ht*76fiQAhUi5dHfASLlYUE_S^gI^(7J^K5M!LfoH@vl&b_ + ''; }; services.nginx = { diff --git a/nixos/tests/web-apps/netbox/default.nix b/nixos/tests/web-apps/netbox/default.nix index b614b965ae6d..803cf5c25ed3 100644 --- a/nixos/tests/web-apps/netbox/default.nix +++ b/nixos/tests/web-apps/netbox/default.nix @@ -37,6 +37,10 @@ import ../../make-test-python.nix ( secretKeyFile = pkgs.writeText "secret" '' abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789 ''; + # Value from https://netbox.readthedocs.io/en/feature/configuration/required-parameters/#api_token_peppers + apiTokenPeppersFile = pkgs.writeText "pepper" '' + kp7ht*76fiQAhUi5dHfASLlYUE_S^gI^(7J^K5M!LfoH@vl&b_ + ''; enableLdap = true; ldapConfigPath = pkgs.writeText "ldap_config.py" '' @@ -155,10 +159,32 @@ import ../../make-test-python.nix ( u.set_password('netbox') u.save() ''; + createToken = pkgs.writeText "create-token-v2.py" '' + from users.models import Token, User + from users.choices import TokenVersionChoices + u = User.objects.first() + t = Token.objects.create(user=u, token="0123456789abcdef0123456789abcdef01234567", version=TokenVersionChoices.V2) + print(t.get_auth_header_prefix()) + ''; + netboxVersion = netbox.version; in builtins.replaceStrings - [ "\${changePassword}" "\${testUser}" "\${testPassword}" "\${testGroup}" ] - [ "${changePassword}" "${testUser}" "${testPassword}" "${testGroup}" ] + [ + "\${changePassword}" + "\${testUser}" + "\${testPassword}" + "\${testGroup}" + "\${createToken}" + "\${netboxVersion}" + ] + [ + "${changePassword}" + "${testUser}" + "${testPassword}" + "${testGroup}" + "${createToken}" + "${netboxVersion}" + ] (lib.readFile "${./testScript.py}"); } ) diff --git a/nixos/tests/web-apps/netbox/testScript.py b/nixos/tests/web-apps/netbox/testScript.py index f6c2c9821e12..4ff035a1f0cf 100644 --- a/nixos/tests/web-apps/netbox/testScript.py +++ b/nixos/tests/web-apps/netbox/testScript.py @@ -73,18 +73,7 @@ with subtest("Superuser can be created"): "netbox-manage createsuperuser --noinput --username netbox --email netbox@example.com" ) # Django doesn't have a "clean" way of inputting the password from the command line - machine.succeed("cat '${changePassword}' | netbox-manage shell") - -machine.wait_for_unit("network.target") - -with subtest("Home screen loads from nginx"): - machine.succeed( - "curl -sSfL http://localhost | grep 'Home | NetBox'" - ) - -with subtest("Staticfiles can be fetched"): - machine.succeed("curl -sSfL http://localhost/static/netbox.js") - machine.succeed("curl -sSfL http://localhost/static/docs/") + machine.succeed("cat '${changePassword}' | netbox-manage shell --interface python") def login(username: str, password: str): encoded_data = json.dumps({"username": username, "password": password}) @@ -101,8 +90,29 @@ def login(username: str, password: str): ) return result["key"] -with subtest("Can login"): - auth_token = login("netbox", "netbox") + +netbox_version = "${netboxVersion}" +if compare(netbox_version, '4.5.2') < 0: + with subtest("Can login"): + auth_token = login("netbox", "netbox") + +else: + with subtest("Superusertoken can be created"): + full_token = "0123456789abcdef0123456789abcdef01234567" + stdout = machine.succeed("cat ${createToken} | netbox-manage shell") + token_prefix = stdout.split(r"Bearer ")[-1].lstrip().rstrip() + auth_token = f"{token_prefix}{full_token}" + +machine.wait_for_unit("network.target") + +with subtest("Home screen loads from nginx"): + machine.succeed( + "curl -sSfL http://localhost | grep 'Home | NetBox'" + ) + +with subtest("Staticfiles can be fetched"): + machine.succeed("curl -sSfL http://localhost/static/netbox.js") + machine.succeed("curl -sSfL http://localhost/static/docs/") def get(uri: str): return json.loads( @@ -144,8 +154,8 @@ def post(uri: str, data: Dict[str, Any]): def patch(uri: str, data: Dict[str, Any]): return data_request(uri, "PATCH", data) -# Retrieve netbox version -netbox_version = get("/status/")["netbox-version"] +with subtest("Can retrieve netbox version"): + assert netbox_version == get("/status/")["netbox-version"] with subtest("Can create objects"): result = post("/dcim/sites/", {"name": "Test site", "slug": "test-site"}) @@ -263,12 +273,15 @@ if compare(netbox_version, '4.2.0') < 0: assert result["data"]["prefix_list"][0]["prefix"] == test_objects["prefixes"]["v4-with-updated-desc"]["prefix"] assert int(result["data"]["prefix_list"][0]["site"]["id"]) == int(test_objects["prefixes"]["v4-with-updated-desc"]["scope"]["id"]) -with subtest("Can login with LDAP"): - machine.wait_for_unit("openldap.service") - login("alice", "${testPassword}") +# With 4.5.2 and higher, obtaining a session cookie or token without supplying +# proper CSRF tokens on the frontend /login/ endpoint is no longer possible +if compare(netbox_version, '4.5.2') < 0: + with subtest("Can login with LDAP"): + machine.wait_for_unit("openldap.service") + login("alice", "${testPassword}") -with subtest("Can associate LDAP groups"): - result = get("/users/users/?username=${testUser}") + with subtest("Can associate LDAP groups"): + result = get("/users/users/?username=${testUser}") - assert result["count"] == 1 - assert any(group["name"] == "${testGroup}" for group in result["results"][0]["groups"]) + assert result["count"] == 1 + assert any(group["name"] == "${testGroup}" for group in result["results"][0]["groups"]) diff --git a/pkgs/by-name/ne/netbox_4_5/custom-static-root.patch b/pkgs/by-name/ne/netbox_4_5/custom-static-root.patch new file mode 100644 index 000000000000..c9219fa2b871 --- /dev/null +++ b/pkgs/by-name/ne/netbox_4_5/custom-static-root.patch @@ -0,0 +1,13 @@ +diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py +index 2de06dd10..00406af48 100644 +--- a/netbox/netbox/settings.py ++++ b/netbox/netbox/settings.py +@@ -410,7 +412,7 @@ USE_X_FORWARDED_HOST = True + X_FRAME_OPTIONS = 'SAMEORIGIN' + + # Static files (CSS, JavaScript, Images) +-STATIC_ROOT = BASE_DIR + '/static' ++STATIC_ROOT = getattr(configuration, 'STATIC_ROOT', os.path.join(BASE_DIR, 'static')).rstrip('/') + STATIC_URL = f'/{BASE_PATH}static/' + STATICFILES_DIRS = ( + os.path.join(BASE_DIR, 'project-static', 'dist'), diff --git a/pkgs/by-name/ne/netbox_4_5/package.nix b/pkgs/by-name/ne/netbox_4_5/package.nix new file mode 100644 index 000000000000..f080e6294209 --- /dev/null +++ b/pkgs/by-name/ne/netbox_4_5/package.nix @@ -0,0 +1,132 @@ +{ + lib, + fetchFromGitHub, + python3, + plugins ? _ps: [ ], + nixosTests, + nix-update-script, +}: +let + py = python3.override { + self = py; + packageOverrides = _final: prev: { django = prev.django_5; }; + }; + + extraBuildInputs = plugins py.pkgs; +in +py.pkgs.buildPythonApplication rec { + pname = "netbox"; + version = "4.5.5"; + pyproject = false; + + src = fetchFromGitHub { + owner = "netbox-community"; + repo = "netbox"; + tag = "v${version}"; + hash = "sha256-he+WNbzIZSc2q97YjnAKHeFR0MDZCkDuAF/mfgAZuU4="; + }; + + patches = [ + ./custom-static-root.patch + ]; + + dependencies = + ( + with py.pkgs; + [ + colorama + django + django-cors-headers + django-debug-toolbar + django-filter + django-graphiql-debug-toolbar + django-htmx + django-mptt + django-pglocks + django-prometheus + django-redis + django-rq + django-storages + django-tables2 + django-taggit + django-timezone-field + djangorestframework + drf-spectacular + drf-spectacular-sidecar + feedparser + jinja2 + markdown + netaddr + nh3 + pillow + psycopg + pyyaml + requests + social-auth-core + social-auth-app-django + sorl-thumbnail + strawberry-graphql + strawberry-django + svgwrite + tablib + + # Optional dependencies, kept here for backward compatibility + + # for the S3 data source backend + boto3 + # for Git data source backend + dulwich + # for error reporting + sentry-sdk + ] + ++ psycopg.optional-dependencies.c + ++ psycopg.optional-dependencies.pool + ++ social-auth-core.optional-dependencies.openidconnect + ) + ++ extraBuildInputs; + + nativeBuildInputs = with py.pkgs; [ + mkdocs-material + mkdocs-material-extensions + mkdocstrings + mkdocstrings-python + ]; + + postBuild = '' + PYTHONPATH=$PYTHONPATH:netbox/ + ${py.interpreter} -m mkdocs build + ''; + + installPhase = '' + mkdir -p $out/opt/netbox + cp -r . $out/opt/netbox + chmod +x $out/opt/netbox/netbox/manage.py + makeWrapper $out/opt/netbox/netbox/manage.py $out/bin/netbox \ + --prefix PYTHONPATH : "$PYTHONPATH" + ''; + + passthru = { + python = py; + # PYTHONPATH of all dependencies used by the package + pythonPath = py.pkgs.makePythonPath dependencies; + inherit (py.pkgs) gunicorn; + tests = { + netbox = nixosTests.netbox_4_5; + inherit (nixosTests) netbox-upgrade; + }; + updateScript = nix-update-script { }; + }; + + meta = { + homepage = "https://github.com/netbox-community/netbox"; + changelog = "https://github.com/netbox-community/netbox/blob/${src.tag}/docs/release-notes/version-${lib.versions.majorMinor version}.md"; + description = "IP address management (IPAM) and data center infrastructure management (DCIM) tool"; + mainProgram = "netbox"; + license = lib.licenses.asl20; + maintainers = with lib.maintainers; [ + minijackson + raitobezarius + transcaffeine + ]; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 3687b7d55d21..21b111fa25bf 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3001,7 +3001,7 @@ with pkgs; }; # Not in aliases because it wouldn't get picked up by callPackage - netbox = netbox_4_4; + netbox = netbox_4_5; netcap-nodpi = callPackage ../by-name/ne/netcap/package.nix { withDpi = false; From bdfdab00ecfc860b9f92fb02a18bb441b4776be2 Mon Sep 17 00:00:00 2001 From: transcaffeine Date: Thu, 29 Jan 2026 19:06:59 +0100 Subject: [PATCH 036/121] netbox_4_4: mark as EOL --- pkgs/by-name/ne/netbox_4_4/package.nix | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pkgs/by-name/ne/netbox_4_4/package.nix b/pkgs/by-name/ne/netbox_4_4/package.nix index 1a6bea9d66bf..1d81e03f7af7 100644 --- a/pkgs/by-name/ne/netbox_4_4/package.nix +++ b/pkgs/by-name/ne/netbox_4_4/package.nix @@ -123,6 +123,9 @@ py.pkgs.buildPythonApplication rec { description = "IP address management (IPAM) and data center infrastructure management (DCIM) tool"; mainProgram = "netbox"; license = lib.licenses.asl20; + knownVulnerabilities = [ + "Netbox Version ${version} is EOL; please upgrade by following the current release notes instructions" + ]; maintainers = with lib.maintainers; [ minijackson raitobezarius From 36790b3952bddeb41fc1f82481c1166b5dbdd00b Mon Sep 17 00:00:00 2001 From: transcaffeine Date: Sat, 7 Feb 2026 16:22:40 +0100 Subject: [PATCH 037/121] netbox_4_2: remove end of life package --- nixos/tests/all-tests.nix | 1 - .../ne/netbox_4_2/custom-static-root.patch | 13 -- pkgs/by-name/ne/netbox_4_2/package.nix | 132 ------------------ 3 files changed, 146 deletions(-) delete mode 100644 pkgs/by-name/ne/netbox_4_2/custom-static-root.patch delete mode 100644 pkgs/by-name/ne/netbox_4_2/package.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index d7644f4254c2..e7f7433d0ea1 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1070,7 +1070,6 @@ in neo4j = runTest ./neo4j.nix; netbird = runTest ./netbird.nix; netbox-upgrade = runTest ./web-apps/netbox-upgrade.nix; - netbox_4_2 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_2; }; netbox_4_3 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_3; }; netbox_4_4 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_4; }; netbox_4_5 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_5; }; diff --git a/pkgs/by-name/ne/netbox_4_2/custom-static-root.patch b/pkgs/by-name/ne/netbox_4_2/custom-static-root.patch deleted file mode 100644 index c9219fa2b871..000000000000 --- a/pkgs/by-name/ne/netbox_4_2/custom-static-root.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py -index 2de06dd10..00406af48 100644 ---- a/netbox/netbox/settings.py -+++ b/netbox/netbox/settings.py -@@ -410,7 +412,7 @@ USE_X_FORWARDED_HOST = True - X_FRAME_OPTIONS = 'SAMEORIGIN' - - # Static files (CSS, JavaScript, Images) --STATIC_ROOT = BASE_DIR + '/static' -+STATIC_ROOT = getattr(configuration, 'STATIC_ROOT', os.path.join(BASE_DIR, 'static')).rstrip('/') - STATIC_URL = f'/{BASE_PATH}static/' - STATICFILES_DIRS = ( - os.path.join(BASE_DIR, 'project-static', 'dist'), diff --git a/pkgs/by-name/ne/netbox_4_2/package.nix b/pkgs/by-name/ne/netbox_4_2/package.nix deleted file mode 100644 index ec7d07d0b243..000000000000 --- a/pkgs/by-name/ne/netbox_4_2/package.nix +++ /dev/null @@ -1,132 +0,0 @@ -{ - lib, - fetchFromGitHub, - python3, - plugins ? _ps: [ ], - nixosTests, - nix-update-script, -}: -let - py = python3.override { - packageOverrides = _final: prev: { django = prev.django_5; }; - }; - - extraBuildInputs = plugins py.pkgs; -in -py.pkgs.buildPythonApplication rec { - pname = "netbox"; - version = "4.2.9"; - - pyproject = false; - - src = fetchFromGitHub { - owner = "netbox-community"; - repo = "netbox"; - tag = "v${version}"; - hash = "sha256-uVe4YTZoxRMBfvItFa9SMHu4AaVvygfAg9GDB115TFc="; - }; - - patches = [ - ./custom-static-root.patch - ]; - - propagatedBuildInputs = - ( - with py.pkgs; - [ - django - django-cors-headers - django-debug-toolbar - django-filter - django-graphiql-debug-toolbar - django-htmx - django-mptt - django-pglocks - django-prometheus - django-redis - django-rq - django-tables2 - django-taggit - django-timezone-field - djangorestframework - drf-spectacular - drf-spectacular-sidecar - feedparser - jinja2 - markdown - netaddr - nh3 - pillow - psycopg - psycopg.optional-dependencies.c - psycopg.optional-dependencies.pool - pyyaml - requests - social-auth-core - social-auth-app-django - strawberry-graphql - strawberry-django - svgwrite - tablib - - # Optional dependencies, kept here for backward compatibility - - # for the S3 data source backend - boto3 - # for Git data source backend - dulwich - # for error reporting - sentry-sdk - ] - ++ social-auth-core.passthru.optional-dependencies.openidconnect - ) - ++ extraBuildInputs; - - buildInputs = with py.pkgs; [ - mkdocs-material - mkdocs-material-extensions - mkdocstrings - mkdocstrings-python - ]; - - nativeBuildInputs = [ py.pkgs.mkdocs ]; - - postBuild = '' - PYTHONPATH=$PYTHONPATH:netbox/ - python -m mkdocs build - ''; - - installPhase = '' - mkdir -p $out/opt/netbox - cp -r . $out/opt/netbox - chmod +x $out/opt/netbox/netbox/manage.py - makeWrapper $out/opt/netbox/netbox/manage.py $out/bin/netbox \ - --prefix PYTHONPATH : "$PYTHONPATH" - ''; - - passthru = { - python = python3; - # PYTHONPATH of all dependencies used by the package - pythonPath = py.pkgs.makePythonPath propagatedBuildInputs; - inherit (py.pkgs) gunicorn; - tests = { - netbox = nixosTests.netbox_4_2; - inherit (nixosTests) netbox-upgrade; - }; - updateScript = nix-update-script { }; - }; - - meta = { - homepage = "https://github.com/netbox-community/netbox"; - description = "IP address management (IPAM) and data center infrastructure management (DCIM) tool"; - mainProgram = "netbox"; - license = lib.licenses.asl20; - knownVulnerabilities = [ - "Netbox Version ${version} is EOL; please upgrade by following the current release notes instructions" - ]; - maintainers = with lib.maintainers; [ - minijackson - raitobezarius - ]; - }; -} From 8b4b6f5977616178ead858442cf18ccc4884f412 Mon Sep 17 00:00:00 2001 From: transcaffeine Date: Sat, 7 Feb 2026 16:24:08 +0100 Subject: [PATCH 038/121] netbox_4_3: remove end of life package --- nixos/tests/all-tests.nix | 1 - .../ne/netbox_4_3/custom-static-root.patch | 13 -- pkgs/by-name/ne/netbox_4_3/package.nix | 133 ------------------ 3 files changed, 147 deletions(-) delete mode 100644 pkgs/by-name/ne/netbox_4_3/custom-static-root.patch delete mode 100644 pkgs/by-name/ne/netbox_4_3/package.nix diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index e7f7433d0ea1..9cb4a0e01846 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -1070,7 +1070,6 @@ in neo4j = runTest ./neo4j.nix; netbird = runTest ./netbird.nix; netbox-upgrade = runTest ./web-apps/netbox-upgrade.nix; - netbox_4_3 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_3; }; netbox_4_4 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_4; }; netbox_4_5 = handleTest ./web-apps/netbox/default.nix { netbox = pkgs.netbox_4_5; }; netdata = runTest ./netdata.nix; diff --git a/pkgs/by-name/ne/netbox_4_3/custom-static-root.patch b/pkgs/by-name/ne/netbox_4_3/custom-static-root.patch deleted file mode 100644 index c9219fa2b871..000000000000 --- a/pkgs/by-name/ne/netbox_4_3/custom-static-root.patch +++ /dev/null @@ -1,13 +0,0 @@ -diff --git a/netbox/netbox/settings.py b/netbox/netbox/settings.py -index 2de06dd10..00406af48 100644 ---- a/netbox/netbox/settings.py -+++ b/netbox/netbox/settings.py -@@ -410,7 +412,7 @@ USE_X_FORWARDED_HOST = True - X_FRAME_OPTIONS = 'SAMEORIGIN' - - # Static files (CSS, JavaScript, Images) --STATIC_ROOT = BASE_DIR + '/static' -+STATIC_ROOT = getattr(configuration, 'STATIC_ROOT', os.path.join(BASE_DIR, 'static')).rstrip('/') - STATIC_URL = f'/{BASE_PATH}static/' - STATICFILES_DIRS = ( - os.path.join(BASE_DIR, 'project-static', 'dist'), diff --git a/pkgs/by-name/ne/netbox_4_3/package.nix b/pkgs/by-name/ne/netbox_4_3/package.nix deleted file mode 100644 index 3689a4177415..000000000000 --- a/pkgs/by-name/ne/netbox_4_3/package.nix +++ /dev/null @@ -1,133 +0,0 @@ -{ - lib, - fetchFromGitHub, - python3, - plugins ? _ps: [ ], - nixosTests, - nix-update-script, -}: -let - py = python3.override { - self = py; - packageOverrides = _final: prev: { django = prev.django_5; }; - }; - - extraBuildInputs = plugins py.pkgs; -in -py.pkgs.buildPythonApplication rec { - pname = "netbox"; - version = "4.3.7"; - pyproject = false; - - src = fetchFromGitHub { - owner = "netbox-community"; - repo = "netbox"; - tag = "v${version}"; - hash = "sha256-xVOP1D3C12M0M8oTrCA0M17NLuor+46UwiaKymSAVJM="; - }; - - patches = [ - ./custom-static-root.patch - ]; - - dependencies = - ( - with py.pkgs; - [ - django - django-cors-headers - django-debug-toolbar - django-filter - django-graphiql-debug-toolbar - django-htmx - django-mptt - django-pglocks - django-prometheus - django-redis - django-rq - django-storages - django-tables2 - django-taggit - django-timezone-field - djangorestframework - drf-spectacular - drf-spectacular-sidecar - feedparser - jinja2 - markdown - netaddr - nh3 - pillow - psycopg - pyyaml - requests - social-auth-core - social-auth-app-django - strawberry-graphql - strawberry-django - svgwrite - tablib - - # Optional dependencies, kept here for backward compatibility - - # for the S3 data source backend - boto3 - # for Git data source backend - dulwich - # for error reporting - sentry-sdk - ] - ++ psycopg.optional-dependencies.c - ++ psycopg.optional-dependencies.pool - ++ social-auth-core.optional-dependencies.openidconnect - ) - ++ extraBuildInputs; - - nativeBuildInputs = with py.pkgs; [ - mkdocs-material - mkdocs-material-extensions - mkdocstrings - mkdocstrings-python - ]; - - postBuild = '' - PYTHONPATH=$PYTHONPATH:netbox/ - ${py.interpreter} -m mkdocs build - ''; - - installPhase = '' - mkdir -p $out/opt/netbox - cp -r . $out/opt/netbox - chmod +x $out/opt/netbox/netbox/manage.py - makeWrapper $out/opt/netbox/netbox/manage.py $out/bin/netbox \ - --prefix PYTHONPATH : "$PYTHONPATH" - ''; - - passthru = { - python = py; - # PYTHONPATH of all dependencies used by the package - pythonPath = py.pkgs.makePythonPath dependencies; - inherit (py.pkgs) gunicorn; - tests = { - netbox = nixosTests.netbox_4_3; - inherit (nixosTests) netbox-upgrade; - }; - updateScript = nix-update-script { }; - }; - - meta = { - homepage = "https://github.com/netbox-community/netbox"; - changelog = "https://github.com/netbox-community/netbox/blob/${src.tag}/docs/release-notes/version-${lib.versions.majorMinor version}.md"; - description = "IP address management (IPAM) and data center infrastructure management (DCIM) tool"; - mainProgram = "netbox"; - license = lib.licenses.asl20; - knownVulnerabilities = [ - "Netbox Version ${version} is EOL; please upgrade by following the current release notes instructions" - ]; - maintainers = with lib.maintainers; [ - minijackson - raitobezarius - transcaffeine - ]; - }; -} From 0a8e6740af9f2e2ee006577915f31ec4cf8ef64e Mon Sep 17 00:00:00 2001 From: transcaffeine Date: Sat, 7 Feb 2026 16:30:26 +0100 Subject: [PATCH 039/121] netbox_4_4: fix passthru tests --- pkgs/by-name/ne/netbox_4_4/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/ne/netbox_4_4/package.nix b/pkgs/by-name/ne/netbox_4_4/package.nix index 1d81e03f7af7..80abaa7093f8 100644 --- a/pkgs/by-name/ne/netbox_4_4/package.nix +++ b/pkgs/by-name/ne/netbox_4_4/package.nix @@ -111,7 +111,7 @@ py.pkgs.buildPythonApplication rec { pythonPath = py.pkgs.makePythonPath dependencies; inherit (py.pkgs) gunicorn; tests = { - netbox = nixosTests.netbox_4_3; + netbox = nixosTests.netbox_4_4; inherit (nixosTests) netbox-upgrade; }; updateScript = nix-update-script { }; From 098d4e87b35d64525c171f50d0422582e8eaa1c8 Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Wed, 18 Mar 2026 22:32:13 +0400 Subject: [PATCH 040/121] =?UTF-8?q?the-foundation:=201.11.0=20=E2=86=92=20?= =?UTF-8?q?1.12.0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/by-name/th/the-foundation/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/th/the-foundation/package.nix b/pkgs/by-name/th/the-foundation/package.nix index ca44c679b1b9..7d7b2c920595 100644 --- a/pkgs/by-name/th/the-foundation/package.nix +++ b/pkgs/by-name/th/the-foundation/package.nix @@ -13,14 +13,14 @@ stdenv.mkDerivation (finalAttrs: { pname = "the-foundation"; - version = "1.11.0"; + version = "1.12.0"; src = fetchFromGitea { domain = "git.skyjake.fi"; owner = "skyjake"; repo = "the_Foundation"; rev = "v${finalAttrs.version}"; - hash = "sha256-71MYOlCVkYOFB9byYaNmy31NfnssmGwB0lusjOpE2Ts="; + hash = "sha256-dAeeeu0nWS/Tz4/t/s9xKcx2io5FGooHhWiK12GHJpQ="; }; nativeBuildInputs = [ From f7193d738d585d9c9e0877f2709a98769ca8251b Mon Sep 17 00:00:00 2001 From: crertel Date: Thu, 19 Mar 2026 00:40:53 -0500 Subject: [PATCH 041/121] lmstudio: 0.4.6.1 -> 0.4.7.4 --- pkgs/by-name/lm/lmstudio/package.nix | 12 ++++++------ pkgs/by-name/lm/lmstudio/update.sh | 2 +- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/pkgs/by-name/lm/lmstudio/package.nix b/pkgs/by-name/lm/lmstudio/package.nix index f60b84bb508d..af12ffd6a653 100644 --- a/pkgs/by-name/lm/lmstudio/package.nix +++ b/pkgs/by-name/lm/lmstudio/package.nix @@ -7,12 +7,12 @@ let pname = "lmstudio"; - version_aarch64-linux = "0.4.5-2"; - hash_aarch64-linux = "sha256-BeF9FNMde9RW2icdq07zkWQafge7ViWKvR+xupRIdjE="; - version_aarch64-darwin = "0.4.6-1"; - hash_aarch64-darwin = "sha256-CpeBUXpBAOJPEZAb3neY5pWRSGNcy4Usgsm6qyI5PVA="; - version_x86_64-linux = "0.4.6-1"; - hash_x86_64-linux = "sha256-FHZ64zmnqHrQyX4ift/lVUzW+HiCVkXpWVa4hkssX/k="; + version_aarch64-linux = "0.4.7-4"; + hash_aarch64-linux = "sha256-4gGg8CULPhAw1ZytaHmJNBqNyVVNO2LV+tm3AUi2sJo="; + version_aarch64-darwin = "0.4.7-4"; + hash_aarch64-darwin = "sha256-V0m5oK+HCBaZPr6tAJVa98jb3IEPWs6ccAa/1GXsgy8="; + version_x86_64-linux = "0.4.7-4"; + hash_x86_64-linux = "sha256-2dSgBr2B+PIUi/YCBmXDWXQWEEId6Qymh1JQuAPG/xU="; meta = { description = "LM Studio is an easy to use desktop app for experimenting with local and open-source Large Language Models (LLMs)"; diff --git a/pkgs/by-name/lm/lmstudio/update.sh b/pkgs/by-name/lm/lmstudio/update.sh index c884550ecae0..6f49146c4acf 100755 --- a/pkgs/by-name/lm/lmstudio/update.sh +++ b/pkgs/by-name/lm/lmstudio/update.sh @@ -3,7 +3,7 @@ set -euo pipefail -for system in "aarch64-darwin darwin/arm64" "x86_64-linux linux/x64"; do +for system in "aarch64-darwin darwin/arm64" "x86_64-linux linux/x64" "aarch64-linux linux/arm64"; do # shellcheck disable=SC2086 set -- ${system} # split string into variables $1 and $2 From 3cc299b04527b01c3474875bb60580a77400542a Mon Sep 17 00:00:00 2001 From: Jost Alemann Date: Thu, 19 Mar 2026 11:16:02 +0100 Subject: [PATCH 042/121] harper: 1.10.0 -> 1.11.0 Changelog: https://github.com/Automattic/harper/releases/tag/v1.11.0 Diff: https://github.com/Automattic/harper/compare/v1.10.0...v1.11.0 --- pkgs/by-name/ha/harper/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ha/harper/package.nix b/pkgs/by-name/ha/harper/package.nix index e4cafaef36c6..a300172f3ce5 100644 --- a/pkgs/by-name/ha/harper/package.nix +++ b/pkgs/by-name/ha/harper/package.nix @@ -8,18 +8,18 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "harper"; - version = "1.10.0"; + version = "1.11.0"; src = fetchFromGitHub { owner = "Automattic"; repo = "harper"; rev = "v${finalAttrs.version}"; - hash = "sha256-QI9uwrYhXUle6ZeGb1J9A7D1mqRM8Pb62Sk93M8zrS4="; + hash = "sha256-O9xmnIUv7ctIbD691nKFNEWbYix1VjhEjTUCaOsnhRM="; }; buildAndTestSubdir = "harper-ls"; - cargoHash = "sha256-zPi3HhYJzPy/x/7/8LxuOGgCkwlC2qMfKWsuiPLHGOQ="; + cargoHash = "sha256-b6a5czpxkedBIMTWS6+wURgGS9dUH6/JRqcr9JhOdss="; passthru.updateScript = nix-update-script { }; From 1a7943c0fd1ccd00b6276e9e22c0cbbb99b8fea3 Mon Sep 17 00:00:00 2001 From: Weijia Wang <9713184+wegank@users.noreply.github.com> Date: Thu, 19 Mar 2026 15:39:44 +0100 Subject: [PATCH 043/121] powershell: 7.5.5 -> 7.6.0 https://github.com/PowerShell/PowerShell/releases/tag/v7.6.0 --- pkgs/by-name/po/powershell/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/po/powershell/package.nix b/pkgs/by-name/po/powershell/package.nix index 13dddd9b9570..a34c8e700166 100644 --- a/pkgs/by-name/po/powershell/package.nix +++ b/pkgs/by-name/po/powershell/package.nix @@ -31,7 +31,7 @@ let in stdenv.mkDerivation rec { pname = "powershell"; - version = "7.5.5"; + version = "7.6.0"; src = passthru.sources.${stdenv.hostPlatform.system} @@ -96,19 +96,19 @@ stdenv.mkDerivation rec { sources = { aarch64-darwin = fetchurl { url = "https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-osx-arm64.tar.gz"; - hash = "sha256-2/P90/s2Dro1lYD9xyI9Z5oV+UhNLxY/qwdCJ3mkf1I="; + hash = "sha256-u1LbkOlk7guR6T9VmzUIeMayfBL9UYMNjsoXk3Erljk="; }; aarch64-linux = fetchurl { url = "https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-linux-arm64.tar.gz"; - hash = "sha256-4i4PAFthzjul5ImHAPacPgbdov3gcfOCqxVnDWjw5Kc="; + hash = "sha256-3d91ZPs7UtwmvlWA/FtOCOs/plsJRIiq5tSzytX+pGA="; }; x86_64-darwin = fetchurl { url = "https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-osx-x64.tar.gz"; - hash = "sha256-JIKb2lh+o5DAJ1qYHeX/nSWV8nPklI2eaediwtTnenk="; + hash = "sha256-fGJ5z+rQYyRFGhD/dBiDCGyaAPAkuuqSS7nTwQb+DII="; }; x86_64-linux = fetchurl { url = "https://github.com/PowerShell/PowerShell/releases/download/v${version}/powershell-${version}-linux-x64.tar.gz"; - hash = "sha256-OaYvRmlW42Bq7mY37Q0HNcHtJ2Eqdt6XOxEVMN3/Lnc="; + hash = "sha256-BFF0cs9X1/nL2TiX2pvtRnxzymBjwp12VevCCqHWAj8="; }; }; tests.version = testers.testVersion { From fded9fc8c85ea7efe61700a3369cc125e89ab6c8 Mon Sep 17 00:00:00 2001 From: Doron Behar Date: Thu, 19 Mar 2026 22:33:37 +0200 Subject: [PATCH 044/121] xre: init at 0.1.1 https://github.com/wfxr/xre --- pkgs/by-name/xr/xre/package.nix | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 pkgs/by-name/xr/xre/package.nix diff --git a/pkgs/by-name/xr/xre/package.nix b/pkgs/by-name/xr/xre/package.nix new file mode 100644 index 000000000000..57e7891f245e --- /dev/null +++ b/pkgs/by-name/xr/xre/package.nix @@ -0,0 +1,31 @@ +{ + lib, + rustPlatform, + fetchFromGitHub, +}: + +rustPlatform.buildRustPackage (finalAttrs: { + pname = "xre"; + version = "0.1.1"; + + src = fetchFromGitHub { + owner = "wfxr"; + repo = "xre"; + tag = "v${finalAttrs.version}"; + hash = "sha256-auK7A99QdIJehj0tsM2WH/QEcNktZddoG86zwXD4g4Q="; + }; + + cargoHash = "sha256-ZgPMMUc5nGJMDY3q3n+37Nv0kjRIARooHG2RxWI3o88="; + + meta = { + description = "Fast regex extraction tool with pattern matching, replacement, and configurable sorting"; + homepage = "https://github.com/wfxr/xre"; + changelog = "https://github.com/wfxr/xre/blob/${finalAttrs.src.rev}/CHANGELOG.md"; + license = with lib.licenses; [ + asl20 + mit + ]; + maintainers = with lib.maintainers; [ doronbehar ]; + mainProgram = "xre"; + }; +}) From ac3677ac98dd24c3c91e007bd2cd0deeb0bd561d Mon Sep 17 00:00:00 2001 From: Jost Alemann Date: Thu, 19 Mar 2026 22:19:57 +0100 Subject: [PATCH 045/121] harper: 1.11.0 -> 1.12.0 Changelog: https://github.com/Automattic/harper/releases/tag/v1.12.0 Diff: https://github.com/Automattic/harper/compare/v1.11.0...v1.12.0 --- pkgs/by-name/ha/harper/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ha/harper/package.nix b/pkgs/by-name/ha/harper/package.nix index a300172f3ce5..94f5d8627744 100644 --- a/pkgs/by-name/ha/harper/package.nix +++ b/pkgs/by-name/ha/harper/package.nix @@ -8,18 +8,18 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "harper"; - version = "1.11.0"; + version = "1.12.0"; src = fetchFromGitHub { owner = "Automattic"; repo = "harper"; rev = "v${finalAttrs.version}"; - hash = "sha256-O9xmnIUv7ctIbD691nKFNEWbYix1VjhEjTUCaOsnhRM="; + hash = "sha256-PIUrOwKiLZyeHceOUK7gSylhO815gyj7/XERGGGYAsA="; }; buildAndTestSubdir = "harper-ls"; - cargoHash = "sha256-b6a5czpxkedBIMTWS6+wURgGS9dUH6/JRqcr9JhOdss="; + cargoHash = "sha256-79wUwINGkhHSmb+0Mq+x+evZNLfhNtWoRgoJHhIlw90="; passthru.updateScript = nix-update-script { }; From 4d8847ab0d65a172832887ce663682020a086690 Mon Sep 17 00:00:00 2001 From: Sigmanificient Date: Fri, 20 Mar 2026 01:15:50 +0100 Subject: [PATCH 046/121] python3Packages.djangorestframework-stubs: fix build --- .../python-modules/djangorestframework-stubs/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/djangorestframework-stubs/default.nix b/pkgs/development/python-modules/djangorestframework-stubs/default.nix index 2a9600808084..e3ec92561dc8 100644 --- a/pkgs/development/python-modules/djangorestframework-stubs/default.nix +++ b/pkgs/development/python-modules/djangorestframework-stubs/default.nix @@ -10,7 +10,7 @@ pytestCheckHook, requests, types-pyyaml, - setuptools, + uv-build, types-markdown, types-requests, typing-extensions, @@ -30,10 +30,10 @@ buildPythonPackage rec { postPatch = '' substituteInPlace pyproject.toml \ - --replace-fail "<79.0.0" "" + --replace-fail "uv_build>=0.8.19,<0.10.0" "uv_build" ''; - build-system = [ setuptools ]; + build-system = [ uv-build ]; dependencies = [ django-stubs From 2f9ba4329f3e54a371c8dadc11080a1a986fc771 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 19 Mar 2026 17:22:12 -0700 Subject: [PATCH 047/121] python3Packages.pytenable: organize imports --- .../python-modules/pytenable/default.nix | 26 ++++++++++++------- 1 file changed, 16 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/pytenable/default.nix b/pkgs/development/python-modules/pytenable/default.nix index 9a9e0204176e..6fdeb32ec110 100644 --- a/pkgs/development/python-modules/pytenable/default.nix +++ b/pkgs/development/python-modules/pytenable/default.nix @@ -1,28 +1,34 @@ { lib, buildPythonPackage, + fetchFromGitHub, + + # build-system + setuptools, + + # dependencies cryptography, defusedxml, - fetchFromGitHub, gql, graphql-core, marshmallow, - pydantic-extra-types, pydantic, + pydantic-extra-types, + python-box, + python-dateutil, + requests, + requests-toolbelt, + restfly, + semver, + typing-extensions, + + # tests pytest-cov-stub, pytest-datafiles, pytest-vcr, pytestCheckHook, - python-box, - python-dateutil, requests-pkcs12, - requests-toolbelt, - requests, responses, - restfly, - semver, - setuptools, - typing-extensions, }: buildPythonPackage rec { From ae40d907aacd73ff4d54e331fb2c48ad78108551 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 12 Mar 2026 14:51:38 -0700 Subject: [PATCH 048/121] python3Packages.pytenable: migrate to finalAttrs --- pkgs/development/python-modules/pytenable/default.nix | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/pytenable/default.nix b/pkgs/development/python-modules/pytenable/default.nix index 6fdeb32ec110..7c58cd5ed927 100644 --- a/pkgs/development/python-modules/pytenable/default.nix +++ b/pkgs/development/python-modules/pytenable/default.nix @@ -31,7 +31,7 @@ responses, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "pytenable"; version = "1.9.0"; pyproject = true; @@ -39,7 +39,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "tenable"; repo = "pyTenable"; - tag = version; + tag = finalAttrs.version; hash = "sha256-ml5364D3qvd6VNhF2JyGoCzxbdO0DBkaBMoD38O5x8o="; }; @@ -104,8 +104,9 @@ buildPythonPackage rec { meta = { description = "Python library for the Tenable.io and TenableSC API"; homepage = "https://github.com/tenable/pyTenable"; - changelog = "https://github.com/tenable/pyTenable/releases/tag/${src.tag}"; + changelog = "https://github.com/tenable/pyTenable/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; }; -} +}) + From 7af57981ad7c407873c2f4ed9f9059507b8a8981 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 12 Mar 2026 14:57:02 -0700 Subject: [PATCH 049/121] python3Packages.pytenable: pin marshmallow<4 --- .../python-modules/pytenable/default.nix | 26 ++++++++++++++++--- 1 file changed, 23 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/pytenable/default.nix b/pkgs/development/python-modules/pytenable/default.nix index 7c58cd5ed927..9cfe7813df0c 100644 --- a/pkgs/development/python-modules/pytenable/default.nix +++ b/pkgs/development/python-modules/pytenable/default.nix @@ -11,7 +11,6 @@ defusedxml, gql, graphql-core, - marshmallow, pydantic, pydantic-extra-types, python-box, @@ -22,6 +21,9 @@ semver, typing-extensions, + # marshmallow build system + flit-core, + # tests pytest-cov-stub, pytest-datafiles, @@ -30,7 +32,26 @@ requests-pkcs12, responses, }: +let + marshmallow' = buildPythonPackage { + pname = "marshmallow"; + version = "3.26.2"; + pyproject = true; + src = fetchFromGitHub { + owner = "marshmallow-code"; + repo = "marshmallow"; + tag = "3.26.2"; + hash = "sha256-ioe+aZHOW8r3wF3UknbTjAP0dEggd/NL9PTkPVQ46zM="; + }; + + build-system = [ flit-core ]; + + doCheck = false; + + pythonImportsCheck = [ "marshmallow" ]; + }; +in buildPythonPackage (finalAttrs: { pname = "pytenable"; version = "1.9.0"; @@ -55,7 +76,7 @@ buildPythonPackage (finalAttrs: { defusedxml gql graphql-core - marshmallow + marshmallow' pydantic pydantic-extra-types python-box @@ -109,4 +130,3 @@ buildPythonPackage (finalAttrs: { maintainers = with lib.maintainers; [ fab ]; }; }) - From daaf7c78f5302d94f7db4739cc78201fbe6c4693 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 12 Mar 2026 14:59:16 -0700 Subject: [PATCH 050/121] python3Packages.pytenable: disable pytest warning that breaks build --- pkgs/development/python-modules/pytenable/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/pytenable/default.nix b/pkgs/development/python-modules/pytenable/default.nix index 9cfe7813df0c..a550bbc079aa 100644 --- a/pkgs/development/python-modules/pytenable/default.nix +++ b/pkgs/development/python-modules/pytenable/default.nix @@ -97,6 +97,10 @@ buildPythonPackage (finalAttrs: { responses ]; + pytestFlags = [ + "-Wignore::pytest.PytestRemovedIn9Warning" + ]; + disabledTestPaths = [ # Disable tests that requires network access "tests/io/" From bebedd13b1ab73c2303d1201444456a1b77b7ebc Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 12 Mar 2026 15:23:21 -0700 Subject: [PATCH 051/121] python3Packages.faraday-agent-parameters-types: build from github source --- .../faraday-agent-parameters-types/default.nix | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/faraday-agent-parameters-types/default.nix b/pkgs/development/python-modules/faraday-agent-parameters-types/default.nix index 076a1e61d727..d0ab4acd3b01 100644 --- a/pkgs/development/python-modules/faraday-agent-parameters-types/default.nix +++ b/pkgs/development/python-modules/faraday-agent-parameters-types/default.nix @@ -1,7 +1,7 @@ { lib, buildPythonPackage, - fetchPypi, + fetchFromGitHub, marshmallow, packaging, pytestCheckHook, @@ -14,10 +14,11 @@ buildPythonPackage rec { version = "1.9.1"; pyproject = true; - src = fetchPypi { - pname = "faraday_agent_parameters_types"; - inherit version; - hash = "sha256-PWO4wufHGIgAi1BHoM/+6ZjsUDB4oY26NsHOdNYYTJc="; + src = fetchFromGitHub { + owner = "infobyte"; + repo = "faraday_agent_parameters_types"; + tag = version; + hash = "sha256-Oe/9/zKOoCLK3JHMacOhk2+d91MrhzkBTW3POoFm71M="; }; pythonRelaxDeps = [ "validators" ]; From 478cb0c0e690960354ed162f941a4583b59fb928 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 12 Mar 2026 15:25:14 -0700 Subject: [PATCH 052/121] python3Packages.faraday-agent-parameters-types: migrate to finalAttrs --- .../faraday-agent-parameters-types/default.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/development/python-modules/faraday-agent-parameters-types/default.nix b/pkgs/development/python-modules/faraday-agent-parameters-types/default.nix index d0ab4acd3b01..edd31372b3ec 100644 --- a/pkgs/development/python-modules/faraday-agent-parameters-types/default.nix +++ b/pkgs/development/python-modules/faraday-agent-parameters-types/default.nix @@ -9,7 +9,7 @@ validators, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "faraday-agent-parameters-types"; version = "1.9.1"; pyproject = true; @@ -17,7 +17,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "infobyte"; repo = "faraday_agent_parameters_types"; - tag = version; + tag = finalAttrs.version; hash = "sha256-Oe/9/zKOoCLK3JHMacOhk2+d91MrhzkBTW3POoFm71M="; }; @@ -51,8 +51,8 @@ buildPythonPackage rec { meta = { description = "Collection of Faraday agent parameters types"; homepage = "https://github.com/infobyte/faraday_agent_parameters_types"; - changelog = "https://github.com/infobyte/faraday_agent_parameters_types/blob/${version}/CHANGELOG.md"; + changelog = "https://github.com/infobyte/faraday_agent_parameters_types/blob/${finalAttrs.version}/CHANGELOG.md"; license = lib.licenses.gpl3Plus; maintainers = with lib.maintainers; [ fab ]; }; -} +}) From 152025cb3f15c85cbe58f65686670b87a88c8341 Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 12 Mar 2026 15:18:58 -0700 Subject: [PATCH 053/121] python3Packages.faraday-agent-parameters-types: override marshmallow to < 4 --- .../default.nix | 23 +++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/faraday-agent-parameters-types/default.nix b/pkgs/development/python-modules/faraday-agent-parameters-types/default.nix index edd31372b3ec..acfc96d9db60 100644 --- a/pkgs/development/python-modules/faraday-agent-parameters-types/default.nix +++ b/pkgs/development/python-modules/faraday-agent-parameters-types/default.nix @@ -2,13 +2,32 @@ lib, buildPythonPackage, fetchFromGitHub, - marshmallow, + flit-core, packaging, pytestCheckHook, setuptools, validators, }: +let + marshmallow' = buildPythonPackage { + pname = "marshmallow"; + version = "3.26.2"; + pyproject = true; + src = fetchFromGitHub { + owner = "marshmallow-code"; + repo = "marshmallow"; + tag = "3.26.2"; + hash = "sha256-ioe+aZHOW8r3wF3UknbTjAP0dEggd/NL9PTkPVQ46zM="; + }; + + build-system = [ flit-core ]; + + doCheck = false; + + pythonImportsCheck = [ "marshmallow" ]; + }; +in buildPythonPackage (finalAttrs: { pname = "faraday-agent-parameters-types"; version = "1.9.1"; @@ -31,7 +50,7 @@ buildPythonPackage (finalAttrs: { build-system = [ setuptools ]; dependencies = [ - marshmallow + marshmallow' packaging validators ]; From a6808eb627c68209b5977e9945b5f53d1e47f02f Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Thu, 12 Mar 2026 15:55:35 -0700 Subject: [PATCH 054/121] faraday-agent-dispatcher: 3.4.2 -> 3.9.1 --- .../fa/faraday-agent-dispatcher/package.nix | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/fa/faraday-agent-dispatcher/package.nix b/pkgs/by-name/fa/faraday-agent-dispatcher/package.nix index 08d8bf24d643..b371db2fd199 100644 --- a/pkgs/by-name/fa/faraday-agent-dispatcher/package.nix +++ b/pkgs/by-name/fa/faraday-agent-dispatcher/package.nix @@ -6,29 +6,36 @@ python3.pkgs.buildPythonApplication (finalAttrs: { pname = "faraday-agent-dispatcher"; - version = "3.4.2"; + version = "3.9.1"; pyproject = true; src = fetchFromGitHub { owner = "infobyte"; repo = "faraday_agent_dispatcher"; tag = finalAttrs.version; - hash = "sha256-Qr3ZGU4y7f6yHD78ecdv7a6IBFDpT+/4Yez0n/MenN0="; + hash = "sha256-uf1oXE8pFvIPTDgcHXRbZDz8NZn9NecPe1eYuYhb1Xw="; }; postPatch = '' substituteInPlace setup.py \ - --replace-fail '"pytest-runner",' "" - ''; + --replace-fail '"pytest-runner",' "" ''; pythonRelaxDeps = [ "python-socketio" ]; + pythonRemoveDeps = [ + "python-owasp-zap-v2.4" + ]; + build-system = with python3.pkgs; [ setuptools-scm ]; + nativeBuildInputs = [ + python3.pkgs.python-owasp-zap-v2-4 + ]; + dependencies = with python3.pkgs; [ aiohttp click @@ -42,6 +49,7 @@ python3.pkgs.buildPythonApplication (finalAttrs: { python-socketio pyyaml requests + requests-ratelimiter syslog-rfc5424-formatter websockets ]; From d135956bb94089dc596b70b440df0ef968f6930d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Fri, 20 Mar 2026 17:39:35 +0000 Subject: [PATCH 055/121] tigerbeetle: 0.16.76 -> 0.16.77 --- pkgs/by-name/ti/tigerbeetle/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ti/tigerbeetle/package.nix b/pkgs/by-name/ti/tigerbeetle/package.nix index 2a497759271e..df1ed45c99cf 100644 --- a/pkgs/by-name/ti/tigerbeetle/package.nix +++ b/pkgs/by-name/ti/tigerbeetle/package.nix @@ -10,14 +10,14 @@ let platform = if stdenvNoCC.hostPlatform.isDarwin then "universal-macos" else stdenvNoCC.hostPlatform.system; hash = builtins.getAttr platform { - "universal-macos" = "sha256-yUiw0y2unr65LUkin0NvdzjCer5YilmRPCmpdoLqWlU="; - "x86_64-linux" = "sha256-GgmjNac0Y+8z45+6er8UvmZ74I0i92Yamkei0D66q+k="; - "aarch64-linux" = "sha256-zh0qTdvifjjCSyIyIUYrqE6RZ23sln0AZAC2Te1ZWRY="; + "universal-macos" = "sha256-ByZdWkpVsrwbgC43WgDGMvw53IVX4y+dOeZweqavVmY="; + "x86_64-linux" = "sha256-zwsoyTbSt2bVZ/Qquu60dnqUzzW81fV8NuOfZB4o4/I="; + "aarch64-linux" = "sha256-/2LjENxaD4iJUCaCRKpMl22WO1KMtLHP181yZCK8fqA="; }; in stdenvNoCC.mkDerivation (finalAttrs: { pname = "tigerbeetle"; - version = "0.16.76"; + version = "0.16.77"; src = fetchzip { url = "https://github.com/tigerbeetle/tigerbeetle/releases/download/${finalAttrs.version}/tigerbeetle-${platform}.zip"; From 9be7c716f8e47b06662b9c1dfe59bc5b70354a19 Mon Sep 17 00:00:00 2001 From: superherointj Date: Fri, 20 Mar 2026 15:19:54 -0300 Subject: [PATCH 056/121] openspec: init at 1.2.0 https://github.com/Fission-AI/OpenSpec/releases/tag/v1.2.0 --- pkgs/by-name/op/openspec/package.nix | 81 ++++++++++++++++++++++++++++ 1 file changed, 81 insertions(+) create mode 100644 pkgs/by-name/op/openspec/package.nix diff --git a/pkgs/by-name/op/openspec/package.nix b/pkgs/by-name/op/openspec/package.nix new file mode 100644 index 000000000000..d4fed3d13cb9 --- /dev/null +++ b/pkgs/by-name/op/openspec/package.nix @@ -0,0 +1,81 @@ +{ + lib, + stdenvNoCC, + fetchFromGitHub, + nodejs_20, + pnpm_9, + fetchPnpmDeps, + pnpmConfigHook, + makeWrapper, + installShellFiles, + nix-update-script, +}: + +stdenvNoCC.mkDerivation (finalAttrs: { + pname = "openspec"; + version = "1.2.0"; + + src = fetchFromGitHub { + owner = "Fission-AI"; + repo = "OpenSpec"; + tag = "v${finalAttrs.version}"; + hash = "sha256-DIMMOEVQ2FQj48WAF4S1IhxX5ChrFZll51CZ3bZNGHE="; + }; + + pnpmDeps = fetchPnpmDeps { + inherit (finalAttrs) pname version src; + pnpm = pnpm_9; + fetcherVersion = 3; + hash = "sha256-9s2kdvd7svK4hofnD66HkDc86WTQeayfF5y7L2dmjNg="; + }; + + nativeBuildInputs = [ + nodejs_20 + pnpmConfigHook + pnpm_9 + makeWrapper + installShellFiles + ]; + + buildPhase = '' + runHook preBuild + + pnpm run build + + runHook postBuild + ''; + + installPhase = '' + runHook preInstall + + mkdir -p $out/bin $out/lib/openspec + + substituteInPlace bin/openspec.js \ + --replace '#!/usr/bin/env node' '#!${nodejs_20}/bin/node' \ + --replace "../dist" "$out/lib/openspec/dist" + install -Dm755 bin/openspec.js $out/bin/openspec + + cp -r dist $out/lib/openspec/ + cp -r schemas $out/lib/openspec/ + cp package.json $out/lib/openspec/ + cp -r node_modules $out/lib/openspec/ + + runHook postInstall + ''; + + postInstall = lib.optionalString (stdenvNoCC.buildPlatform.canExecute stdenvNoCC.hostPlatform) '' + installShellCompletion --cmd openspec \ + --bash <($out/bin/openspec completion generate bash) \ + --fish <($out/bin/openspec completion generate fish) \ + --zsh <($out/bin/openspec completion generate zsh) + ''; + + meta = { + description = "AI-native system for spec-driven development"; + homepage = "https://github.com/Fission-AI/OpenSpec"; + license = lib.licenses.mit; + maintainers = [ ]; + platforms = lib.platforms.all; + mainProgram = "openspec"; + }; +}) From cbc94a732643a7d04e57e020f01df0bea632f01a Mon Sep 17 00:00:00 2001 From: superherointj Date: Fri, 20 Mar 2026 15:20:06 -0300 Subject: [PATCH 057/121] openspec: add superherointj as maintainer --- pkgs/by-name/op/openspec/package.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/by-name/op/openspec/package.nix b/pkgs/by-name/op/openspec/package.nix index d4fed3d13cb9..e72807f2b4c7 100644 --- a/pkgs/by-name/op/openspec/package.nix +++ b/pkgs/by-name/op/openspec/package.nix @@ -74,7 +74,7 @@ stdenvNoCC.mkDerivation (finalAttrs: { description = "AI-native system for spec-driven development"; homepage = "https://github.com/Fission-AI/OpenSpec"; license = lib.licenses.mit; - maintainers = [ ]; + maintainers = with lib.maintainers; [ superherointj ]; platforms = lib.platforms.all; mainProgram = "openspec"; }; From 18a45284a2bd7fb0ac6188b8433a6c2420ee2ba6 Mon Sep 17 00:00:00 2001 From: Nico Felbinger Date: Wed, 19 Feb 2025 18:28:37 +0100 Subject: [PATCH 058/121] nixos/profiles: remove hardened MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - It lacks a consistent and transparent baseline or standard, - It may introduce unexpected breakage or degrade performance without clear benefit, - It is difficult to manage user expectations, especially since the implications of enabling it are not always obvious, - and as multiple contributors have noted, it is often more of a “grab bag” of settings than a cohesive security policy. --- .../manual/configuration/profiles.chapter.md | 1 - .../profiles/hardened.section.md | 20 --- nixos/doc/manual/redirects.json | 3 +- .../manual/release-notes/rl-2605.section.md | 6 + nixos/modules/profiles/hardened.nix | 141 +----------------- nixos/tests/all-tests.nix | 1 - nixos/tests/hardened.nix | 113 -------------- .../linux/kernel/hardened/config.nix | 2 - 8 files changed, 16 insertions(+), 271 deletions(-) delete mode 100644 nixos/doc/manual/configuration/profiles/hardened.section.md delete mode 100644 nixos/tests/hardened.nix diff --git a/nixos/doc/manual/configuration/profiles.chapter.md b/nixos/doc/manual/configuration/profiles.chapter.md index b9131978947b..dda65add46d9 100644 --- a/nixos/doc/manual/configuration/profiles.chapter.md +++ b/nixos/doc/manual/configuration/profiles.chapter.md @@ -24,7 +24,6 @@ profiles/clone-config.section.md profiles/demo.section.md profiles/docker-container.section.md profiles/graphical.section.md -profiles/hardened.section.md profiles/headless.section.md profiles/installation-device.section.md profiles/perlless.section.md diff --git a/nixos/doc/manual/configuration/profiles/hardened.section.md b/nixos/doc/manual/configuration/profiles/hardened.section.md deleted file mode 100644 index 2e9bb196c054..000000000000 --- a/nixos/doc/manual/configuration/profiles/hardened.section.md +++ /dev/null @@ -1,20 +0,0 @@ -# Hardened {#sec-profile-hardened} - -A profile with most (vanilla) hardening options enabled by default, -potentially at the cost of stability, features and performance. - -This includes a hardened kernel, and limiting the system information -available to processes through the `/sys` and -`/proc` filesystems. It also disables the User Namespaces -feature of the kernel, which stops Nix from being able to build anything -(this particular setting can be overridden via -[](#opt-security.allowUserNamespaces)). See the -[profile source](https://github.com/nixos/nixpkgs/tree/master/nixos/modules/profiles/hardened.nix) -for further detail on which settings are altered. - -::: {.warning} -This profile enables options that are known to affect system -stability. If you experience any stability issues when using the -profile, try disabling it. If you report an issue and use this -profile, always mention that you do. -::: diff --git a/nixos/doc/manual/redirects.json b/nixos/doc/manual/redirects.json index be546b0ce617..b9ba2467d078 100644 --- a/nixos/doc/manual/redirects.json +++ b/nixos/doc/manual/redirects.json @@ -1680,7 +1680,8 @@ "sec-profile-graphical": [ "index.html#sec-profile-graphical" ], - "sec-profile-hardened": [ + "sec-release-26.05-incompatibilities-profiles-hardened-removed": [ + "release-notes.html#sec-release-26.05-incompatibilities-profiles-hardened-removed", "index.html#sec-profile-hardened" ], "sec-profile-headless": [ diff --git a/nixos/doc/manual/release-notes/rl-2605.section.md b/nixos/doc/manual/release-notes/rl-2605.section.md index 957f80a7d12b..9f8c14b0940a 100644 --- a/nixos/doc/manual/release-notes/rl-2605.section.md +++ b/nixos/doc/manual/release-notes/rl-2605.section.md @@ -86,6 +86,12 @@ - `opentrack`, `slushload`, `synthesia`, `vtfedit`, `winbox`, `wineasio`, and `yabridge` use wineWow64Packages instead of wineWowPackages as wine versions >= 11.0 have deprecated wineWowPackages. As such, the prefixes for these packages are NOT backwards compatible and need to be regenerated with potential for data loss. +- []{#sec-release-26.05-incompatibilities-profiles-hardened-removed} `profiles/hardened` has been removed, because: + - It lacks a consistent and transparent baseline or standard, + - It may introduce unexpected breakage or degrade performance without clear benefit, + - It is difficult to manage user expectations, especially since the implications of enabling it are not always obvious, + - and as multiple contributors have noted, it is often more of a “grab bag” of settings than a cohesive security policy. + - `services.crabfit` was removed because its upstream packages are unmaintained and insecure. - `sing-box` has been updated to 1.13.0, which has removed some deprecated options. See [upstream documentation](https://sing-box.sagernet.org/configuration/) for details and migration options. diff --git a/nixos/modules/profiles/hardened.nix b/nixos/modules/profiles/hardened.nix index 8a7e98781717..070fac9a3465 100644 --- a/nixos/modules/profiles/hardened.nix +++ b/nixos/modules/profiles/hardened.nix @@ -1,136 +1,11 @@ -# A profile with most (vanilla) hardening options enabled by default, -# potentially at the cost of stability, features and performance. -# -# This profile enables options that are known to affect system -# stability. If you experience any stability issues when using the -# profile, try disabling it. If you report an issue and use this -# profile, always mention that you do. +# This profile included most standard hardening options enabled by default, +# which may have impacted system stability, feature availability, and performance. +{ lib, ... }: { - config, - lib, - pkgs, - ... -}: -let - inherit (lib) - mkDefault - mkOverride - mkEnableOption - mkIf - maintainers - ; -in -{ - options.profiles.hardened = mkEnableOption "hardened" // { - default = true; - example = false; - }; - config = mkIf config.profiles.hardened { - meta = { - maintainers = [ - maintainers.emily - ]; - }; - - boot.kernelPackages = mkDefault pkgs.linuxKernel.packages.linux_hardened; - - nix.settings.allowed-users = mkDefault [ "@users" ]; - - environment.memoryAllocator.provider = mkDefault "scudo"; - environment.variables.SCUDO_OPTIONS = mkDefault "zero_contents=true"; - - security.lockKernelModules = mkDefault true; - - security.protectKernelImage = mkDefault true; - - security.allowSimultaneousMultithreading = mkDefault false; - - security.forcePageTableIsolation = mkDefault true; - - # This is required by podman to run containers in rootless mode. - security.unprivilegedUsernsClone = mkDefault config.virtualisation.containers.enable; - - security.virtualisation.flushL1DataCache = mkDefault "always"; - - security.apparmor.enable = mkDefault true; - security.apparmor.killUnconfinedConfinables = mkDefault true; - - boot.kernelParams = [ - # Don't merge slabs - "slab_nomerge" - - # Overwrite free'd pages - "page_poison=1" - - # Enable page allocator randomization - "page_alloc.shuffle=1" - - # Disable debugfs - "debugfs=off" - ]; - - boot.blacklistedKernelModules = [ - # Obscure network protocols - "ax25" - "netrom" - "rose" - - # Old or rare or insufficiently audited filesystems - "adfs" - "affs" - "bfs" - "befs" - "cramfs" - "efs" - "erofs" - "exofs" - "freevxfs" - "f2fs" - "hfs" - "hpfs" - "jfs" - "minix" - "nilfs2" - "ntfs" - "omfs" - "qnx4" - "qnx6" - "sysv" - "ufs" - ]; - - # Hide kptrs even for processes with CAP_SYSLOG - boot.kernel.sysctl."kernel.kptr_restrict" = mkOverride 500 2; - - # Disable bpf() JIT (to eliminate spray attacks) - boot.kernel.sysctl."net.core.bpf_jit_enable" = mkDefault false; - - # Disable ftrace debugging - boot.kernel.sysctl."kernel.ftrace_enabled" = mkDefault false; - - # Enable strict reverse path filtering (that is, do not attempt to route - # packets that "obviously" do not belong to the iface's network; dropped - # packets are logged as martians). - boot.kernel.sysctl."net.ipv4.conf.all.log_martians" = mkDefault true; - boot.kernel.sysctl."net.ipv4.conf.all.rp_filter" = mkDefault "1"; - boot.kernel.sysctl."net.ipv4.conf.default.log_martians" = mkDefault true; - boot.kernel.sysctl."net.ipv4.conf.default.rp_filter" = mkDefault "1"; - - # Ignore broadcast ICMP (mitigate SMURF) - boot.kernel.sysctl."net.ipv4.icmp_echo_ignore_broadcasts" = mkDefault true; - - # Ignore incoming ICMP redirects (note: default is needed to ensure that the - # setting is applied to interfaces added after the sysctls are set) - boot.kernel.sysctl."net.ipv4.conf.all.accept_redirects" = mkDefault false; - boot.kernel.sysctl."net.ipv4.conf.all.secure_redirects" = mkDefault false; - boot.kernel.sysctl."net.ipv4.conf.default.accept_redirects" = mkDefault false; - boot.kernel.sysctl."net.ipv4.conf.default.secure_redirects" = mkDefault false; - boot.kernel.sysctl."net.ipv6.conf.all.accept_redirects" = mkDefault false; - boot.kernel.sysctl."net.ipv6.conf.default.accept_redirects" = mkDefault false; - - # Ignore outgoing ICMP redirects (this is ipv4 only) - boot.kernel.sysctl."net.ipv4.conf.all.send_redirects" = mkDefault false; - boot.kernel.sysctl."net.ipv4.conf.default.send_redirects" = mkDefault false; - }; + imports = [ + (lib.mkRemovedOptionModule [ "profiles" "hardened" ] '' + The hardened profile has been removed, see the backward incompatibilities section of the 26.05 release notes for more information. + '') + ]; } diff --git a/nixos/tests/all-tests.nix b/nixos/tests/all-tests.nix index de66d01e1c09..055e2dd8fc54 100644 --- a/nixos/tests/all-tests.nix +++ b/nixos/tests/all-tests.nix @@ -717,7 +717,6 @@ in package = pkgs.hadoop_3_3; }; haproxy = runTest ./haproxy.nix; - hardened = runTest ./hardened.nix; harmonia = runTest ./harmonia.nix; haste-server = runTest ./haste-server.nix; hbase2 = runTest { diff --git a/nixos/tests/hardened.nix b/nixos/tests/hardened.nix deleted file mode 100644 index ac0cedc98dd2..000000000000 --- a/nixos/tests/hardened.nix +++ /dev/null @@ -1,113 +0,0 @@ -{ pkgs, ... }: -{ - name = "hardened"; - meta = { - maintainers = [ ]; - }; - - nodes.machine = - { - lib, - pkgs, - config, - ... - }: - { - users.users.alice = { - isNormalUser = true; - extraGroups = [ "proc" ]; - }; - users.users.sybil = { - isNormalUser = true; - group = "wheel"; - }; - imports = [ ../modules/profiles/hardened.nix ]; - environment.memoryAllocator.provider = "graphene-hardened"; - nix.settings.sandbox = false; - virtualisation.emptyDiskImages = [ - { - size = 4096; - driveConfig.deviceExtraOpts.serial = "deferred"; - } - ]; - virtualisation.fileSystems = { - "/deferred" = { - device = "/dev/disk/by-id/virtio-deferred"; - fsType = "vfat"; - autoFormat = true; - options = [ "noauto" ]; - }; - }; - boot.extraModulePackages = pkgs.lib.optional (pkgs.lib.versionOlder config.boot.kernelPackages.kernel.version "5.6") config.boot.kernelPackages.wireguard; - boot.kernelModules = [ "wireguard" ]; - }; - - testScript = - let - hardened-malloc-tests = pkgs.graphene-hardened-malloc.ld-preload-tests; - in - '' - machine.wait_for_unit("multi-user.target") - - - with subtest("AppArmor profiles are loaded"): - machine.succeed("systemctl status apparmor.service") - - - # AppArmor securityfs - with subtest("AppArmor securityfs is mounted"): - machine.succeed("mountpoint -q /sys/kernel/security") - machine.succeed("cat /sys/kernel/security/apparmor/profiles") - - - # Test loading out-of-tree modules - with subtest("Out-of-tree modules can be loaded"): - machine.succeed("grep -Fq wireguard /proc/modules") - - - # Test kernel module hardening - with subtest("No more kernel modules can be loaded"): - # note: this better a be module we normally wouldn't load ... - machine.wait_for_unit("disable-kernel-module-loading.service") - machine.fail("modprobe dccp") - - - # Test userns - with subtest("User namespaces are restricted"): - machine.succeed("unshare --user true") - machine.fail("su -l alice -c 'unshare --user true'") - - - # Test dmesg restriction - with subtest("Regular users cannot access dmesg"): - machine.fail("su -l alice -c dmesg") - - - # Test access to kcore - with subtest("Kcore is inaccessible as root"): - machine.fail("cat /proc/kcore") - - - # Test deferred mount - with subtest("Deferred mounts work"): - machine.fail("mountpoint -q /deferred") # was deferred - machine.systemctl("start deferred.mount") - machine.succeed("mountpoint -q /deferred") # now mounted - - - # Test Nix dæmon usage - with subtest("nix-daemon cannot be used by all users"): - machine.fail("su -l nobody -s /bin/sh -c 'nix --extra-experimental-features nix-command ping-store'") - machine.succeed("su -l alice -c 'nix --extra-experimental-features nix-command ping-store'") - - - # Test kernel image protection - with subtest("The kernel image is protected"): - machine.fail("systemctl hibernate") - machine.fail("systemctl kexec") - - - with subtest("The hardened memory allocator works"): - machine.succeed("${hardened-malloc-tests}/bin/run-tests") - ''; -} diff --git a/pkgs/os-specific/linux/kernel/hardened/config.nix b/pkgs/os-specific/linux/kernel/hardened/config.nix index beebef90db38..dacbf3bc9ab9 100644 --- a/pkgs/os-specific/linux/kernel/hardened/config.nix +++ b/pkgs/os-specific/linux/kernel/hardened/config.nix @@ -6,8 +6,6 @@ # boot via sysctl or kernel cmdline are left enabled here, for improved # flexibility. # -# See also - { stdenv, lib, From adacb7ffa51295851f894084e792233cc0255c66 Mon Sep 17 00:00:00 2001 From: Austin Horstman Date: Fri, 20 Mar 2026 19:13:07 -0500 Subject: [PATCH 059/121] wttrbar: 0.14.3 -> 0.14.4 Changelog: https://github.com/bjesus/wttrbar/releases/tag/0.14.4 Signed-off-by: Austin Horstman --- pkgs/by-name/wt/wttrbar/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/wt/wttrbar/package.nix b/pkgs/by-name/wt/wttrbar/package.nix index 5d0bdad80a9d..5160243012a1 100644 --- a/pkgs/by-name/wt/wttrbar/package.nix +++ b/pkgs/by-name/wt/wttrbar/package.nix @@ -9,16 +9,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "wttrbar"; - version = "0.14.3"; + version = "0.14.4"; src = fetchFromGitHub { owner = "bjesus"; repo = "wttrbar"; tag = finalAttrs.version; - hash = "sha256-MNELUtk3pXw0vcA8I1zUXl6BhojEcIoOUX4G2d4QIMI="; + hash = "sha256-pQIUliT9RktaC7E+r7Im6bJv6LxCH6wNLo1Nlz4Oeyc="; }; - cargoHash = "sha256-V+XsePgv6Ss6TC/Ej2hQkfj7hdjTNV0V4QNynMRZ24I="; + cargoHash = "sha256-T+IWMqe+AZmYhXf9bhpTdCGkg25fcUjQazQhs9fH5Vw="; nativeBuildInputs = [ pkg-config ]; buildInputs = [ openssl ]; From 3b3f71dd95e0b9b5cf26f66cb2f09319a3594bb0 Mon Sep 17 00:00:00 2001 From: 2kybe3 Date: Sat, 21 Mar 2026 13:52:13 +0100 Subject: [PATCH 060/121] paperless-ngx: 2.20.11 -> 2.20.13 --- pkgs/by-name/pa/paperless-ngx/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pa/paperless-ngx/package.nix b/pkgs/by-name/pa/paperless-ngx/package.nix index 9b92b50eb7d7..1212cd2f8271 100644 --- a/pkgs/by-name/pa/paperless-ngx/package.nix +++ b/pkgs/by-name/pa/paperless-ngx/package.nix @@ -29,13 +29,13 @@ lndir, }: let - version = "2.20.11"; + version = "2.20.13"; src = fetchFromGitHub { owner = "paperless-ngx"; repo = "paperless-ngx"; tag = "v${version}"; - hash = "sha256-Bn5k6h80nSNxWYsIpqVLXp+udzxDCY8f/jbgDvyATM0="; + hash = "sha256-Oh0iFcGWsiPe7xCHw1+9z3BuWikEshVDLWeBPHrEJA0="; }; python = python3.override { From 552c8cbd2ebf9fa9a39477ab924c00a27bae817b Mon Sep 17 00:00:00 2001 From: Keenan Weaver Date: Thu, 26 Feb 2026 16:43:48 -0600 Subject: [PATCH 061/121] soundfont-generaluser: move & rename --- .../package.nix | 2 +- pkgs/top-level/aliases.nix | 1 + 2 files changed, 2 insertions(+), 1 deletion(-) rename pkgs/by-name/so/{soundfont-generaluser => soundfont-generaluser-gs}/package.nix (95%) diff --git a/pkgs/by-name/so/soundfont-generaluser/package.nix b/pkgs/by-name/so/soundfont-generaluser-gs/package.nix similarity index 95% rename from pkgs/by-name/so/soundfont-generaluser/package.nix rename to pkgs/by-name/so/soundfont-generaluser-gs/package.nix index 72be24893163..dc4ee29d3737 100644 --- a/pkgs/by-name/so/soundfont-generaluser/package.nix +++ b/pkgs/by-name/so/soundfont-generaluser-gs/package.nix @@ -5,7 +5,7 @@ }: stdenv.mkDerivation (finalAttrs: { - pname = "generaluser"; + pname = "soundfont-generaluser-gs"; version = "2.0.2-unstable-2025-04-21"; src = fetchFromGitHub { diff --git a/pkgs/top-level/aliases.nix b/pkgs/top-level/aliases.nix index a69895799605..311e41351ee7 100644 --- a/pkgs/top-level/aliases.nix +++ b/pkgs/top-level/aliases.nix @@ -1771,6 +1771,7 @@ mapAliases { somatic-sniper = throw "somatic-sniper has been removed as it was archived in 2020 and fails to build."; # Added 2025-10-14 sonusmix = throw "'sonusmix' has been removed due to lack of maintenance"; # Added 2025-08-27 soulseekqt = throw "'soulseekqt' has been removed due to lack of maintenance in Nixpkgs in a long time. Consider using 'nicotine-plus' or 'slskd' instead."; # Added 2025-06-07 + soundfont-generaluser = warnAlias "'soundfont-generaluser' has been renamed to 'soundfont-generaluser-gs'" soundfont-generaluser-gs; # Added 2026-02-26 soundkonverter = throw "'soundkonverter' has been dropped as it depends on KDE Gear 5, and is unmaintained"; # Added 2025-08-20 soundmodem = throw "'soundmodem' was removed due to lack of maintenance and relying on gtk2"; # Added 2025-12-02 soundOfSorting = throw "'soundOfSorting' has been renamed to/replaced by 'sound-of-sorting'"; # Converted to throw 2025-10-27 From a823a90d7a709deae8218baadb2a59fcd14492a8 Mon Sep 17 00:00:00 2001 From: Keenan Weaver Date: Thu, 26 Feb 2026 16:47:41 -0600 Subject: [PATCH 062/121] soundfont-generaluser-gs: modernize --- pkgs/by-name/so/soundfont-generaluser-gs/package.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/so/soundfont-generaluser-gs/package.nix b/pkgs/by-name/so/soundfont-generaluser-gs/package.nix index dc4ee29d3737..3765d153f06e 100644 --- a/pkgs/by-name/so/soundfont-generaluser-gs/package.nix +++ b/pkgs/by-name/so/soundfont-generaluser-gs/package.nix @@ -1,10 +1,10 @@ { lib, - stdenv, + stdenvNoCC, fetchFromGitHub, }: -stdenv.mkDerivation (finalAttrs: { +stdenvNoCC.mkDerivation (finalAttrs: { pname = "soundfont-generaluser-gs"; version = "2.0.2-unstable-2025-04-21"; @@ -17,11 +17,14 @@ stdenv.mkDerivation (finalAttrs: { installPhase = '' runHook preInstall - install -Dm644 $src/GeneralUser-GS.sf2 $out/share/soundfonts/GeneralUser-GS.sf2 + + install -Dm444 GeneralUser-GS.sf2 $out/share/soundfonts/GeneralUser-GS.sf2 + runHook postInstall ''; meta = { + changelog = "https://github.com/mrbumpy409/GeneralUser-GS/blob/main/documentation/CHANGELOG.md"; description = "General MIDI SoundFont with a low memory footprint"; homepage = "https://www.schristiancollins.com/generaluser.php"; license = lib.licenses.generaluser; From 64ba4f64c79d4c80385ff5a91a90dfc9a0032071 Mon Sep 17 00:00:00 2001 From: Keenan Weaver Date: Thu, 26 Feb 2026 16:48:24 -0600 Subject: [PATCH 063/121] soundfont-generaluser-gs: 2.0.2-unstable-2025-04-21 -> 2.0.3 --- pkgs/by-name/so/soundfont-generaluser-gs/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/so/soundfont-generaluser-gs/package.nix b/pkgs/by-name/so/soundfont-generaluser-gs/package.nix index 3765d153f06e..5145b1ebefa1 100644 --- a/pkgs/by-name/so/soundfont-generaluser-gs/package.nix +++ b/pkgs/by-name/so/soundfont-generaluser-gs/package.nix @@ -6,13 +6,13 @@ stdenvNoCC.mkDerivation (finalAttrs: { pname = "soundfont-generaluser-gs"; - version = "2.0.2-unstable-2025-04-21"; + version = "2.0.3"; src = fetchFromGitHub { owner = "mrbumpy409"; repo = "GeneralUser-GS"; - rev = "74d4cfe4042a61ddab17d4f86dbccd9d2570eb2a"; - hash = "sha256-I27l8F/BFAo6YSNbtAV14AKVsPIJTHFG2eGudseWmjo="; + rev = "6f2014e815237de02e26e793f8c66c796ba66db5"; + hash = "sha256-/nWcvaAcXDSd/6HapDEa7rDmQD2Q1w6iYsbckh2vnek="; }; installPhase = '' From 8572d7013f42b93322d8f7cb09efc1496307bc9b Mon Sep 17 00:00:00 2001 From: Nikolay Korotkiy Date: Wed, 18 Mar 2026 22:33:21 +0400 Subject: [PATCH 064/121] =?UTF-8?q?lagrange:=201.19.4=20=E2=86=92=201.20.2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- pkgs/by-name/la/lagrange/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/la/lagrange/package.nix b/pkgs/by-name/la/lagrange/package.nix index 6e56d69abb23..0ce3f53e2bba 100644 --- a/pkgs/by-name/la/lagrange/package.nix +++ b/pkgs/by-name/la/lagrange/package.nix @@ -22,13 +22,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "lagrange"; - version = "1.19.4"; + version = "1.20.2"; src = fetchFromGitHub { owner = "skyjake"; repo = "lagrange"; tag = "v${finalAttrs.version}"; - hash = "sha256-o8BDreuQbPrGuSV7k4OVy4XmMSSEXrdNzEzUXM6hMyA="; + hash = "sha256-Rin9frCxY7vMJQbErtR7pXss2GciL4LbXg+BFHFNjn4="; }; nativeBuildInputs = [ From 378053cf661c14d44b72384f59be0470d81637fe Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 21 Mar 2026 17:21:00 -0700 Subject: [PATCH 065/121] python3Packages.ocrmypdf: 17.3.0 -> 17.4.0 Diff: https://github.com/ocrmypdf/OCRmyPDF/compare/v17.3.0...v17.4.0 Changelog: https://github.com/ocrmypdf/OCRmyPDF/blob/v17.4.0/docs/releasenotes/version17.md --- pkgs/development/python-modules/ocrmypdf/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/ocrmypdf/default.nix b/pkgs/development/python-modules/ocrmypdf/default.nix index 9daae19eef05..1f807896dfaf 100644 --- a/pkgs/development/python-modules/ocrmypdf/default.nix +++ b/pkgs/development/python-modules/ocrmypdf/default.nix @@ -32,7 +32,7 @@ buildPythonPackage rec { pname = "ocrmypdf"; - version = "17.3.0"; + version = "17.4.0"; pyproject = true; src = fetchFromGitHub { @@ -45,7 +45,7 @@ buildPythonPackage rec { postFetch = '' rm "$out/.git_archival.txt" ''; - hash = "sha256-/R/W8TMBaFBTjPiOIroZ1CNQAKMTLJH+cQvY2177e0U="; + hash = "sha256-Dn6WQg7y6IbS5MUwyjofDmlJd0MH9US0mcL/B7UE9f0="; }; patches = [ @@ -107,7 +107,7 @@ buildPythonPackage rec { maintainers = with lib.maintainers; [ dotlambda ]; - changelog = "https://github.com/ocrmypdf/OCRmyPDF/blob/${src.tag}/docs/release_notes.md"; + changelog = "https://github.com/ocrmypdf/OCRmyPDF/blob/${src.tag}/docs/releasenotes/version17.md"; mainProgram = "ocrmypdf"; }; } From 216bb3f12a0235c264a389aa8d0b3c8f50f6d1bb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sat, 21 Mar 2026 17:25:06 -0700 Subject: [PATCH 066/121] getmail6: 6.19.10 -> 6.19.12 Diff: https://github.com/getmail6/getmail6/compare/v6.19.10...v6.19.12 Changelog: https://github.com/getmail6/getmail6/blob/v6.19.12/docs/CHANGELOG --- pkgs/by-name/ge/getmail6/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/ge/getmail6/package.nix b/pkgs/by-name/ge/getmail6/package.nix index 819c47b65a65..a15b28d8faef 100644 --- a/pkgs/by-name/ge/getmail6/package.nix +++ b/pkgs/by-name/ge/getmail6/package.nix @@ -6,14 +6,14 @@ python3.pkgs.buildPythonApplication (finalAttrs: { pname = "getmail6"; - version = "6.19.10"; + version = "6.19.12"; pyproject = true; src = fetchFromGitHub { owner = "getmail6"; repo = "getmail6"; tag = "v${finalAttrs.version}"; - hash = "sha256-W9B6+riHsE5Hu2J8QnhPKhpRlXsQyg3ThP4ADp/0UhI="; + hash = "sha256-E+S6p12eqVDkzTv6RdeBpUJqPd4a4LMVoGaYOr2XKVo="; }; build-system = with python3.pkgs; [ From bf259ea370b19600ef0b361c4af58cc829abf1c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Stanis=C5=82aw=20Pitucha?= Date: Sat, 21 Mar 2026 10:49:41 +1100 Subject: [PATCH 067/121] element-desktop: fix darwin build --- pkgs/by-name/el/element-desktop/package.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/by-name/el/element-desktop/package.nix b/pkgs/by-name/el/element-desktop/package.nix index 453b13c768f4..d62ac5ad5a1b 100644 --- a/pkgs/by-name/el/element-desktop/package.nix +++ b/pkgs/by-name/el/element-desktop/package.nix @@ -18,6 +18,7 @@ asar, copyDesktopItems, darwin, + actool, }: let @@ -58,6 +59,7 @@ stdenv.mkDerivation ( ] ++ lib.optionals stdenv.hostPlatform.isDarwin [ darwin.autoSignDarwinBinariesHook + actool ]; inherit seshat; @@ -163,6 +165,10 @@ stdenv.mkDerivation ( }) ]; + stripDebugList = lib.optionals stdenv.hostPlatform.isDarwin [ + "Applications/Element.app/Contents/MacOS" + ]; + passthru = { # run with: nix-shell ./maintainers/scripts/update.nix --argstr package element-desktop updateScript = ./update.sh; From 6341c769a769973274d883bec03ec3879429163c Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 22 Mar 2026 02:12:12 +0000 Subject: [PATCH 068/121] myks: 5.10.0 -> 5.11.0 --- pkgs/by-name/my/myks/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/my/myks/package.nix b/pkgs/by-name/my/myks/package.nix index b7705c3d5ca1..11e039d77695 100644 --- a/pkgs/by-name/my/myks/package.nix +++ b/pkgs/by-name/my/myks/package.nix @@ -10,16 +10,16 @@ buildGoModule (finalAttrs: { pname = "myks"; - version = "5.10.0"; + version = "5.11.0"; src = fetchFromGitHub { owner = "mykso"; repo = "myks"; tag = "v${finalAttrs.version}"; - hash = "sha256-9Fw3q2/mard/dbbnz6GzQeiroTlkiRwdwvC7aBh5HXA="; + hash = "sha256-5uQiTv+UxCPCetkXvG8fBHL+WsUatNJKv2AUbnqE/Do="; }; - vendorHash = "sha256-XMGcLYMZiCB98U5+aB/O4f5knAp46UkrH4teCPZk/bM="; + vendorHash = "sha256-z1vUeKf22MjGwheDSu/jYCKpJRclrhgKOEN8A9onrAM="; subPackages = "."; From 4bf9a3d67425694c5ee15b7099cd19ae306edc9b Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 22 Mar 2026 07:27:19 +0000 Subject: [PATCH 069/121] heatseeker: 1.10.0 -> 1.10.1 --- pkgs/by-name/he/heatseeker/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/he/heatseeker/package.nix b/pkgs/by-name/he/heatseeker/package.nix index efdc9006fcbe..f783bece4547 100644 --- a/pkgs/by-name/he/heatseeker/package.nix +++ b/pkgs/by-name/he/heatseeker/package.nix @@ -7,16 +7,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "heatseeker"; - version = "1.10.0"; + version = "1.10.1"; src = fetchFromGitHub { owner = "rschmitt"; repo = "heatseeker"; tag = "v${finalAttrs.version}"; - hash = "sha256-Hfx2QTfSJ6lh/K3ZdJzXqgxGOVbC2i2ZqZKH8Wtj/6k="; + hash = "sha256-yIFMwC7W/vn7HOAJ1+HGFzPq4k+KF7mqua0XZteDBRg="; }; - cargoHash = "sha256-8ZrPHm+W4lxVzupgeLcCQmpNRJS3aEaSWWKPkGVZVTg="; + cargoHash = "sha256-qBTHNArPgf/qrce6hP3GJ1f9NcJ5OmSokCs5IVtyJQQ="; # https://github.com/rschmitt/heatseeker/issues/42 # I've suggested using `/usr/bin/env stty`, but doing that isn't quite as simple From 0983642659d1258292362babde064530f9e71f4d Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Wed, 7 Jan 2026 13:46:41 +0000 Subject: [PATCH 070/121] tkgl: add alejo7797 to maintainers --- pkgs/by-name/tk/tkgl/package.nix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/tk/tkgl/package.nix b/pkgs/by-name/tk/tkgl/package.nix index ba5497bf588e..efdcb54d0c79 100644 --- a/pkgs/by-name/tk/tkgl/package.nix +++ b/pkgs/by-name/tk/tkgl/package.nix @@ -46,6 +46,9 @@ tcl.mkTclDerivation { description = "OpenGL drawing surface for Tk 8 and 9"; homepage = "https://github.com/3-manifolds/TkGL"; license = lib.licenses.tcltk; - maintainers = with lib.maintainers; [ noiioiu ]; + maintainers = with lib.maintainers; [ + noiioiu + alejo7797 + ]; }; } From 889fa3550c869038f5125f694c1858081c57de70 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Tue, 6 Jan 2026 09:03:58 -0500 Subject: [PATCH 071/121] tkgl: 1.2.1-unstable-2025-06-01 -> 1.2.1-unstable-2026-01-07 --- pkgs/by-name/tk/tkgl/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/tk/tkgl/package.nix b/pkgs/by-name/tk/tkgl/package.nix index efdcb54d0c79..915df735331b 100644 --- a/pkgs/by-name/tk/tkgl/package.nix +++ b/pkgs/by-name/tk/tkgl/package.nix @@ -10,13 +10,13 @@ tcl.mkTclDerivation { pname = "tkgl"; - version = "1.2.1-unstable-2025-06-01"; + version = "1.2.1-unstable-2026-01-07"; src = fetchFromGitHub { owner = "3-manifolds"; repo = "TkGL"; - rev = "45bf16e6c28a070c70fc9a0eb8c47a0b6ff8a2e3"; - hash = "sha256-AA5LZGhMTWmTZqI/wtycUYLsUe9BwO3voGMS7vGlCM0="; + rev = "e47636bc56f02ddca503f98abc65e31a0f0f0a7c"; + hash = "sha256-Y5NIKWUjbtVn9qiVzc8TsKCm4M3KbNPiBjVTBWf7ALA="; }; postPatch = lib.optionalString stdenv.hostPlatform.isDarwin '' From 23f098949d8a8a82c0e4e9c9aeeecafca5e25091 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Sun, 11 Jan 2026 10:51:10 +0000 Subject: [PATCH 072/121] python3Packages.tkinter-gl: add setuptools to build-system --- pkgs/development/python-modules/tkinter-gl/default.nix | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/tkinter-gl/default.nix b/pkgs/development/python-modules/tkinter-gl/default.nix index a39a6d940d4d..a93398094380 100644 --- a/pkgs/development/python-modules/tkinter-gl/default.nix +++ b/pkgs/development/python-modules/tkinter-gl/default.nix @@ -1,11 +1,12 @@ { lib, + fetchFromGitHub, python, buildPythonPackage, - fetchFromGitHub, + setuptools, setuptools-scm, - tkinter, tkgl, + tkinter, }: buildPythonPackage rec { @@ -29,7 +30,10 @@ buildPythonPackage rec { "pkg_dir = os.path.join(__path__[0], 'tk')" ''; - build-system = [ setuptools-scm ]; + build-system = [ + setuptools + setuptools-scm + ]; dependencies = [ tkinter ]; From 623dbeed8b8f7fb49778e00d80eded3bbd95eec1 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Mon, 9 Feb 2026 17:05:41 -0500 Subject: [PATCH 073/121] python3Packages.tkinter-gl: add updateScript --- pkgs/development/python-modules/tkinter-gl/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/tkinter-gl/default.nix b/pkgs/development/python-modules/tkinter-gl/default.nix index a93398094380..14bc74925810 100644 --- a/pkgs/development/python-modules/tkinter-gl/default.nix +++ b/pkgs/development/python-modules/tkinter-gl/default.nix @@ -7,6 +7,7 @@ setuptools-scm, tkgl, tkinter, + nix-update-script, }: buildPythonPackage rec { @@ -48,6 +49,13 @@ buildPythonPackage rec { pythonImportsCheck = [ "tkinter_gl" ]; + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "v(.*)_as_released" + ]; + }; + meta = { description = "Base class for GL rendering surfaces in tkinter"; changelog = "https://github.com/3-manifolds/tkinter_gl/releases/tag/${src.tag}"; From 58ee9486422c65ba0ba51743cfce452f4c69d4ac Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Mon, 9 Feb 2026 17:06:11 -0500 Subject: [PATCH 074/121] python3Packages.tkinter-gl: 1.0 -> 1.1 --- pkgs/development/python-modules/tkinter-gl/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/tkinter-gl/default.nix b/pkgs/development/python-modules/tkinter-gl/default.nix index 14bc74925810..8a4787f025fb 100644 --- a/pkgs/development/python-modules/tkinter-gl/default.nix +++ b/pkgs/development/python-modules/tkinter-gl/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "tkinter-gl"; - version = "1.0"; + version = "1.1"; pyproject = true; src = fetchFromGitHub { owner = "3-manifolds"; repo = "tkinter_gl"; tag = "v${version}_as_released"; - hash = "sha256-ObI8EEQ7mAOAuV6f+Ld4HH0xkFzqiAZqHDvzjwPA/wM"; + hash = "sha256-PNxxjyVGoMw4J/SXWvVITuGMq/HypxUwDkSxeFy2Vag="; }; postPatch = '' @@ -27,7 +27,7 @@ buildPythonPackage rec { rm -r src/tkinter_gl/tk # Platform-specific directories are only necessary when using compiled TkGL substituteInPlace src/tkinter_gl/__init__.py \ - --replace-fail "pkg_dir = os.path.join(__path__[0], 'tk', sys.platform,)" \ + --replace-fail "pkg_dir = os.path.join(__path__[0], 'tk', target)" \ "pkg_dir = os.path.join(__path__[0], 'tk')" ''; From 4273fc60d7f5bf1436d8885ff2e88a2b8d8221d5 Mon Sep 17 00:00:00 2001 From: Felix Singer Date: Thu, 19 Mar 2026 17:41:28 +0100 Subject: [PATCH 075/121] nixos/jenkins: Drop default packages from `package` option Not every Jenkins installation needs any package included in PATH. Drop the packages from `services.jenkins.packages` and leave the decision up to the user instead. Add a release note to 26.05 in order to notify users. Signed-off-by: Felix Singer --- doc/release-notes/rl-2605.section.md | 2 ++ .../continuous-integration/jenkins/default.nix | 18 ++++++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/doc/release-notes/rl-2605.section.md b/doc/release-notes/rl-2605.section.md index e582b68084a2..3694c7392df0 100644 --- a/doc/release-notes/rl-2605.section.md +++ b/doc/release-notes/rl-2605.section.md @@ -221,6 +221,8 @@ - `services.taskchampion-sync-server` module have been added an option `services.taskchampion-sync-server.dynamicUser` to use systemd's DynamicUser feature. This is enabled by default when stateVersion is at least 26.05, and disabled otherwise. If you need this feature, you need to set `services.taskchampion-sync-server.dynamicUser` to `true` and migrate `/var/lib/taskchampion-sync-server` to `/var/lib/private/taskchampion-sync-server`. +- The default packages in `services.jenkins.packages` have been dropped, since not every Jenkins installation needs any package at all. It's more reasonable to leave it empty and let users configure what they need. + ## Other Notable Changes {#sec-nixpkgs-release-26.05-notable-changes} diff --git a/nixos/modules/services/continuous-integration/jenkins/default.nix b/nixos/modules/services/continuous-integration/jenkins/default.nix index 15421ef2f532..d4657fcab8aa 100644 --- a/nixos/modules/services/continuous-integration/jenkins/default.nix +++ b/nixos/modules/services/continuous-integration/jenkins/default.nix @@ -86,14 +86,16 @@ in javaPackage = lib.mkPackageOption pkgs "jdk25" { }; packages = lib.mkOption { - default = [ - pkgs.stdenv - pkgs.git - pkgs.jdk25 - config.programs.ssh.package - pkgs.nix - ]; - defaultText = lib.literalExpression "[ pkgs.stdenv pkgs.git pkgs.jdk17 config.programs.ssh.package pkgs.nix ]"; + default = [ ]; + example = lib.literalExpression '' + [ + pkgs.stdenv + pkgs.git + pkgs.jdk25 + config.programs.ssh.package + pkgs.nix + ] + ''; type = lib.types.listOf lib.types.package; description = '' Packages to add to PATH for the jenkins process. From 77ea61a3a5f6fc35f97fa9872cbda562462e6433 Mon Sep 17 00:00:00 2001 From: Tom van Dijk <18gatenmaker6@gmail.com> Date: Sun, 22 Mar 2026 14:34:15 +0100 Subject: [PATCH 076/121] etcd_3_4: 3.4.39 -> 3.4.42 Diff: https://github.com/etcd-io/etcd/compare/v3.4.39...v3.4.42 --- pkgs/by-name/et/etcd_3_4/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/et/etcd_3_4/package.nix b/pkgs/by-name/et/etcd_3_4/package.nix index 9d300f6a94e2..bba5518bc5b1 100644 --- a/pkgs/by-name/et/etcd_3_4/package.nix +++ b/pkgs/by-name/et/etcd_3_4/package.nix @@ -7,17 +7,17 @@ buildGoModule rec { pname = "etcd"; - version = "3.4.39"; + version = "3.4.42"; src = fetchFromGitHub { owner = "etcd-io"; repo = "etcd"; rev = "v${version}"; - hash = "sha256-S1aNEd7pPgSu8vFhXIYFjEvfBG3OtmuKCvD5Zgj0m30="; + hash = "sha256-Ue5Mcksy3LiXLaVdxNz83V9qrxQfzxL5kw4rZobYcvY="; }; proxyVendor = true; - vendorHash = "sha256-CqeSRyWDw1nCKlAI46iJXT5XjI3elxufx87QIlHwp1w="; + vendorHash = "sha256-DqKVZ4Z2RMRwi4Z/6Rh3SE6NSyuHePSYrIM7sPyPC74="; preBuild = '' go mod tidy From 324374f8c06e377c7790fbedd15c09e6a0ea7350 Mon Sep 17 00:00:00 2001 From: Tom van Dijk <18gatenmaker6@gmail.com> Date: Sun, 22 Mar 2026 14:42:27 +0100 Subject: [PATCH 077/121] etcd_3_5: 3.5.27 -> 3.5.28 --- pkgs/by-name/et/etcd_3_5/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/et/etcd_3_5/package.nix b/pkgs/by-name/et/etcd_3_5/package.nix index f7e7021f817e..6378c409d76d 100644 --- a/pkgs/by-name/et/etcd_3_5/package.nix +++ b/pkgs/by-name/et/etcd_3_5/package.nix @@ -8,11 +8,11 @@ }: let - version = "3.5.27"; - etcdSrcHash = "sha256-ne0uKpS7KQL/Efi5sMdnD8PQl5phDivBEM1PrsSxVf4="; - etcdServerVendorHash = "sha256-6vu0ttbes5uN+m/tW/zuPZgyc1z+VcNpoJauykxBUUY="; - etcdUtlVendorHash = "sha256-Z8Rc19p5Sigg71/r9yURE6LNHqHjah3b/ZfxI0nH4qc="; - etcdCtlVendorHash = "sha256-uAo50jN69YKuW3NCRtc9HE8AnqKWtZQ+sJvwgw1BJj0="; + version = "3.5.28"; + etcdSrcHash = "sha256-D4c+YfNQATW8/9m/5edPKtG9qQa8MxpbpDTCZY6cvA4="; + etcdServerVendorHash = "sha256-IiGoG/5HJBZXhWhluK1uQVOXRk2I4VDokT7EcjhEnWU="; + etcdUtlVendorHash = "sha256-mUzwpxAsUhXdK70BwtjWJqjzLpDnNFNXW6tHP81c72w="; + etcdCtlVendorHash = "sha256-Bn3mirDqs9enpNTlp65YWiQRKpc+B6wD33b0xkaqSKE="; src = fetchFromGitHub { owner = "etcd-io"; From 64ed23a321329433db8517efdb61fe4af22be0ad Mon Sep 17 00:00:00 2001 From: Tom van Dijk <18gatenmaker6@gmail.com> Date: Sun, 22 Mar 2026 14:49:11 +0100 Subject: [PATCH 078/121] etcd_3_6: 3.6.8 -> 3.6.9 --- pkgs/by-name/et/etcd_3_6/package.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/et/etcd_3_6/package.nix b/pkgs/by-name/et/etcd_3_6/package.nix index c0dde6fa451d..e023bd9e4a11 100644 --- a/pkgs/by-name/et/etcd_3_6/package.nix +++ b/pkgs/by-name/et/etcd_3_6/package.nix @@ -11,11 +11,11 @@ }: let - version = "3.6.8"; - etcdSrcHash = "sha256-dNoQ+KKHZoi9GAqjyKPOpEJUwN6FID1tKfMiMknG7Dc="; - etcdCtlVendorHash = "sha256-lxFvpEGsp/HS0p54JrjBps7C/c7QR2QFQXU81sO9cPU="; - etcdUtlVendorHash = "sha256-6vzClDji9O2SGnKL3lsv3AUbCt/BicsDy1sPeuPdGXk="; - etcdServerVendorHash = "sha256-4vz63r05uZOzFQYA9jz9HLsQEDFL30cOETmV/AZanmY="; + version = "3.6.9"; + etcdSrcHash = "sha256-6rNCfjfs/lwiF3rnq5IM8ohW8Gz9r6gFHhIu9kvJ8VA="; + etcdCtlVendorHash = "sha256-yUA28nP5ueJz/b7spbg1mFRs2doBIyVNuZMCMlf//AE="; + etcdUtlVendorHash = "sha256-E3AVaUVulVKWGRbj/v2owbqkIfvxo/5naN1sNd96z+s="; + etcdServerVendorHash = "sha256-HtAsmsdjBbqls0S80E08PZcZYFlfpKUYrgJunRFP8Gc="; src = applyPatches { src = fetchFromGitHub { From 9265499e302fd4890784542bcbf9be80d9a08dda Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 22 Mar 2026 14:15:10 +0000 Subject: [PATCH 079/121] ocamlPackages.mirage-crypto: 2.0.2 -> 2.1.0 --- pkgs/development/ocaml-modules/mirage-crypto/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/ocaml-modules/mirage-crypto/default.nix b/pkgs/development/ocaml-modules/mirage-crypto/default.nix index e6004bdad6d6..2dea0eb4c218 100644 --- a/pkgs/development/ocaml-modules/mirage-crypto/default.nix +++ b/pkgs/development/ocaml-modules/mirage-crypto/default.nix @@ -12,11 +12,11 @@ buildDunePackage (finalAttrs: { minimalOCamlVersion = "4.13"; pname = "mirage-crypto"; - version = "2.0.2"; + version = "2.1.0"; src = fetchurl { url = "https://github.com/mirage/mirage-crypto/releases/download/v${finalAttrs.version}/mirage-crypto-${finalAttrs.version}.tbz"; - hash = "sha256-c5qdOfNAJ/vJNVf4fFysQZClK92t/3LyEvqoA9YhWHQ="; + hash = "sha256-++2omj17+pmS/b7z67/HKA/O/dQloEBeMzBRJc1AmBU="; }; doCheck = true; From 918aacb6a49e7561b0ddf1cc741a0d967f75450c Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 22 Mar 2026 16:21:05 +0000 Subject: [PATCH 080/121] python3Packages.confection: 0.1.5 -> 1.2.2 Changelog: https://github.com/explosion/confection/releases/tag/v1.2.2 --- .../python-modules/confection/default.nix | 50 ++++++++++++++----- 1 file changed, 37 insertions(+), 13 deletions(-) diff --git a/pkgs/development/python-modules/confection/default.nix b/pkgs/development/python-modules/confection/default.nix index c3950d749d17..14dc49f4b260 100644 --- a/pkgs/development/python-modules/confection/default.nix +++ b/pkgs/development/python-modules/confection/default.nix @@ -2,37 +2,61 @@ lib, buildPythonPackage, fetchFromGitHub, + + # build-system + setuptools, + + # tests + catalogue, + hypothesis, + numpy, pydantic, pytestCheckHook, - srsly, + + # passthru + nix-update-script, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "confection"; - version = "0.1.5"; - format = "setuptools"; + version = "1.2.2"; + pyproject = true; src = fetchFromGitHub { owner = "explosion"; repo = "confection"; - tag = "v${version}"; - hash = "sha256-1XIo9Hg4whYS1AkFeX8nVnpv+IvnpmyydHYdVYS0xZc="; + tag = "release-v${finalAttrs.version}"; + hash = "sha256-C7TAfr7Xq4C+JJI7/XWX1mTf2IvvOQT+q/nnGojhbFU="; }; - propagatedBuildInputs = [ - pydantic - srsly + build-system = [ + setuptools ]; - nativeCheckInputs = [ pytestCheckHook ]; - pythonImportsCheck = [ "confection" ]; + nativeCheckInputs = [ + catalogue + hypothesis + numpy + pydantic + pytestCheckHook + ]; + + passthru = { + updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "release-v(.*)" + ]; + }; + }; + meta = { description = "Library that offers a configuration system"; homepage = "https://github.com/explosion/confection"; - changelog = "https://github.com/explosion/confection/releases/tag/v${version}"; + changelog = "https://github.com/explosion/confection/releases/tag/${finalAttrs.version}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ fab ]; }; -} +}) From 1b50444fcd74bf5c8b97ddc835ad00892d341d1a Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 22 Mar 2026 16:16:28 +0000 Subject: [PATCH 081/121] python3Packages.weasel: 0.4.3 -> 1.0.0 Changelog: https://github.com/explosion/weasel/releases/tag/release-v1.0.0 --- .../python-modules/weasel/default.nix | 35 +++++++++++-------- 1 file changed, 20 insertions(+), 15 deletions(-) diff --git a/pkgs/development/python-modules/weasel/default.nix b/pkgs/development/python-modules/weasel/default.nix index fb4b108a66bf..08ec267adb12 100644 --- a/pkgs/development/python-modules/weasel/default.nix +++ b/pkgs/development/python-modules/weasel/default.nix @@ -9,9 +9,8 @@ # dependencies cloudpathlib, confection, - packaging, + httpx, pydantic, - requests, smart-open, srsly, typer, @@ -19,33 +18,30 @@ # tests pytestCheckHook, + + # passthru + nix-update-script, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "weasel"; - version = "0.4.3"; + version = "1.0.0"; pyproject = true; src = fetchFromGitHub { owner = "explosion"; repo = "weasel"; - tag = "release-v${version}"; - hash = "sha256-Xd7cJlUi/a8gwtnuO9wqZiHT1xVMbp6V6Ha+Kyr4tFE="; + tag = "release-v${finalAttrs.version}"; + hash = "sha256-yiLoLdnDfKby1Ez1hKGL9DxazQto57Zn0DlRmGLurOs="; }; - postPatch = '' - substituteInPlace setup.cfg \ - --replace-fail "typer-slim" "typer" - ''; - build-system = [ setuptools ]; dependencies = [ cloudpathlib confection - packaging + httpx pydantic - requests smart-open srsly typer @@ -65,12 +61,21 @@ buildPythonPackage rec { "test_project_git_file_asset" ]; + passthru = { + updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "release-v(.*)" + ]; + }; + }; + meta = { description = "Small and easy workflow system"; homepage = "https://github.com/explosion/weasel/"; - changelog = "https://github.com/explosion/weasel/releases/tag/${src.tag}"; + changelog = "https://github.com/explosion/weasel/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = with lib.maintainers; [ GaetanLepage ]; mainProgram = "weasel"; }; -} +}) From 3b479ea3872a74305f1de9fdb6cb5966311ef879 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 22 Mar 2026 17:04:01 +0000 Subject: [PATCH 082/121] docker-credential-env: 1.6.0 -> 1.6.1 --- pkgs/by-name/do/docker-credential-env/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/do/docker-credential-env/package.nix b/pkgs/by-name/do/docker-credential-env/package.nix index 967af5e43dac..576d48462d66 100644 --- a/pkgs/by-name/do/docker-credential-env/package.nix +++ b/pkgs/by-name/do/docker-credential-env/package.nix @@ -7,16 +7,16 @@ buildGoModule (finalAttrs: { pname = "docker-credential-env"; - version = "1.6.0"; + version = "1.6.1"; src = fetchFromGitHub { owner = "isometry"; repo = "docker-credential-env"; tag = "v${finalAttrs.version}"; - hash = "sha256-PnLylYDuDg+FSZ4CUSoQ5gMk4p08FP4OKBxkeIMa+tY="; + hash = "sha256-EqSlbgGOuGQ2Y7aZ4MqUBgWK0aVI7Afi/KAxfdVu0zE="; }; - vendorHash = "sha256-uALgz1TXTIk8UlxTaqYOXvCg9121hMIFfJoYC0jxohk="; + vendorHash = "sha256-JTrFRpRjdLXKTvj7I2KYcIsFfuWLHPnjKV+3Q6b6DDs="; ldflags = let From b8b8217637f1f8f2e4d87a87b26419c8d65d4c1a Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 22 Mar 2026 17:15:23 +0000 Subject: [PATCH 083/121] gitea-actions-runner: 0.2.13 -> 0.3.0 --- pkgs/by-name/gi/gitea-actions-runner/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/gi/gitea-actions-runner/package.nix b/pkgs/by-name/gi/gitea-actions-runner/package.nix index a934276ed32b..acc6a49f91ec 100644 --- a/pkgs/by-name/gi/gitea-actions-runner/package.nix +++ b/pkgs/by-name/gi/gitea-actions-runner/package.nix @@ -8,17 +8,17 @@ buildGoModule (finalAttrs: { pname = "gitea-actions-runner"; - version = "0.2.13"; + version = "0.3.0"; src = fetchFromGitea { domain = "gitea.com"; owner = "gitea"; repo = "act_runner"; rev = "v${finalAttrs.version}"; - hash = "sha256-S0pZddExNw4RQvigWJh4r1CPDS+eOCa1n/8278J3wR4="; + hash = "sha256-D2b0m3XEEEugjnrEzpYGxwD8hzpoPzIW9lNrCbgmKVc="; }; - vendorHash = "sha256-F+rFv0s/GBY3InWiofk3MCADfyauAmL/TpilWhZB5vE="; + vendorHash = "sha256-EqU+YJrwKtA9LHa7DkRJ6er5GNocR8Gbhjjx72mPhqE="; ldflags = [ "-s" From 997dabcbe441495bb71e9863e2bd1a082e621606 Mon Sep 17 00:00:00 2001 From: Michael Daniels Date: Sun, 22 Mar 2026 13:39:33 -0400 Subject: [PATCH 084/121] nixosTests.initrd-secrets-changing: mark broken on aarch64 Has been broken on Hydra since at least 2024. --- nixos/tests/initrd-secrets-changing.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/tests/initrd-secrets-changing.nix b/nixos/tests/initrd-secrets-changing.nix index 1fa71a28872f..f0d6bc4c28b4 100644 --- a/nixos/tests/initrd-secrets-changing.nix +++ b/nixos/tests/initrd-secrets-changing.nix @@ -13,6 +13,7 @@ in testing.makeTest { name = "initrd-secrets-changing"; + meta.broken = pkgs.stdenv.hostPlatform.isAarch64; nodes.machine = { ... }: From a391f3fc6bebb7aa427656417d5041364c40bb32 Mon Sep 17 00:00:00 2001 From: Michael Daniels Date: Sun, 22 Mar 2026 13:42:22 -0400 Subject: [PATCH 085/121] nixosTests.optee: mark broken on aarch64 Has been broken on Hydra since November 2025. --- nixos/tests/optee.nix | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/nixos/tests/optee.nix b/nixos/tests/optee.nix index f9e0bdd2f0f2..2d7c80bda78c 100644 --- a/nixos/tests/optee.nix +++ b/nixos/tests/optee.nix @@ -2,8 +2,9 @@ { name = "optee"; - meta = with pkgs.lib.maintainers; { - maintainers = [ jmbaur ]; + meta = { + maintainers = with lib.maintainers; [ jmbaur ]; + broken = pkgs.stdenv.hostPlatform.isAarch64; }; nodes.machine = From 05a5ead101776d89c747a1c29661ec77f06739e8 Mon Sep 17 00:00:00 2001 From: Michael Daniels Date: Sun, 22 Mar 2026 13:45:50 -0400 Subject: [PATCH 086/121] nixosTests.pulseAudio: mark broken on aarch64 Has been broken on Hydra since at least 2024. --- nixos/tests/pulseaudio.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/tests/pulseaudio.nix b/nixos/tests/pulseaudio.nix index b3b0837b239e..cb19a3436dc5 100644 --- a/nixos/tests/pulseaudio.nix +++ b/nixos/tests/pulseaudio.nix @@ -31,6 +31,7 @@ let name = "pulseaudio${lib.optionalString fullVersion "Full"}${lib.optionalString systemWide "-systemWide"}"; meta = { maintainers = pkgs.pulseaudio.meta.maintainers; + broken = pkgs.stdenv.hostPlatform.isAarch64; }; nodes.machine = From 403d5a39d802c9847a95c775ca6fbd56ecf6726f Mon Sep 17 00:00:00 2001 From: Michael Daniels Date: Sun, 22 Mar 2026 13:47:53 -0400 Subject: [PATCH 087/121] nixosTests.systemd-initrd-luks-unl0kr: mark broken on aarch64 Has been broken on Hydra since inception in 2023. --- nixos/tests/systemd-initrd-luks-unl0kr.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/nixos/tests/systemd-initrd-luks-unl0kr.nix b/nixos/tests/systemd-initrd-luks-unl0kr.nix index f9dbce1ccdd8..74e74cd95be1 100644 --- a/nixos/tests/systemd-initrd-luks-unl0kr.nix +++ b/nixos/tests/systemd-initrd-luks-unl0kr.nix @@ -14,6 +14,7 @@ in name = "systemd-initrd-luks-unl0kr"; meta = { maintainers = [ ]; + broken = pkgs.stdenv.hostPlatform.isAarch64; }; # TODO: Fix OCR: #302965 From f919251a18a8cd4eb8a0cd77e6348d12b851cd65 Mon Sep 17 00:00:00 2001 From: Fabian Affolter Date: Sun, 22 Mar 2026 17:52:17 +0100 Subject: [PATCH 088/121] python3Packages.iamdata: 0.1.202603211 -> 0.1.202603221 Diff: https://github.com/cloud-copilot/iam-data-python/compare/v0.1.202603211...v0.1.202603221 Changelog: https://github.com/cloud-copilot/iam-data-python/releases/tag/v0.1.202603221 --- pkgs/development/python-modules/iamdata/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/iamdata/default.nix b/pkgs/development/python-modules/iamdata/default.nix index 0a9a628f4657..145b0f1574f0 100644 --- a/pkgs/development/python-modules/iamdata/default.nix +++ b/pkgs/development/python-modules/iamdata/default.nix @@ -8,14 +8,14 @@ buildPythonPackage (finalAttrs: { pname = "iamdata"; - version = "0.1.202603211"; + version = "0.1.202603221"; pyproject = true; src = fetchFromGitHub { owner = "cloud-copilot"; repo = "iam-data-python"; tag = "v${finalAttrs.version}"; - hash = "sha256-WY4UC7mLp4zuUiYBmN/6rrcWywo0/A0udjiSFc/19IY="; + hash = "sha256-Yy9i/bnbsXJt9sxMDDnTka/Tt6Rdv825xDnsCC3XBmE="; }; __darwinAllowLocalNetworking = true; From f1dc23578e991a12c3ce62dc77ba2d16e8b2e0eb Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 22 Mar 2026 16:49:13 +0000 Subject: [PATCH 089/121] python3Packages.thinc: 8.3.6 -> 8.3.12 Changelog: https://github.com/explosion/thinc/releases/tag/release-v8.3.12 --- .../python-modules/thinc/default.nix | 63 +++++++++++++------ .../thinc/fix-blas-ctypedefs.patch | 49 +++++++++++++++ 2 files changed, 94 insertions(+), 18 deletions(-) create mode 100644 pkgs/development/python-modules/thinc/fix-blas-ctypedefs.patch diff --git a/pkgs/development/python-modules/thinc/default.nix b/pkgs/development/python-modules/thinc/default.nix index 8da83f9766fb..0663dd68023d 100644 --- a/pkgs/development/python-modules/thinc/default.nix +++ b/pkgs/development/python-modules/thinc/default.nix @@ -1,33 +1,44 @@ { lib, - blas, - blis, buildPythonPackage, - catalogue, - confection, + fetchFromGitHub, + + # build-system + blis, cymem, cython, - fetchPypi, - hypothesis, - mock, murmurhash, numpy, preshed, - pydantic, - pytestCheckHook, setuptools, + + # buildInputs + blas, + + # dependencies + catalogue, + confection, + pydantic, srsly, wasabi, + + # tests + coverage, + hypothesis, + mock, + pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "thinc"; - version = "8.3.6"; + version = "8.3.12"; pyproject = true; - src = fetchPypi { - inherit pname version; - hash = "sha256-SZg/m33cQ0OpUyaUqRGN0hbXpgBSCiGEmkO2wmjsbK0="; + src = fetchFromGitHub { + owner = "explosion"; + repo = "thinc"; + tag = "release-v${finalAttrs.version}"; + hash = "sha256-8nf+AWAD7Fy50XRJDINmyk42F7KMDhGgATwqbln3r04="; }; build-system = [ @@ -57,25 +68,41 @@ buildPythonPackage rec { wasabi ]; + pythonImportsCheck = [ "thinc" ]; + nativeCheckInputs = [ + coverage hypothesis mock pytestCheckHook ]; + # avoid local paths, relative imports wont resolve correctly preCheck = '' - # avoid local paths, relative imports wont resolve correctly mv thinc/tests tests rm -r thinc ''; - pythonImportsCheck = [ "thinc" ]; + pytestFlags = [ + # UserWarning: Core Pydantic V1 functionality isn't compatible with Python 3.14 or greater. + "-Wignore::UserWarning" + ]; + + disabledTestPaths = [ + # pydantic.v1.error_wrappers.ValidationError: 1 validation error for DefaultsSchema + "tests/test_config.py" + ]; + + disabledTests = [ + # RecursionError: Stack overflow (used 8148 kB) + "test_pickle_with_flatten" + ]; meta = { description = "Library for NLP machine learning"; homepage = "https://github.com/explosion/thinc"; - changelog = "https://github.com/explosion/thinc/releases/tag/v${version}"; + changelog = "https://github.com/explosion/thinc/releases/tag/${finalAttrs.src.tag}"; license = lib.licenses.mit; maintainers = [ ]; }; -} +}) diff --git a/pkgs/development/python-modules/thinc/fix-blas-ctypedefs.patch b/pkgs/development/python-modules/thinc/fix-blas-ctypedefs.patch new file mode 100644 index 000000000000..03dd549002d3 --- /dev/null +++ b/pkgs/development/python-modules/thinc/fix-blas-ctypedefs.patch @@ -0,0 +1,49 @@ +diff --git a/thinc/backends/cblas.pxd b/thinc/backends/cblas.pxd +index c608d87..1ae1281 100644 +--- a/thinc/backends/cblas.pxd ++++ b/thinc/backends/cblas.pxd +@@ -2,21 +2,21 @@ from libcpp.memory cimport shared_ptr + + ctypedef void (*sgemm_ptr)(bint transA, bint transB, int M, int N, int K, + float alpha, const float* A, int lda, const float* B, +- int ldb, float beta, float* C, int ldc) nogil ++ int ldb, float beta, float* C, int ldc) noexcept nogil + ctypedef void (*dgemm_ptr)(bint transA, bint transB, int M, int N, int K, + double alpha, const double* A, int lda, const double* B, +- int ldb, double beta, double* C, int ldc) nogil ++ int ldb, double beta, double* C, int ldc) noexcept nogil + + + ctypedef void (*saxpy_ptr)(int N, float alpha, const float* X, int incX, +- float *Y, int incY) nogil ++ float *Y, int incY) noexcept nogil + + + ctypedef void (*daxpy_ptr)(int N, double alpha, const double* X, int incX, +- double *Y, int incY) nogil ++ double *Y, int incY) noexcept nogil + +-ctypedef void (*sscal_ptr)(int N, float alpha, float* X, int incX) nogil +-ctypedef void (*dscal_ptr)(int N, double alpha, double* X, int incX) nogil ++ctypedef void (*sscal_ptr)(int N, float alpha, float* X, int incX) noexcept nogil ++ctypedef void (*dscal_ptr)(int N, double alpha, double* X, int incX) noexcept nogil + + # Forward-declaration of the BlasFuncs struct. This struct must be opaque, so + # that consumers of the CBlas class cannot become dependent on its size or +diff --git a/thinc/backends/cblas.pyx b/thinc/backends/cblas.pyx +index 896b604..9a9e63e 100644 +--- a/thinc/backends/cblas.pyx ++++ b/thinc/backends/cblas.pyx +@@ -5,10 +5,10 @@ from libcpp.memory cimport make_shared + + + # Single- and double-precision wrappers for `blis.cy.scalv` +-cdef void blis_sscal(int N, float alpha, float* X, int incX) nogil: ++cdef void blis_sscal(int N, float alpha, float* X, int incX) noexcept nogil: + blis.cy.scalv(blis.cy.NO_CONJUGATE, N, alpha, X, incX) + +-cdef void blis_dscal(int N, double alpha, double* X, int incX) nogil: ++cdef void blis_dscal(int N, double alpha, double* X, int incX) noexcept nogil: + blis.cy.scalv(blis.cy.NO_CONJUGATE, N, alpha, X, incX) + + From e1be7722b39258c20031f259ab83085cd2228edc Mon Sep 17 00:00:00 2001 From: Gaetan Lepage Date: Sun, 22 Mar 2026 18:11:37 +0000 Subject: [PATCH 090/121] python3Packages.docling-core: 2.64.0 -> 2.70.2 Diff: https://github.com/docling-project/docling-core/compare/v2.64.0...v2.70.2 Changelog: https://github.com/docling-project/docling-core/blob/v2.70.2/CHANGELOG.md --- .../python-modules/docling-core/default.nix | 21 ++++++++++--------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/pkgs/development/python-modules/docling-core/default.nix b/pkgs/development/python-modules/docling-core/default.nix index e19e098dcbde..48d380bf8c01 100644 --- a/pkgs/development/python-modules/docling-core/default.nix +++ b/pkgs/development/python-modules/docling-core/default.nix @@ -8,6 +8,7 @@ setuptools, # dependencies + defusedxml, jsonref, jsonschema, latex2mathml, @@ -31,14 +32,14 @@ buildPythonPackage (finalAttrs: { pname = "docling-core"; - version = "2.64.0"; + version = "2.70.2"; pyproject = true; src = fetchFromGitHub { owner = "docling-project"; repo = "docling-core"; tag = "v${finalAttrs.version}"; - hash = "sha256-22UJuHKUKyaIXcFOJvBWZibxBpibENZqVVFmZalWGx0="; + hash = "sha256-YRvvizPwc3sJ6FgZfhadixDayMIGS1zTo+bnHBS7FMg="; }; build-system = [ @@ -46,7 +47,13 @@ buildPythonPackage (finalAttrs: { setuptools ]; + pythonRelaxDeps = [ + "defusedxml" + "pillow" + "typer" + ]; dependencies = [ + defusedxml jsonref jsonschema latex2mathml @@ -62,14 +69,7 @@ buildPythonPackage (finalAttrs: { typing-extensions ]; - pythonRelaxDeps = [ - "pillow" - "typer" - ]; - - pythonImportsCheck = [ - "docling_core" - ]; + pythonImportsCheck = [ "docling_core" ]; nativeCheckInputs = [ gitpython @@ -83,6 +83,7 @@ buildPythonPackage (finalAttrs: { "test/test_code_chunker.py" "test/test_code_chunking_strategy.py" "test/test_hybrid_chunker.py" + "test/test_line_chunker.py" ]; meta = { From 4bcff4fda49b2e38e0ed494f08cfd9a4e65df2d5 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 22 Mar 2026 18:37:01 +0000 Subject: [PATCH 091/121] plasmusic-toolbar: 3.7.0 -> 4.0.0 --- pkgs/by-name/pl/plasmusic-toolbar/package.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/by-name/pl/plasmusic-toolbar/package.nix b/pkgs/by-name/pl/plasmusic-toolbar/package.nix index c02c5a6da7b2..2b9283298eba 100644 --- a/pkgs/by-name/pl/plasmusic-toolbar/package.nix +++ b/pkgs/by-name/pl/plasmusic-toolbar/package.nix @@ -7,13 +7,13 @@ }: stdenvNoCC.mkDerivation (finalAttrs: { pname = "plasmusic-toolbar"; - version = "3.7.0"; + version = "4.0.0"; src = fetchFromGitHub { owner = "ccatterina"; repo = "plasmusic-toolbar"; tag = "v${finalAttrs.version}"; - hash = "sha256-yCsNvco01dy72f8g1+BCYXo1yx/ERdfggLYchj/UXcw="; + hash = "sha256-yT3Ftwy30ixFmGhvof49FIOCH97rT03zNL8V2uweyOQ="; }; installPhase = '' From 4b3b778ddbae428440ccfd7a547607e1991d8324 Mon Sep 17 00:00:00 2001 From: Michael Daniels Date: Sun, 22 Mar 2026 14:40:59 -0400 Subject: [PATCH 092/121] nixpkgs-vet: 0.1.4 -> 0.2.0 --- pkgs/by-name/ni/nixpkgs-vet/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ni/nixpkgs-vet/package.nix b/pkgs/by-name/ni/nixpkgs-vet/package.nix index 008784db740f..a982f30d2fe0 100644 --- a/pkgs/by-name/ni/nixpkgs-vet/package.nix +++ b/pkgs/by-name/ni/nixpkgs-vet/package.nix @@ -7,16 +7,16 @@ }: rustPlatform.buildRustPackage (finalAttrs: { pname = "nixpkgs-vet"; - version = "0.1.4"; + version = "0.2.0"; src = fetchFromGitHub { owner = "NixOS"; repo = "nixpkgs-vet"; tag = finalAttrs.version; - hash = "sha256-J61eOTeDMHt9f1XmKVrEMAFUgwHGmMxDoSyY3v72QVY="; + hash = "sha256-TxQkD9jPoONec87qGXOIQNh+lZ7kyFM6q1RtlgxEqy4="; }; - cargoHash = "sha256-H2JAIMJeVqp8xq75eLEBKiK2pBrgC7vgXXlqbrSUifE="; + cargoHash = "sha256-Wx8AwgUENVbxv9GgB/DTH5aGIRznAslABjxRu/X0l2s="; doCheck = false; From ca7652a21b702d416bdf5d699e3cbb4dc6a5b949 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 22 Mar 2026 11:45:13 -0700 Subject: [PATCH 093/121] python3Packages.greenplanet-energy-api: don't test coverage --- .../python-modules/greenplanet-energy-api/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/greenplanet-energy-api/default.nix b/pkgs/development/python-modules/greenplanet-energy-api/default.nix index f712f3ba3a0a..5aa98eb06ffb 100644 --- a/pkgs/development/python-modules/greenplanet-energy-api/default.nix +++ b/pkgs/development/python-modules/greenplanet-energy-api/default.nix @@ -5,7 +5,7 @@ setuptools, aiohttp, pytest-asyncio, - pytest-cov, + pytest-cov-stub, aioresponses, pytestCheckHook, }: @@ -30,7 +30,7 @@ buildPythonPackage (finalAttrs: { nativeCheckInputs = [ pytest-asyncio - pytest-cov + pytest-cov-stub aioresponses pytestCheckHook ]; From 3a3773f277b2d4ef59a0904fefda3c8cdac40bed Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 22 Mar 2026 11:48:36 -0700 Subject: [PATCH 094/121] mcp-nixos: reduce test dependencies --- pkgs/by-name/mc/mcp-nixos/package.nix | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/pkgs/by-name/mc/mcp-nixos/package.nix b/pkgs/by-name/mc/mcp-nixos/package.nix index a60947b6f9d2..d0fe8aa06966 100644 --- a/pkgs/by-name/mc/mcp-nixos/package.nix +++ b/pkgs/by-name/mc/mcp-nixos/package.nix @@ -26,11 +26,9 @@ python3Packages.buildPythonApplication (finalAttrs: { ]; nativeCheckInputs = with python3Packages; [ - anthropic pytestCheckHook pytest-asyncio - pytest-cov - python-dotenv + pytest-cov-stub ]; disabledTestPaths = [ From 68edfc3d6ed6e7c6111fd4243cd9574a57c8bb1d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20Sch=C3=BCtz?= Date: Sun, 22 Mar 2026 11:50:37 -0700 Subject: [PATCH 095/121] multiqc: remove superfluous dependencies --- pkgs/by-name/mu/multiqc/package.nix | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/pkgs/by-name/mu/multiqc/package.nix b/pkgs/by-name/mu/multiqc/package.nix index 71298537d3bf..320da0f89667 100644 --- a/pkgs/by-name/mu/multiqc/package.nix +++ b/pkgs/by-name/mu/multiqc/package.nix @@ -44,9 +44,8 @@ python3Packages.buildPythonApplication (finalAttrs: { sourceRoot = "multiqc"; - nativeBuildInputs = with python3Packages; [ + build-system = with python3Packages; [ setuptools - wheel ]; dependencies = with python3Packages; [ @@ -78,25 +77,6 @@ python3Packages.buildPythonApplication (finalAttrs: { jsonschema ]; - optional-dependencies = { - dev = with python3Packages; [ - pre-commit-hooks - pdoc3 - pytest - pytest-cov - pytest-xdist - syrupy - pygithub - mypy - types-pyyaml - types-tqdm - types-requests - types-markdown - types-beautifulsoup4 - types-pillow - ]; - }; - # Some tests run subprocess.run() with "multiqc" preCheck = '' chmod -R u+w ../test-data From abceaa0c4de0d567150e301090dc6b7717a5def4 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 22 Mar 2026 19:16:43 +0000 Subject: [PATCH 096/121] terraform-providers.f5networks_bigip: 1.25.0 -> 1.25.1 --- .../networking/cluster/terraform-providers/providers.json | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/cluster/terraform-providers/providers.json b/pkgs/applications/networking/cluster/terraform-providers/providers.json index da8f4b9fb4c3..f2c1f470ce2e 100644 --- a/pkgs/applications/networking/cluster/terraform-providers/providers.json +++ b/pkgs/applications/networking/cluster/terraform-providers/providers.json @@ -391,11 +391,11 @@ "vendorHash": null }, "f5networks_bigip": { - "hash": "sha256-aUf9eRpfxzdpz6Lv36xWxSW++tSMxYvqy9xtkko/bfc=", + "hash": "sha256-L/qV8Ff5UhRs6r+jadBUkofLcxggBq96gCpkk0Tv3k8=", "homepage": "https://registry.terraform.io/providers/F5Networks/bigip", "owner": "F5Networks", "repo": "terraform-provider-bigip", - "rev": "v1.25.0", + "rev": "v1.25.1", "spdx": "MPL-2.0", "vendorHash": null }, From c75583f32f06bdbe7e48b2065186f255bfb4b608 Mon Sep 17 00:00:00 2001 From: Niklas Korz Date: Sun, 22 Mar 2026 20:04:14 +0100 Subject: [PATCH 097/121] cargo-bundle: restrict squashfsTools reference to Linux These are only needed to build appimages, which only exist on Linux. --- pkgs/by-name/ca/cargo-bundle/package.nix | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/ca/cargo-bundle/package.nix b/pkgs/by-name/ca/cargo-bundle/package.nix index 54eb345f941b..40ef02df4a62 100644 --- a/pkgs/by-name/ca/cargo-bundle/package.nix +++ b/pkgs/by-name/ca/cargo-bundle/package.nix @@ -8,7 +8,7 @@ wayland, openssl, squashfsTools, - makeWrapper, + makeBinaryWrapper, versionCheckHook, nix-update-script, }: @@ -28,7 +28,9 @@ rustPlatform.buildRustPackage (finalAttrs: { nativeBuildInputs = [ pkg-config - makeWrapper + ] + ++ lib.optionals stdenv.hostPlatform.isLinux [ + makeBinaryWrapper ]; buildInputs = lib.optionals stdenv.hostPlatform.isLinux [ @@ -37,7 +39,8 @@ rustPlatform.buildRustPackage (finalAttrs: { openssl ]; - postFixup = '' + # squashfs tools are needed to build appimages for Linux + postFixup = lib.optionalString stdenv.hostPlatform.isLinux '' wrapProgram $out/bin/cargo-bundle \ --prefix PATH : ${lib.makeBinPath [ squashfsTools ]} ''; From 567cea9fe27a24fa212f905f325e8cde18d1e458 Mon Sep 17 00:00:00 2001 From: Saad Nadeem Date: Sun, 22 Mar 2026 16:04:57 -0400 Subject: [PATCH 098/121] vimPlugins.fff-nvim: 1001eb8-unstable-2026-03-13 -> 0.4.3-nightly.dd56a3a-unstable-2026-03-20 --- .../vim/plugins/non-generated/fff-nvim/default.nix | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/editors/vim/plugins/non-generated/fff-nvim/default.nix b/pkgs/applications/editors/vim/plugins/non-generated/fff-nvim/default.nix index c32464bdb4d4..244f3bf6cf96 100644 --- a/pkgs/applications/editors/vim/plugins/non-generated/fff-nvim/default.nix +++ b/pkgs/applications/editors/vim/plugins/non-generated/fff-nvim/default.nix @@ -11,18 +11,18 @@ vimUtils, }: let - version = "1001eb8-unstable-2026-03-13"; + version = "0.4.3-nightly.dd56a3a-unstable-2026-03-20"; src = fetchFromGitHub { owner = "dmtrKovalenko"; repo = "fff.nvim"; - rev = "fcdf4a9172fba824ca6834731b93b74eba51d1c3"; - hash = "sha256-AYxWrqru0/HCrfTXRqTExiOT6mNzNMk+pT6APRs0BUM="; + rev = "dd56a3a8a8a5a85522badaf6485f28c8f7a7c840"; + hash = "sha256-F9fnjCwBEJfuK0TuRr7XjMcacMep5K0SuzGft2IFXtQ="; }; fff-nvim-lib = rustPlatform.buildRustPackage { pname = "fff-nvim-lib"; inherit version src; - cargoHash = "sha256-nXtJPE6HNZx5Ra4CwYi/f4EWww//1XwsiwtRG77RPJk="; + cargoHash = "sha256-Xhn+EpVF7XQOgHQpmoHHrZ/swi2xgdEFYh8D6mYJMSc="; nativeBuildInputs = [ pkg-config @@ -40,8 +40,6 @@ let ]; env = { - RUSTC_BOOTSTRAP = 1; # We need rust unstable features - OPENSSL_NO_VENDOR = true; # Allow undefined symbols on Darwin - they will be provided by Neovim's LuaJIT runtime From f2233d187d1fd9067bf061506bc4ea65a73afc4b Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Sun, 11 Jan 2026 11:26:35 +0000 Subject: [PATCH 099/121] python3Packages.cypari: rename static library derivation inputs --- .../python-modules/cypari/default.nix | 31 +++++++++++++++---- pkgs/top-level/python-packages.nix | 18 +---------- 2 files changed, 26 insertions(+), 23 deletions(-) diff --git a/pkgs/development/python-modules/cypari/default.nix b/pkgs/development/python-modules/cypari/default.nix index 7bba34e3a9a8..7b263b26720e 100644 --- a/pkgs/development/python-modules/cypari/default.nix +++ b/pkgs/development/python-modules/cypari/default.nix @@ -1,14 +1,33 @@ { lib, + fetchFromGitHub, python, buildPythonPackage, - fetchFromGitHub, + fetchurl, fetchpatch, + + # build-time dependencies setuptools, cython, - gmp, - pari, perl, + + # static libraries + pkgsStatic, + gmpStatic ? pkgsStatic.gmp, + pari, + pariStatic_2_15 ? pari.overrideAttrs ( + finalAttrs: oldAttrs: { + version = "2.15.4"; + src = fetchurl { + url = "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor finalAttrs.version}/pari-${finalAttrs.version}.tar.gz"; + hash = "sha256-w1Rb/uDG37QLd/tLurr5mdguYAabn20ovLbPAEyMXA8="; + }; + installTargets = [ + "install" + "install-lib-sta" + ]; + } + ), }: buildPythonPackage rec { @@ -38,8 +57,8 @@ buildPythonPackage rec { preBuild = '' mkdir libcache - ln -s ${gmp} libcache/gmp - ln -s ${pari} libcache/pari + ln -s ${gmpStatic} libcache/gmp + ln -s ${pariStatic_2_15} libcache/pari ''; build-system = [ @@ -62,11 +81,11 @@ buildPythonPackage rec { meta = { description = "Sage's PARI extension, modified to stand alone"; homepage = "https://github.com/3-manifolds/CyPari"; + changelog = "https://github.com/3-manifolds/CyPari/releases/tag/${src.tag}"; license = lib.licenses.gpl2Plus; maintainers = with lib.maintainers; [ noiioiu alejo7797 ]; - changelog = "https://github.com/3-manifolds/CyPari/releases/tag/${src.tag}"; }; } diff --git a/pkgs/top-level/python-packages.nix b/pkgs/top-level/python-packages.nix index fcf19791ac15..2551a0b78598 100644 --- a/pkgs/top-level/python-packages.nix +++ b/pkgs/top-level/python-packages.nix @@ -3476,23 +3476,7 @@ self: super: with self; { cynthion = callPackage ../development/python-modules/cynthion { }; - cypari = callPackage ../development/python-modules/cypari { - - inherit (pkgs.pkgsStatic) gmp; - - pari = pkgs.pari.overrideAttrs rec { - version = "2.15.4"; - src = pkgs.fetchurl { - url = "https://pari.math.u-bordeaux.fr/pub/pari/OLD/${lib.versions.majorMinor version}/pari-${version}.tar.gz"; - hash = "sha256-w1Rb/uDG37QLd/tLurr5mdguYAabn20ovLbPAEyMXA8="; - }; - installTargets = [ - "install" - "install-lib-sta" - ]; - }; - - }; + cypari = callPackage ../development/python-modules/cypari { }; cypari2 = callPackage ../development/python-modules/cypari2 { }; From 9284474b901c9ff3c9c28532a2ea94b69dda35a0 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Mon, 9 Feb 2026 22:00:20 -0500 Subject: [PATCH 100/121] python3Packages.cypari: add updateScript --- pkgs/development/python-modules/cypari/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/cypari/default.nix b/pkgs/development/python-modules/cypari/default.nix index 7b263b26720e..4343437554bc 100644 --- a/pkgs/development/python-modules/cypari/default.nix +++ b/pkgs/development/python-modules/cypari/default.nix @@ -3,6 +3,7 @@ fetchFromGitHub, python, buildPythonPackage, + nix-update-script, fetchurl, fetchpatch, @@ -78,6 +79,13 @@ buildPythonPackage rec { runHook postCheck ''; + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "(.*)_as_released" + ]; + }; + meta = { description = "Sage's PARI extension, modified to stand alone"; homepage = "https://github.com/3-manifolds/CyPari"; From 7b0caf2e0585044f7441816556924ce5a05d0ea3 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Mon, 5 Jan 2026 17:12:40 -0600 Subject: [PATCH 101/121] python3Packages.cypari: 2.5.5 -> 2.5.6 --- pkgs/development/python-modules/cypari/default.nix | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) diff --git a/pkgs/development/python-modules/cypari/default.nix b/pkgs/development/python-modules/cypari/default.nix index 4343437554bc..e71204f09963 100644 --- a/pkgs/development/python-modules/cypari/default.nix +++ b/pkgs/development/python-modules/cypari/default.nix @@ -33,26 +33,21 @@ buildPythonPackage rec { pname = "cypari"; - version = "2.5.5"; + version = "2.5.6"; pyproject = true; src = fetchFromGitHub { owner = "3-manifolds"; repo = "CyPari"; tag = "${version}_as_released"; - hash = "sha256-RJ9O1KsDHmMkTCIFUrcSUkA5ijTsxmoI939QCsCib0Y="; + hash = "sha256-pzxnrWkoPW7fpxLbUQ+drIrdrjqaAiNnDfe9ky2IxaA="; }; patches = [ - (fetchpatch { - name = "support-aarch64-linux.patch"; - url = "https://github.com/3-manifolds/CyPari/commit/6197171b52ee4f44a4954ddd0e2e36769b189dee.patch"; - hash = "sha256-j2P7DEGD2B8q9Hh4G2mQng76fQdUpeAdFYoTD7Ui/Dk="; - }) (fetchpatch { name = "fix-build-with-cython-3_1.patch"; - url = "https://github.com/3-manifolds/CyPari/compare/622e112ffcf0383e2110954ff3ac3c42c006ebe1...50bcbd2b39177f5e4c5a3551a8a14f75ab05a5d6.patch"; - hash = "sha256-6ayvtHMS3YtzzklHaaLzl9d4zHJhm0lVZQZFS9ykFY4="; + url = "https://github.com/3-manifolds/CyPari/compare/17bf39dc4508f2e46de75b95c65982c627652b60...d6cb914d2bdc74a51cc2a9136204ebf47b3e7369.diff"; + hash = "sha256-c8sq80mYSMMvgFh7RXYwKcqwI7iVRQsm/8yaIL0+PHQ="; }) ]; From 807436d41820f321dd9c3569edd53c2c516b1df0 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Mon, 9 Feb 2026 17:11:08 -0500 Subject: [PATCH 102/121] python3Packages.plink: add updateScript --- pkgs/development/python-modules/plink/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/plink/default.nix b/pkgs/development/python-modules/plink/default.nix index 63e47bf2828e..668cba46ffec 100644 --- a/pkgs/development/python-modules/plink/default.nix +++ b/pkgs/development/python-modules/plink/default.nix @@ -5,6 +5,7 @@ setuptools, sphinx, tkinter, + nix-update-script, }: buildPythonPackage rec { @@ -28,6 +29,13 @@ buildPythonPackage rec { pythonImportsCheck = [ "plink" ]; + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "(.*)_as_released" + ]; + }; + meta = { description = "Full featured Tk-based knot and link editor"; mainProgram = "plink"; From 4b8eb301f12f0333b56e9500a0b6266bb67f4016 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Mon, 5 Jan 2026 17:11:35 -0600 Subject: [PATCH 103/121] python3Packages.plink: 2.4.6 -> 2.4.9 --- pkgs/development/python-modules/plink/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/plink/default.nix b/pkgs/development/python-modules/plink/default.nix index 668cba46ffec..d2073d710d38 100644 --- a/pkgs/development/python-modules/plink/default.nix +++ b/pkgs/development/python-modules/plink/default.nix @@ -10,14 +10,14 @@ buildPythonPackage rec { pname = "plink"; - version = "2.4.6"; + version = "2.4.9"; pyproject = true; src = fetchFromGitHub { owner = "3-manifolds"; repo = "plink"; tag = "${version}_as_released"; - hash = "sha256-+WUyQvQY9Fx47GikzJ4gcCpSIjvk5756FP0bDdF6Ack="; + hash = "sha256-+O371oWfvRvMfjXX6qZj91c7+4MBneZFNcfdrJQNCY8="; }; build-system = [ From 4200a820c2420526d9414567702f1c575ec8700c Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Mon, 9 Feb 2026 17:13:44 -0500 Subject: [PATCH 104/121] python3Packages.snappy-manifolds: add updateScript --- .../python-modules/snappy-manifolds/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/snappy-manifolds/default.nix b/pkgs/development/python-modules/snappy-manifolds/default.nix index 277924130b7f..d9d1fe69baa4 100644 --- a/pkgs/development/python-modules/snappy-manifolds/default.nix +++ b/pkgs/development/python-modules/snappy-manifolds/default.nix @@ -3,6 +3,7 @@ buildPythonPackage, fetchFromGitHub, setuptools, + nix-update-script, }: buildPythonPackage rec { @@ -21,6 +22,13 @@ buildPythonPackage rec { pythonImportsCheck = [ "snappy_manifolds" ]; + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "(.*)_as_released" + ]; + }; + meta = { description = "Database of snappy manifolds"; changelog = "https://github.com/3-manifolds/snappy_manifolds/releases/tag/${src.tag}"; From 97b62f92c8ba93e4c43b596b35a114ae5372ca58 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Mon, 5 Jan 2026 17:13:20 -0600 Subject: [PATCH 105/121] python3Packages.snappy-manifolds: 1.2.1 -> 1.4 --- pkgs/development/python-modules/snappy-manifolds/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/snappy-manifolds/default.nix b/pkgs/development/python-modules/snappy-manifolds/default.nix index d9d1fe69baa4..8136174762bc 100644 --- a/pkgs/development/python-modules/snappy-manifolds/default.nix +++ b/pkgs/development/python-modules/snappy-manifolds/default.nix @@ -8,14 +8,14 @@ buildPythonPackage rec { pname = "snappy-manifolds"; - version = "1.2.1"; + version = "1.4"; pyproject = true; src = fetchFromGitHub { owner = "3-manifolds"; repo = "snappy_manifolds"; tag = "${version}_as_released"; - hash = "sha256-vxG3z6zWzG4S11fBxYGn4/c2f2sWOCIrzT+R27TR144="; + hash = "sha256-e+BoPvg0cuEqLq2f9ZPgqFMEYw7eeSEDkY42+l+kDCk="; }; build-system = [ setuptools ]; From b2a36cb64d7b0b97c128eaa1ebaf88121f79e4eb Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Mon, 9 Feb 2026 17:18:27 -0500 Subject: [PATCH 106/121] python3Packages.spherogram: add checkPhase --- .../python-modules/spherogram/default.nix | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/spherogram/default.nix b/pkgs/development/python-modules/spherogram/default.nix index e71af9540741..1589a8520e0f 100644 --- a/pkgs/development/python-modules/spherogram/default.nix +++ b/pkgs/development/python-modules/spherogram/default.nix @@ -1,14 +1,19 @@ { lib, - buildPythonPackage, fetchFromGitHub, + python, + buildPythonPackage, + + # build-time dependencies setuptools, cython, - networkx, + + # runtime dependencies decorator, knot-floer-homology, - snappy-manifolds, + networkx, snappy-15-knots, + snappy-manifolds, }: buildPythonPackage rec { @@ -39,6 +44,12 @@ buildPythonPackage rec { pythonImportsCheck = [ "spherogram" ]; + checkPhase = '' + runHook preCheck + ${python.interpreter} -m spherogram.test + runHook postCheck + ''; + meta = { description = "Spherical diagrams for 3-manifold topology"; homepage = "https://snappy.computop.org/spherogram.html"; From ee41532961ffc08a8d4b79607c354fa1a4340e40 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Tue, 10 Feb 2026 14:56:28 -0500 Subject: [PATCH 107/121] python3Packages.spherogram: add sage tests see https://github.com/3-manifolds/Spherogram/blob/2.4_as_released/.github/workflows/test.yml#L36 --- .../python-modules/spherogram/default.nix | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/pkgs/development/python-modules/spherogram/default.nix b/pkgs/development/python-modules/spherogram/default.nix index 1589a8520e0f..7af4b90c6cef 100644 --- a/pkgs/development/python-modules/spherogram/default.nix +++ b/pkgs/development/python-modules/spherogram/default.nix @@ -14,6 +14,11 @@ networkx, snappy-15-knots, snappy-manifolds, + + # tests + runCommand, + sage, + writableTmpDirAsHomeHook, }: buildPythonPackage rec { @@ -50,6 +55,25 @@ buildPythonPackage rec { runHook postCheck ''; + passthru.tests.sage = + let + sage' = sage.override { + extraPythonPackages = ps: [ ps.spherogram ]; + requireSageTests = false; + }; + in + runCommand "spherogram-sage-tests" + { + nativeBuildInputs = [ + sage' + writableTmpDirAsHomeHook + ]; + } + '' + sage -python -m spherogram.test + touch $out + ''; + meta = { description = "Spherical diagrams for 3-manifold topology"; homepage = "https://snappy.computop.org/spherogram.html"; From 957535786a80e38ede03d08246381c02d7782840 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Tue, 10 Feb 2026 15:56:59 -0500 Subject: [PATCH 108/121] python3Packages.spherogram: add updateScript --- pkgs/development/python-modules/spherogram/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/spherogram/default.nix b/pkgs/development/python-modules/spherogram/default.nix index 7af4b90c6cef..0c927931e6f2 100644 --- a/pkgs/development/python-modules/spherogram/default.nix +++ b/pkgs/development/python-modules/spherogram/default.nix @@ -3,6 +3,7 @@ fetchFromGitHub, python, buildPythonPackage, + nix-update-script, # build-time dependencies setuptools, @@ -74,6 +75,13 @@ buildPythonPackage rec { touch $out ''; + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "(.*)_as_released" + ]; + }; + meta = { description = "Spherical diagrams for 3-manifold topology"; homepage = "https://snappy.computop.org/spherogram.html"; From f242b99ce753400a94010b94024f2f600fa10452 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Tue, 10 Feb 2026 15:58:44 -0500 Subject: [PATCH 109/121] python3Packages.spherogram: 2.3 -> 2.4.1 --- pkgs/development/python-modules/spherogram/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/spherogram/default.nix b/pkgs/development/python-modules/spherogram/default.nix index 0c927931e6f2..a750664ab817 100644 --- a/pkgs/development/python-modules/spherogram/default.nix +++ b/pkgs/development/python-modules/spherogram/default.nix @@ -24,14 +24,14 @@ buildPythonPackage rec { pname = "spherogram"; - version = "2.3"; + version = "2.4.1"; pyproject = true; src = fetchFromGitHub { owner = "3-manifolds"; repo = "spherogram"; tag = "${version}_as_released"; - hash = "sha256-uqc+3xS4xulXR0tZlNuyC5Zz5OztR6c4PZWpsvU+4Pw="; + hash = "sha256-zQoNuy2rj02GAuRNDufMwA/wQ4U8ZeIADb8LpIvMFOY="; }; build-system = [ From ae0854e9dc621194b733b280acdcef7bb6a2b747 Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Sat, 10 Jan 2026 14:16:46 -0500 Subject: [PATCH 110/121] python3Packages.snappy: add sage tests see https://github.com/3-manifolds/SnapPy/blob/3.3_as_released/.github/workflows/sage_test.yml --- .../python-modules/snappy/default.nix | 44 ++++++++++++++++--- 1 file changed, 38 insertions(+), 6 deletions(-) diff --git a/pkgs/development/python-modules/snappy/default.nix b/pkgs/development/python-modules/snappy/default.nix index b9927c1aeb8b..7c733a29279b 100644 --- a/pkgs/development/python-modules/snappy/default.nix +++ b/pkgs/development/python-modules/snappy/default.nix @@ -1,16 +1,22 @@ { lib, stdenv, - fetchpatch, + fetchFromGitHub, python, buildPythonPackage, - fetchFromGitHub, + fetchpatch, + + # build-time dependencies setuptools, - cypari, cython, + + # non-Python runtime dependencies + libGL, + + # Python runtime dependencies + cypari, fxrays, ipython, - libGL, low-index, packaging, pickleshare, @@ -20,9 +26,16 @@ snappy-15-knots, snappy-manifolds, spherogram, + tkinter-gl, + + # documentation sphinxHook, sphinx-rtd-theme, - tkinter-gl, + + # tests + runCommand, + sage, + writableTmpDirAsHomeHook, }: buildPythonPackage rec { @@ -58,7 +71,7 @@ buildPythonPackage rec { postPatch = lib.optionalString stdenv.hostPlatform.isLinux '' substituteInPlace setup.py \ - --replace-fail "/usr/include/GL" "${libGL.dev}/include/GL" + --replace-fail "/usr/include/GL" "${lib.getDev libGL}/include/GL" substituteInPlace freedesktop/share/applications/snappy.desktop \ --replace-fail "Exec=/usr/bin/env python3 -m snappy.app" "Exec=SnapPy" '' @@ -117,6 +130,25 @@ buildPythonPackage rec { runHook postCheck ''; + passthru.tests.sage = + let + sage' = sage.override { + extraPythonPackages = ps: [ ps.snappy ]; + requireSageTests = false; + }; + in + runCommand "snappy-sage-tests" + { + nativeBuildInputs = [ + sage' + writableTmpDirAsHomeHook + ]; + } + '' + sage -python -m snappy.test --skip-gui + touch $out + ''; + meta = { description = "Studying the topology and geometry of 3-manifolds, with a focus on hyperbolic structures"; changelog = "https://snappy.computop.org/news.html"; From 180adfe6969ab198aa3a97a9a83d0d2af4662f4a Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Mon, 9 Feb 2026 17:24:59 -0500 Subject: [PATCH 111/121] python3Packages.snappy: add updateScript --- pkgs/development/python-modules/snappy/default.nix | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/pkgs/development/python-modules/snappy/default.nix b/pkgs/development/python-modules/snappy/default.nix index 7c733a29279b..4a83665023db 100644 --- a/pkgs/development/python-modules/snappy/default.nix +++ b/pkgs/development/python-modules/snappy/default.nix @@ -5,6 +5,7 @@ python, buildPythonPackage, fetchpatch, + nix-update-script, # build-time dependencies setuptools, @@ -149,6 +150,13 @@ buildPythonPackage rec { touch $out ''; + passthru.updateScript = nix-update-script { + extraArgs = [ + "--version-regex" + "(.*)_as_released" + ]; + }; + meta = { description = "Studying the topology and geometry of 3-manifolds, with a focus on hyperbolic structures"; changelog = "https://snappy.computop.org/news.html"; From b24794f9dc3d62d5d4a74a7da3b4a6d1319d1cce Mon Sep 17 00:00:00 2001 From: Alex Epelde Date: Mon, 5 Jan 2026 17:13:34 -0600 Subject: [PATCH 112/121] python3Packages.snappy: 3.2 -> 3.3.2 --- pkgs/development/python-modules/snappy/default.nix | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/pkgs/development/python-modules/snappy/default.nix b/pkgs/development/python-modules/snappy/default.nix index 4a83665023db..886f52f385b0 100644 --- a/pkgs/development/python-modules/snappy/default.nix +++ b/pkgs/development/python-modules/snappy/default.nix @@ -41,7 +41,7 @@ buildPythonPackage rec { pname = "snappy"; - version = "3.2"; + version = "3.3.2"; pyproject = true; outputs = [ @@ -53,7 +53,7 @@ buildPythonPackage rec { owner = "3-manifolds"; repo = "SnapPy"; tag = "${version}_as_released"; - hash = "sha256-IwPxuyVDsL5yML+J06HTKlz52sYrPkohLJ0XDXDwTlo="; + hash = "sha256-Pl4Nl0LXNvdtQ/EFVQy0QdUA/Fqoz2QAFWW5nz0bv78="; }; patches = [ @@ -62,11 +62,6 @@ buildPythonPackage rec { url = "https://github.com/3-manifolds/SnapPy/commit/c6aeeaaec7010a54e4ebdf2e8dad7b384c2ce8e5.patch"; hash = "sha256-OV3Qr5wO5UHNzVFTPTujIpp5ptel6gvAlcMgrJ8C0KY="; }) - (fetchpatch { - name = "fix-test-aarch64.patch"; - url = "https://github.com/3-manifolds/SnapPy/commit/a8d57db39bc8f486746dc61027779168d0bc316a.patch"; - hash = "sha256-RsuwaR+7UrVTKlPwQeHblTAN++La7b9BSMdFcJSiX5Q="; - }) ]; postPatch = From 506b0000f1fba609f8ac9da6af0364b6c3e3ea1b Mon Sep 17 00:00:00 2001 From: Sarah Clark Date: Sun, 22 Mar 2026 13:10:22 -0700 Subject: [PATCH 113/121] python3Packages.databricks-sdk: allow use of protobuf 7 --- pkgs/development/python-modules/databricks-sdk/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/development/python-modules/databricks-sdk/default.nix b/pkgs/development/python-modules/databricks-sdk/default.nix index 20563abf5b17..b97e4c574a8e 100644 --- a/pkgs/development/python-modules/databricks-sdk/default.nix +++ b/pkgs/development/python-modules/databricks-sdk/default.nix @@ -36,6 +36,11 @@ buildPythonPackage (finalAttrs: { setuptools ]; + pythonRelaxDeps = [ + # For protobuf 7 + "protobuf" + ]; + dependencies = [ google-auth protobuf From d0126b63d30b99f692f28a743aedfeaf0976350d Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 22 Mar 2026 20:43:41 +0000 Subject: [PATCH 114/121] awsbck: 1.0.2 -> 1.0.3 --- pkgs/by-name/aw/awsbck/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/aw/awsbck/package.nix b/pkgs/by-name/aw/awsbck/package.nix index 9201a3508c95..90194cfb5643 100644 --- a/pkgs/by-name/aw/awsbck/package.nix +++ b/pkgs/by-name/aw/awsbck/package.nix @@ -6,16 +6,16 @@ rustPlatform.buildRustPackage (finalAttrs: { pname = "awsbck"; - version = "1.0.2"; + version = "1.0.3"; src = fetchFromGitHub { owner = "beeb"; repo = "awsbck"; rev = "v${finalAttrs.version}"; - hash = "sha256-DU806u9MsZHB+7LmjMgrkaHG+Hi4BJ9OGKkIdDGOhz8="; + hash = "sha256-DZ2k0fwEyfeP24maTuxG2vmQaZuQ4LJo0KaKFTUDSYM="; }; - cargoHash = "sha256-kgPpT79XSMGtnPkl4xrX3sddJQHcNSZlNmCcrxKqzuk="; + cargoHash = "sha256-wydSzfb8GAJYJPNtSyYBUHtN3+9jsGINSex2F3ILQKI="; # tests run in CI on the source repo doCheck = false; From 8a696a2143799bfba74b0be91680d9ea9d28c052 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 22 Mar 2026 20:56:29 +0000 Subject: [PATCH 115/121] python3Packages.pycrashreport: 1.2.7 -> 1.2.8 --- pkgs/development/python-modules/pycrashreport/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/pycrashreport/default.nix b/pkgs/development/python-modules/pycrashreport/default.nix index 05f5cf24022f..79153ee52b87 100644 --- a/pkgs/development/python-modules/pycrashreport/default.nix +++ b/pkgs/development/python-modules/pycrashreport/default.nix @@ -12,14 +12,14 @@ buildPythonPackage rec { pname = "pycrashreport"; - version = "1.2.7"; + version = "1.2.8"; pyproject = true; src = fetchFromGitHub { owner = "doronz88"; repo = "pycrashreport"; tag = "v${version}"; - hash = "sha256-QhHjQO/swoFYKlHaqpaU1qIGwHIK5Eq3ZHrFJEHZbWs="; + hash = "sha256-CjFMixbnRlCT2tnBgpYjnOXg+SJgUtzsVNazPtNyfYQ="; }; build-system = [ From e090adc2cbfd2915657692bfb0f0ae3417aabb42 Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 22 Mar 2026 21:14:11 +0000 Subject: [PATCH 116/121] olympus-unwrapped: 26.02.04.03 -> 26.03.21.03 --- pkgs/by-name/ol/olympus-unwrapped/package.nix | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/ol/olympus-unwrapped/package.nix b/pkgs/by-name/ol/olympus-unwrapped/package.nix index 034c603c4d41..977599560c2b 100644 --- a/pkgs/by-name/ol/olympus-unwrapped/package.nix +++ b/pkgs/by-name/ol/olympus-unwrapped/package.nix @@ -22,9 +22,9 @@ let phome = "$out/lib/olympus"; # The following variables are to be updated by the update script. - version = "26.02.04.03"; - buildId = "5468"; # IMPORTANT: This line is matched with regex in update.sh. - rev = "f11768c2d470d0357a7e07cd3a031b081a6593ab"; + version = "26.03.21.03"; + buildId = "5526"; # IMPORTANT: This line is matched with regex in update.sh. + rev = "cd3c4695cf4be1f1aa59211fcc183f603e6c6343"; in buildDotnetModule { pname = "olympus-unwrapped"; @@ -37,7 +37,7 @@ buildDotnetModule { owner = "EverestAPI"; repo = "Olympus"; fetchSubmodules = true; # Required. See upstream's README. - hash = "sha256-38Rjii6+3DDvNcQQFuTAxY4Wh214QbE6q8yFLNUnAbc="; + hash = "sha256-pKKVdCkeqTIFH0iqpko5LuDj9qqLubD+cltkwo86bXg="; }; nativeBuildInputs = [ From 7caf6f20856abaa0c21345296721f013399933ef Mon Sep 17 00:00:00 2001 From: "R. Ryantm" Date: Sun, 22 Mar 2026 21:21:09 +0000 Subject: [PATCH 117/121] SDL_net: 1.2.8-unstable-2025-04-21 -> 1.2.8-unstable-2026-03-17 --- pkgs/by-name/sd/SDL_net/package.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/by-name/sd/SDL_net/package.nix b/pkgs/by-name/sd/SDL_net/package.nix index 01be8499391f..bab41eca2a78 100644 --- a/pkgs/by-name/sd/SDL_net/package.nix +++ b/pkgs/by-name/sd/SDL_net/package.nix @@ -11,13 +11,13 @@ stdenv.mkDerivation (finalAttrs: { pname = "SDL_net"; - version = "1.2.8-unstable-2025-04-21"; + version = "1.2.8-unstable-2026-03-17"; src = fetchFromGitHub { owner = "libsdl-org"; repo = "SDL_net"; - rev = "e2e041b81747bc01b2c5fb3757a082e525e5d25b"; - hash = "sha256-Nk1OoCIrHMABHuPrJHMlLyyR73px/Xikgz40RpDfonw="; + rev = "cd5a2ebdea1a15b27f503cc7ffdcaf056d047b73"; + hash = "sha256-z3bJYf3PzS0ydoeL0Ay0HOZ9ImKZMyLbVZhD+u5BD6w="; }; nativeBuildInputs = [ From 4daf4c7ad0dd79e8d9a619e07df9ec8026eeb945 Mon Sep 17 00:00:00 2001 From: David McFarland Date: Sun, 22 Mar 2026 18:21:10 -0300 Subject: [PATCH 118/121] dotnet/update.nix: fix update of sdk without bootstrap --- pkgs/development/compilers/dotnet/update.nix | 256 ++++++++++--------- 1 file changed, 130 insertions(+), 126 deletions(-) diff --git a/pkgs/development/compilers/dotnet/update.nix b/pkgs/development/compilers/dotnet/update.nix index aa37f6ea8ee4..405544975f9c 100644 --- a/pkgs/development/compilers/dotnet/update.nix +++ b/pkgs/development/compilers/dotnet/update.nix @@ -57,144 +57,148 @@ let lib.path.removePrefix root path; in -writeScript "update-dotnet-vmr.sh" '' - #! ${nix}/bin/nix-shell - #! nix-shell -i ${runtimeShell} --pure ${drv} --keep UPDATE_NIX_ATTR_PATH - set -euo pipefail +writeScript "update-dotnet-vmr.sh" ( + '' + #! ${nix}/bin/nix-shell + #! nix-shell -i ${runtimeShell} --pure ${drv} --keep UPDATE_NIX_ATTR_PATH + set -euo pipefail - tag=''${1-} + tag=''${1-} - if [[ -n $tag ]]; then - query=$(cat <&2 echo "release is already $tagName" - exit - fi - - tarballUrl=https://github.com/dotnet/dotnet/archive/refs/tags/$tagName.tar.gz - - mapfile -t prefetch < <(nix-prefetch-url --print-path "$tarballUrl") - tarballHash=$(nix-hash --to-sri --type sha256 "''${prefetch[0]}") - tarball=''${prefetch[1]} - - # recent dotnet 10 releases don't have a signature for the github tarball - if [[ ! $sigUrl = */dotnet-source-* ]]; then - curl -fssL "$sigUrl" -o release.sig - - ( - export GNUPGHOME=$PWD/.gnupg - mkdir -m 700 -p $GNUPGHOME - trap 'gpgconf --kill all' EXIT - gpg --no-autostart --batch --import ${releaseKey} - gpg --no-autostart --batch --verify release.sig "$tarball" + if [[ -n $tag ]]; then + query=$(cat <&2 echo "release is already $tagName" + exit + fi - # below needs to be run in nixpkgs because toOutputPath uses relative paths - cd - + tarballUrl=https://github.com/dotnet/dotnet/archive/refs/tags/$tagName.tar.gz - cp "$tmp"/release.json "${toOutputPath releaseManifestFile}" + mapfile -t prefetch < <(nix-prefetch-url --print-path "$tarballUrl") + tarballHash=$(nix-hash --to-sri --type sha256 "''${prefetch[0]}") + tarball=''${prefetch[1]} - jq --null-input \ - --arg _0 "$tarballHash" \ - --arg _1 "$artifactsUrl" \ - --arg _2 "$artifactsHash" \ - '{ - "tarballHash": $_0, - "artifactsUrl": $_1, - "artifactsHash": $_2, - }' > "${toOutputPath releaseInfoFile}" + # recent dotnet 10 releases don't have a signature for the github tarball + if [[ ! $sigUrl = */dotnet-source-* ]]; then + curl -fssL "$sigUrl" -o release.sig - updateSDK() { - ${lib.escapeShellArg (toOutputPath ./update.sh)} \ - -o ${lib.escapeShellArg (toOutputPath bootstrapSdkFile)} --sdk "$1" >&2 - } + ( + export GNUPGHOME=$PWD/.gnupg + mkdir -m 700 -p $GNUPGHOME + trap 'gpgconf --kill all' EXIT + gpg --no-autostart --batch --import ${releaseKey} + gpg --no-autostart --batch --verify release.sig "$tarball" + ) + fi - updateSDK "$sdkVersion" || if [[ $? == 2 ]]; then - >&2 echo "WARNING: bootstrap sdk missing, attempting to bootstrap with self" - updateSDK "$(jq -er .sdkVersion "$tmp"/release.json)" - else - exit 1 - fi + tar --strip-components=1 --no-wildcards-match-slash --wildcards -xzf "$tarball" \*/eng/Versions.props \*/global.json \*/prep\*.sh + artifactsVersion=$(xq -r '.Project.PropertyGroup | + map(select(.PrivateSourceBuiltArtifactsVersion)) + | .[] | .PrivateSourceBuiltArtifactsVersion' eng/Versions.props) - $(nix-build -A $UPDATE_NIX_ATTR_PATH.fetch-deps --no-out-link) >&2 - ) -'' + if [[ "$artifactsVersion" != "" ]]; then + artifactVar=$(grep ^defaultArtifactsRid= prep-source-build.sh) + eval "$artifactVar" + + artifactsFile=Private.SourceBuilt.Artifacts.$artifactsVersion.$defaultArtifactsRid.tar.gz + artifactsUrl=https://builds.dotnet.microsoft.com/${ + if lib.versionAtLeast channel "10" then "dotnet/source-build" else "source-built-artifacts/assets" + }/$artifactsFile + + curl -fsSL "$artifactsUrl" --head || { + [[ $? == 22 ]] + artifactsUrl=https://ci.dot.net/public/source-build/$artifactsFile + } + else + artifactsUrl=$(xq -r '.Project.PropertyGroup | + map(select(.PrivateSourceBuiltArtifactsUrl)) + | .[] | .PrivateSourceBuiltArtifactsUrl' eng/Versions.props) + artifactsUrl="''${artifactsUrl/dotnetcli.azureedge.net/builds.dotnet.microsoft.com}" + fi + + artifactsHash=$(nix-prefetch-url "$artifactsUrl") + artifactsHash=$(nix-hash --to-sri --type sha256 "$artifactsHash") + + sdkVersion=$(jq -er .tools.dotnet global.json) + + # below needs to be run in nixpkgs because toOutputPath uses relative paths + cd - + + cp "$tmp"/release.json "${toOutputPath releaseManifestFile}" + + jq --null-input \ + --arg _0 "$tarballHash" \ + --arg _1 "$artifactsUrl" \ + --arg _2 "$artifactsHash" \ + '{ + "tarballHash": $_0, + "artifactsUrl": $_1, + "artifactsHash": $_2, + }' > "${toOutputPath releaseInfoFile}" + '' + + lib.optionalString (bootstrapSdkFile != null) '' + updateSDK() { + ${lib.escapeShellArg (toOutputPath ./update.sh)} \ + -o ${lib.escapeShellArg (toOutputPath bootstrapSdkFile)} --sdk "$1" >&2 + } + + updateSDK "$sdkVersion" || if [[ $? == 2 ]]; then + >&2 echo "WARNING: bootstrap sdk missing, attempting to bootstrap with self" + updateSDK "$(jq -er .sdkVersion "$tmp"/release.json)" + else + exit 1 + fi + '' + + '' + $(nix-build -A $UPDATE_NIX_ATTR_PATH.fetch-deps --no-out-link) >&2 + ) + '' +) From 6bfef7d6c84c6c5dcd61c7e176d1888d3d2bc255 Mon Sep 17 00:00:00 2001 From: Stefan Frijters Date: Sun, 22 Mar 2026 23:03:08 +0100 Subject: [PATCH 119/121] asciijump: move NIX_CFLAGS_COMPILE into env for structuredAttrs --- pkgs/by-name/as/asciijump/package.nix | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/as/asciijump/package.nix b/pkgs/by-name/as/asciijump/package.nix index cb9659bbec29..06c2e34306b7 100644 --- a/pkgs/by-name/as/asciijump/package.nix +++ b/pkgs/by-name/as/asciijump/package.nix @@ -28,7 +28,9 @@ stdenv.mkDerivation (finalAttrs: { strictDeps = true; enableParallelBuilding = true; - NIX_CFLAGS_COMPILE = [ "-fsigned-char" ]; + env.NIX_CFLAGS_COMPILE = toString [ + "-fsigned-char" + ]; nativeBuildInputs = [ ctags ]; buildInputs = [ slang ]; From 55b504f8d065ddb36673eb8e39fecf957401724a Mon Sep 17 00:00:00 2001 From: kaynetik Date: Wed, 18 Mar 2026 09:12:51 +0100 Subject: [PATCH 120/121] dotenvx: 1.51.1 -> 1.57.2 Changelog: https://github.com/dotenvx/dotenvx/blob/refs/tags/v1.57.2/CHANGELOG.md Signed-off-by: kaynetik Co-authored-by: Michael Daniels --- pkgs/by-name/do/dotenvx/package.nix | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/pkgs/by-name/do/dotenvx/package.nix b/pkgs/by-name/do/dotenvx/package.nix index 9719a83a899a..187634e4e3bb 100644 --- a/pkgs/by-name/do/dotenvx/package.nix +++ b/pkgs/by-name/do/dotenvx/package.nix @@ -8,16 +8,16 @@ buildNpmPackage rec { pname = "dotenvx"; - version = "1.51.4"; + version = "1.57.2"; src = fetchFromGitHub { owner = "dotenvx"; repo = "dotenvx"; tag = "v${version}"; - hash = "sha256-+tPN1ZLYWJ0WHQN7uRYMK13XTTEJy63gOpetiQZjtqY="; + hash = "sha256-OJYE1oK2AJV1zHh1eIx1pdH5N9PQN9n559B+qk2BcXo="; }; - npmDepsHash = "sha256-K75er2hcfWiWDlKAU9BWyZ/peO9LoB5DLBz9vIBnn10="; + npmDepsHash = "sha256-sCwQ43CC9N9FLI7gHY3n80Tjg+lKKc0bqDcw7r2ZC10="; dontNpmBuild = true; @@ -30,11 +30,14 @@ buildNpmPackage rec { }; meta = { - description = "Better dotenv–from the creator of `dotenv"; + description = "Better dotenv–from the creator of `dotenv`"; homepage = "https://github.com/dotenvx/dotenvx"; changelog = "https://github.com/dotenvx/dotenvx/blob/${src.rev}/CHANGELOG.md"; license = lib.licenses.bsd3; - maintainers = with lib.maintainers; [ natsukium ]; + maintainers = with lib.maintainers; [ + natsukium + kaynetik + ]; mainProgram = "dotenvx"; }; } From 3b9033a12a084d213d58c05bf5639bc013800f5b Mon Sep 17 00:00:00 2001 From: Steffen Vogel Date: Fri, 19 Dec 2025 10:07:09 +0100 Subject: [PATCH 121/121] thumper: init at 0.2.1 --- pkgs/by-name/th/thumper/package.nix | 37 +++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 pkgs/by-name/th/thumper/package.nix diff --git a/pkgs/by-name/th/thumper/package.nix b/pkgs/by-name/th/thumper/package.nix new file mode 100644 index 000000000000..252c49388054 --- /dev/null +++ b/pkgs/by-name/th/thumper/package.nix @@ -0,0 +1,37 @@ +{ + lib, + fetchFromGitHub, + rustPlatform, + nix-update-script, + versionCheckHook, +}: +rustPlatform.buildRustPackage (finalAttrs: { + pname = "thumper"; + version = "0.2.1"; + + src = fetchFromGitHub { + owner = "kaaveland"; + repo = "thumper"; + tag = "${finalAttrs.version}"; + hash = "sha256-+W4dBtvqCobxeFa+Zux1/dYVQoO17SscYR8FoAS7KLM="; + }; + + cargoHash = "sha256-m8B0+w0BddK8wQgaFfVUUPYdSDvqfs++A0a0WTIF5Qo="; + + nativeInstallCheckInputs = [ versionCheckHook ]; + doInstallCheck = true; + + passthru = { + updateScript = nix-update-script { }; + }; + + meta = { + description = "Tool to sync files from a local folder into a folder in a BunnyCDN Storage Zone"; + homepage = "https://github.com/kaaveland/thumper"; + changelog = "https://github.com/kaaveland/thumper/releases/tag/${finalAttrs.version}"; + license = with lib.licenses; [ mit ]; + maintainers = with lib.maintainers; [ stv0g ]; + platforms = lib.platforms.all; + mainProgram = "thumper"; + }; +})