From a924ba8266d6241500cdb51f0b96db41d7d0012a Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Wed, 29 Apr 2026 17:54:37 +0200 Subject: [PATCH 01/10] python3Packages.viser: update github org name I checked the hash is unchanged, but that trigger a rebuild thanks https://github.com/NixOS/nixpkgs/issues/514132 --- pkgs/development/python-modules/viser/default.nix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/pkgs/development/python-modules/viser/default.nix b/pkgs/development/python-modules/viser/default.nix index 169aa0c75566..13316cf2e98f 100644 --- a/pkgs/development/python-modules/viser/default.nix +++ b/pkgs/development/python-modules/viser/default.nix @@ -55,7 +55,7 @@ buildPythonPackage rec { pyproject = true; src = fetchFromGitHub { - owner = "nerfstudio-project"; + owner = "viser-project"; repo = "viser"; tag = "v${version}"; hash = "sha256-usnvEvuBNPrqRXV7jh0qw1ppmZgAe1CUhAwd/M5CvC0="; @@ -145,7 +145,7 @@ buildPythonPackage rec { ]; meta = { - changelog = "https://github.com/nerfstudio-project/viser/releases/tag/${src.tag}"; + changelog = "https://github.com/viser-project/viser/releases/tag/${src.tag}"; description = "Web-based 3D visualization + Python"; homepage = "https://github.com/nerfstudio-project/viser"; license = lib.licenses.asl20; From 83a016df52441c04917dbc90d05c58bc4b8ed7f3 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Wed, 29 Apr 2026 17:56:08 +0200 Subject: [PATCH 02/10] python3Packages.viser: switch to finalAttrs checked no rebuild --- pkgs/development/python-modules/viser/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/pkgs/development/python-modules/viser/default.nix b/pkgs/development/python-modules/viser/default.nix index 13316cf2e98f..32338fb25d3a 100644 --- a/pkgs/development/python-modules/viser/default.nix +++ b/pkgs/development/python-modules/viser/default.nix @@ -49,7 +49,7 @@ pytestCheckHook, }: -buildPythonPackage rec { +buildPythonPackage (finalAttrs: { pname = "viser"; version = "1.0.20"; pyproject = true; @@ -57,7 +57,7 @@ buildPythonPackage rec { src = fetchFromGitHub { owner = "viser-project"; repo = "viser"; - tag = "v${version}"; + tag = "v${finalAttrs.version}"; hash = "sha256-usnvEvuBNPrqRXV7jh0qw1ppmZgAe1CUhAwd/M5CvC0="; }; @@ -81,7 +81,7 @@ buildPythonPackage rec { ]; yarnOfflineCache = fetchYarnDeps { - yarnLock = src + "/src/viser/client/yarn.lock"; + yarnLock = finalAttrs.src + "/src/viser/client/yarn.lock"; hash = "sha256-4x+zJIqjVoKmEdOUPGpCuMmlRBfF++3oWtbNYAvd2ko="; }; @@ -145,10 +145,10 @@ buildPythonPackage rec { ]; meta = { - changelog = "https://github.com/viser-project/viser/releases/tag/${src.tag}"; + changelog = "https://github.com/viser-project/viser/releases/tag/${finalAttrs.src.tag}"; description = "Web-based 3D visualization + Python"; homepage = "https://github.com/nerfstudio-project/viser"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ nim65s ]; }; -} +}) From 2803d2befb5c59139a8716941cce8917836c9e80 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 30 Apr 2026 00:57:08 +0200 Subject: [PATCH 03/10] python3Packages.viser: 1.0.20 -> 1.0.26 --- .../python-modules/viser/default.nix | 111 ++++++++++++------ 1 file changed, 78 insertions(+), 33 deletions(-) diff --git a/pkgs/development/python-modules/viser/default.nix b/pkgs/development/python-modules/viser/default.nix index 32338fb25d3a..1e06627196aa 100644 --- a/pkgs/development/python-modules/viser/default.nix +++ b/pkgs/development/python-modules/viser/default.nix @@ -6,8 +6,8 @@ # nativeBuildInputs nodejs, - fetchYarnDeps, - yarnConfigHook, + fetchNpmDeps, + npmHooks, # build-system hatchling, @@ -15,79 +15,78 @@ # dependencies imageio, msgspec, - nodeenv, numpy, - opencv-python, - plyfile, - psutil, requests, rich, - scikit-image, - scipy, tqdm, trimesh, typing-extensions, websockets, yourdfpy, + zstandard, # optional-dependencies hypothesis, + liblzfse, + nodeenv, + opencv-python, + playwright, pre-commit, - pandas, + psutil, pyright, pytest, + pytest-playwright, + pytest-xdist, ruff, gdown, matplotlib, + pandas, plotly, - # pyliblzfse, + plyfile, robot-descriptions, torch, tyro, # nativeCheckInputs pytestCheckHook, + playwright-driver, }: buildPythonPackage (finalAttrs: { pname = "viser"; - version = "1.0.20"; + version = "1.0.26"; pyproject = true; src = fetchFromGitHub { owner = "viser-project"; repo = "viser"; tag = "v${finalAttrs.version}"; - hash = "sha256-usnvEvuBNPrqRXV7jh0qw1ppmZgAe1CUhAwd/M5CvC0="; + hash = "sha256-qmHgjXBTJB0ka+QM+wmiUIXS+upeH3MxjAU9wHePWMY="; }; postPatch = '' - # prepare yarn offline cache + # prepare npm offline cache mkdir -p node_modules cd src/viser/client - cp package.json yarn.lock ../../.. + cp package.json package-lock.json ../../.. ln -s ../../../node_modules - - # fix: [vite-plugin-eslint] Failed to load config "react-app" to extend from. - substituteInPlace vite.config.mts --replace-fail \ - "eslint({ failOnError: false, failOnWarning: false })," "" - cd ../../.. ''; nativeBuildInputs = [ - yarnConfigHook + npmHooks.npmConfigHook nodejs ]; - yarnOfflineCache = fetchYarnDeps { - yarnLock = finalAttrs.src + "/src/viser/client/yarn.lock"; - hash = "sha256-4x+zJIqjVoKmEdOUPGpCuMmlRBfF++3oWtbNYAvd2ko="; + npmDeps = fetchNpmDeps { + name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps"; + src = finalAttrs.src + "/src/viser/client/"; + hash = "sha256-pV8xc+dQA8Z2EpQoIxzUlH2cZJoGKB03cP6GglGdn58="; }; preBuild = '' cd src/viser/client - yarn --offline build + npm --offline run build cd ../../.. ''; @@ -98,37 +97,39 @@ buildPythonPackage (finalAttrs: { dependencies = [ imageio msgspec - nodeenv numpy - opencv-python - plyfile - psutil requests rich - scikit-image - scipy tqdm trimesh typing-extensions websockets yourdfpy + zstandard ]; optional-dependencies = { dev = [ hypothesis + nodeenv + opencv-python + playwright pre-commit + psutil pyright pytest + pytest-playwright + pytest-xdist ruff ]; examples = [ gdown + liblzfse matplotlib + opencv-python pandas plotly plyfile - # pyliblzfse robot-descriptions torch tyro @@ -137,17 +138,61 @@ buildPythonPackage (finalAttrs: { nativeCheckInputs = [ hypothesis + playwright-driver pytestCheckHook ]; + checkInputs = finalAttrs.passthru.optional-dependencies.dev; + + env = { + PLAYWRIGHT_BROWSERS_PATH = playwright-driver.browsers; + PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD = true; + PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = true; + }; + + disabledTests = [ + # AssertionError: Locator expected to be visible + "test_modal_renders_with_content[chromium]" + "test_rgb_color_picker_renders[chromium]" + "test_rgb_server_update[chromium]" + "test_rgba_color_picker_renders[chromium]" + "test_vector2_renders[chromium]" + "test_vector2_initial_values[chromium]" + "test_vector3_renders[chromium]" + "test_vector3_server_update[chromium]" + "test_slider_renders[chromium]" + "test_text_input_renders_with_value[chromium]" + "test_number_input_renders[chromium]" + "test_dropdown_renders[chromium]" + "test_dropdown_with_initial_value[chromium]" + "test_markdown_renders[chromium]" + "test_folder_renders_and_contains_children[chromium]" + "test_folder_collapse_toggle[chromium]" + "test_server_updates_text_value[chromium]" + "test_text_input_change_callback[chromium]" + "test_dropdown_selection_callback[chromium]" + "test_server_value_update_round_trip[chromium]" + + # playwright._impl._errors.TimeoutError: Locator.wait_for: Timeout 5000ms exceeded. + # (same issue with 20s) + "test_long_underscore_label_wraps_within_container[chromium]" + + # AssertionError: Locator expected to have Value 'initial' + "test_gui_state_sync_text[chromium]" + + # assert 0 != 0 + # (only when xdist) + "test_server_port_is_freed" + ]; + pythonImportsCheck = [ "viser" ]; meta = { changelog = "https://github.com/viser-project/viser/releases/tag/${finalAttrs.src.tag}"; - description = "Web-based 3D visualization + Python"; - homepage = "https://github.com/nerfstudio-project/viser"; + description = "Web-based 3D visualization in Python"; + homepage = "https://github.com/viser-project/viser"; license = lib.licenses.asl20; maintainers = with lib.maintainers; [ nim65s ]; }; From dd5d84b8bf6f1ef3f97ae1f630596052c548999f Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Thu, 7 May 2026 01:44:03 +0200 Subject: [PATCH 04/10] python3Packages.viser: 1.0.26 -> 1.0.27 Diff: https://github.com/viser-project/viser/compare/v1.0.26...v1.0.27 Changelog: https://github.com/viser-project/viser/releases/tag/v1.0.27 --- pkgs/development/python-modules/viser/default.nix | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pkgs/development/python-modules/viser/default.nix b/pkgs/development/python-modules/viser/default.nix index 1e06627196aa..8ef63b058a34 100644 --- a/pkgs/development/python-modules/viser/default.nix +++ b/pkgs/development/python-modules/viser/default.nix @@ -54,14 +54,14 @@ buildPythonPackage (finalAttrs: { pname = "viser"; - version = "1.0.26"; + version = "1.0.27"; pyproject = true; src = fetchFromGitHub { owner = "viser-project"; repo = "viser"; tag = "v${finalAttrs.version}"; - hash = "sha256-qmHgjXBTJB0ka+QM+wmiUIXS+upeH3MxjAU9wHePWMY="; + hash = "sha256-qE9V6KjniKm3vBtf5ger6UHob4go0wTaJnmYtvYqvMc="; }; postPatch = '' @@ -81,7 +81,7 @@ buildPythonPackage (finalAttrs: { npmDeps = fetchNpmDeps { name = "${finalAttrs.pname}-${finalAttrs.version}-npm-deps"; src = finalAttrs.src + "/src/viser/client/"; - hash = "sha256-pV8xc+dQA8Z2EpQoIxzUlH2cZJoGKB03cP6GglGdn58="; + hash = "sha256-fAFN/JCUVSvRDGfq39E3V+dhqp1i6vFG/j8wKmOva4c="; }; preBuild = '' From 956827ecda0ff59f815033bc932423a1f3a2055a Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Sun, 10 May 2026 13:40:17 +0200 Subject: [PATCH 05/10] python3Packages.viser: disable more flaky tests --- pkgs/development/python-modules/viser/default.nix | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/pkgs/development/python-modules/viser/default.nix b/pkgs/development/python-modules/viser/default.nix index 8ef63b058a34..617746916f31 100644 --- a/pkgs/development/python-modules/viser/default.nix +++ b/pkgs/development/python-modules/viser/default.nix @@ -150,7 +150,12 @@ buildPythonPackage (finalAttrs: { PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = true; }; + # flaky tests disabledTests = [ + # AssertionError: Locator expected to be hidden + "test_fuzzy_search_filters_commands[chromium]" + "test_form_dirty_shows_on_sender[chromium]" + # AssertionError: Locator expected to be visible "test_modal_renders_with_content[chromium]" "test_rgb_color_picker_renders[chromium]" @@ -172,11 +177,20 @@ buildPythonPackage (finalAttrs: { "test_text_input_change_callback[chromium]" "test_dropdown_selection_callback[chromium]" "test_server_value_update_round_trip[chromium]" + "test_form_dirty_clears_on_submit_to_peer[chromium]" # playwright._impl._errors.TimeoutError: Locator.wait_for: Timeout 5000ms exceeded. # (same issue with 20s) "test_long_underscore_label_wraps_within_container[chromium]" + # playwright._impl._errors.TargetClosedError: Browser.new_context: Target page, context or browser has been closed + "test_late_joining_client_sees_dirty_form[chromium]" + "test_per_client_form_dirty_is_isolated[chromium]" + "test_late_joining_client_sees_state[chromium]" + "test_scene_node_drag_callbacks[chromium]" + "test_scene_node_drag_filter_rejects_wrong_modifier[chromium]" + "test_form_dirty_syncs_to_peer[chromium]" + # AssertionError: Locator expected to have Value 'initial' "test_gui_state_sync_text[chromium]" From 6f4e7e74f58453d7a86ebefac18532268f90936e Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Fri, 15 May 2026 17:50:22 +0200 Subject: [PATCH 06/10] python3Packages.viser: exclude pre-commit from checkInputs Co-authored-by: Peder Bergebakken Sundt <140964+pbsds@users.noreply.github.com> --- pkgs/development/python-modules/viser/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/viser/default.nix b/pkgs/development/python-modules/viser/default.nix index 617746916f31..19c4859c4126 100644 --- a/pkgs/development/python-modules/viser/default.nix +++ b/pkgs/development/python-modules/viser/default.nix @@ -142,7 +142,8 @@ buildPythonPackage (finalAttrs: { pytestCheckHook ]; - checkInputs = finalAttrs.passthru.optional-dependencies.dev; + # adding pre-commit here break PYTHONPATH in 3.14 + checkInputs = lib.filter (p: p.pname != "pre-commit") finalAttrs.passthru.optional-dependencies.dev; env = { PLAYWRIGHT_BROWSERS_PATH = playwright-driver.browsers; From b782a6bcb8723f4b36ca260ed35b9291de895b6d Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Fri, 15 May 2026 17:55:58 +0200 Subject: [PATCH 07/10] python3Packages.viser: flaky test --- pkgs/development/python-modules/viser/default.nix | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pkgs/development/python-modules/viser/default.nix b/pkgs/development/python-modules/viser/default.nix index 19c4859c4126..a7693ef6af0c 100644 --- a/pkgs/development/python-modules/viser/default.nix +++ b/pkgs/development/python-modules/viser/default.nix @@ -181,8 +181,9 @@ buildPythonPackage (finalAttrs: { "test_form_dirty_clears_on_submit_to_peer[chromium]" # playwright._impl._errors.TimeoutError: Locator.wait_for: Timeout 5000ms exceeded. - # (same issue with 20s) "test_long_underscore_label_wraps_within_container[chromium]" + "test_command_description_update[chromium]" + "test_command_icon_update[chromium]" # playwright._impl._errors.TargetClosedError: Browser.new_context: Target page, context or browser has been closed "test_late_joining_client_sees_dirty_form[chromium]" From 6a8aed7f5d80ead68f26cd07507f53d8e32cce76 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Sat, 16 May 2026 01:28:13 +0200 Subject: [PATCH 08/10] python3Packages.viser: test only x86_64-linux --- pkgs/development/python-modules/viser/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/viser/default.nix b/pkgs/development/python-modules/viser/default.nix index a7693ef6af0c..f1c08c11d063 100644 --- a/pkgs/development/python-modules/viser/default.nix +++ b/pkgs/development/python-modules/viser/default.nix @@ -1,6 +1,7 @@ { lib, + stdenv, buildPythonPackage, fetchFromGitHub, @@ -201,6 +202,9 @@ buildPythonPackage (finalAttrs: { "test_server_port_is_freed" ]; + # 96 failed, 577 passed, 14 warnings on aarch64-linux + doInstallCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64; + pythonImportsCheck = [ "viser" ]; From 82d51aae65a54e52689e48ee1b78fa303aa80baa Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Sat, 16 May 2026 14:03:56 +0200 Subject: [PATCH 09/10] python3Packages.viser: disable all tests/e2e --- .../python-modules/viser/default.nix | 51 ++----------------- 1 file changed, 4 insertions(+), 47 deletions(-) diff --git a/pkgs/development/python-modules/viser/default.nix b/pkgs/development/python-modules/viser/default.nix index f1c08c11d063..1c8b1b9a2c76 100644 --- a/pkgs/development/python-modules/viser/default.nix +++ b/pkgs/development/python-modules/viser/default.nix @@ -152,59 +152,16 @@ buildPythonPackage (finalAttrs: { PLAYWRIGHT_SKIP_VALIDATE_HOST_REQUIREMENTS = true; }; - # flaky tests + disabledTestPaths = [ + # too many flaky tests + "tests/e2e" + ]; disabledTests = [ - # AssertionError: Locator expected to be hidden - "test_fuzzy_search_filters_commands[chromium]" - "test_form_dirty_shows_on_sender[chromium]" - - # AssertionError: Locator expected to be visible - "test_modal_renders_with_content[chromium]" - "test_rgb_color_picker_renders[chromium]" - "test_rgb_server_update[chromium]" - "test_rgba_color_picker_renders[chromium]" - "test_vector2_renders[chromium]" - "test_vector2_initial_values[chromium]" - "test_vector3_renders[chromium]" - "test_vector3_server_update[chromium]" - "test_slider_renders[chromium]" - "test_text_input_renders_with_value[chromium]" - "test_number_input_renders[chromium]" - "test_dropdown_renders[chromium]" - "test_dropdown_with_initial_value[chromium]" - "test_markdown_renders[chromium]" - "test_folder_renders_and_contains_children[chromium]" - "test_folder_collapse_toggle[chromium]" - "test_server_updates_text_value[chromium]" - "test_text_input_change_callback[chromium]" - "test_dropdown_selection_callback[chromium]" - "test_server_value_update_round_trip[chromium]" - "test_form_dirty_clears_on_submit_to_peer[chromium]" - - # playwright._impl._errors.TimeoutError: Locator.wait_for: Timeout 5000ms exceeded. - "test_long_underscore_label_wraps_within_container[chromium]" - "test_command_description_update[chromium]" - "test_command_icon_update[chromium]" - - # playwright._impl._errors.TargetClosedError: Browser.new_context: Target page, context or browser has been closed - "test_late_joining_client_sees_dirty_form[chromium]" - "test_per_client_form_dirty_is_isolated[chromium]" - "test_late_joining_client_sees_state[chromium]" - "test_scene_node_drag_callbacks[chromium]" - "test_scene_node_drag_filter_rejects_wrong_modifier[chromium]" - "test_form_dirty_syncs_to_peer[chromium]" - - # AssertionError: Locator expected to have Value 'initial' - "test_gui_state_sync_text[chromium]" - # assert 0 != 0 # (only when xdist) "test_server_port_is_freed" ]; - # 96 failed, 577 passed, 14 warnings on aarch64-linux - doInstallCheck = stdenv.hostPlatform.isLinux && stdenv.hostPlatform.isx86_64; - pythonImportsCheck = [ "viser" ]; From b1adeb7a381c67872fb9bf1bbb6370af4e8c3ce1 Mon Sep 17 00:00:00 2001 From: Guilhem Saurel Date: Sat, 16 May 2026 14:20:19 +0200 Subject: [PATCH 10/10] python3Packages.viser: just one more disabled test --- pkgs/development/python-modules/viser/default.nix | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/pkgs/development/python-modules/viser/default.nix b/pkgs/development/python-modules/viser/default.nix index 1c8b1b9a2c76..8a24fecbd8b6 100644 --- a/pkgs/development/python-modules/viser/default.nix +++ b/pkgs/development/python-modules/viser/default.nix @@ -160,6 +160,10 @@ buildPythonPackage (finalAttrs: { # assert 0 != 0 # (only when xdist) "test_server_port_is_freed" + + # counts ffmpeg pids, can be confused when + # building multiple times this package in parallel + "test_process_termination" ]; pythonImportsCheck = [