From 1024111f7c25c270474510fcdc6dafb241b8ea71 Mon Sep 17 00:00:00 2001 From: Nikita Uvarov Date: Sat, 24 Oct 2026 21:28:56 +0200 Subject: [PATCH 1/2] filebrowser-quantum: 1.5.2-stable -> 2.0.2-stable Assisted-by: Claude Code (Claude Opus 5.5) --- doc/release-notes/rl-2611.section.md | 2 ++ .../fi/filebrowser-quantum/package.nix | 28 +++++++++++-------- 2 files changed, 19 insertions(+), 11 deletions(-) diff --git a/doc/release-notes/rl-2611.section.md b/doc/release-notes/rl-2611.section.md index 0fcee2392c7d..8f84b25f6aff 100644 --- a/doc/release-notes/rl-2611.section.md +++ b/doc/release-notes/rl-2611.section.md @@ -248,6 +248,8 @@ - `comodoro` has been updated from 0.1.2 to 2.0.0, which brings the breaking changes of both major releases; see the [upstream changelog](https://github.com/pimalaya/comodoro/blob/v2.0.0/CHANGELOG.md). +- `filebrowser-quantum` has been updated from `1.5.2-stable` to `2.0.2-stable`, which requires a database migration and config changes. See the [migration guide](https://filebrowserquantum.com/en/docs/getting-started/v2/migration/) and the [upstream changelog](https://github.com/gtsteffaniak/filebrowser/blob/v2.0.0-stable/CHANGELOG.md) before upgrading. + - `tengine` has been removed as it has seen seriously delayed responses to security vulnerabilities. - `jellyfin` has been upgraded to major version 12, which contains breaking changes. See the [upstream blog post](https://jellyfin.org/posts/jellyfin-release-12.0) for more information on how to safely upgrade. diff --git a/pkgs/by-name/fi/filebrowser-quantum/package.nix b/pkgs/by-name/fi/filebrowser-quantum/package.nix index 665923bd291f..315c33db8296 100644 --- a/pkgs/by-name/fi/filebrowser-quantum/package.nix +++ b/pkgs/by-name/fi/filebrowser-quantum/package.nix @@ -1,19 +1,19 @@ { lib, fetchFromGitHub, - buildGoModule, + buildGo127Module, buildNpmPackage, nix-update-script, }: let - version = "1.5.2-stable"; + version = "2.0.2-stable"; src = fetchFromGitHub { owner = "gtsteffaniak"; repo = "filebrowser"; tag = "v${version}"; - hash = "sha256-1qG6IayTqL4x3CqJyvVSG8Fu4s6ywhWI9t1j9c+wTZM="; + hash = "sha256-xzbEB0V+0Yfmc42dAAGMCfSIwPaWoNgwAKYcSFINcmc="; }; frontend = buildNpmPackage { @@ -21,12 +21,12 @@ let inherit version src; sourceRoot = "${src.name}/frontend"; - npmDepsHash = "sha256-J1PddXU79T0GVcAgxYEW/vraqYxbTvASw8RmW8dDeOw="; + npmDepsHash = "sha256-ZJZtHaeNpHV7n3cT0m7YmBuIGM8CObp3IdQWdSiqbKc="; buildPhase = '' runHook preBuild - npm run build:docker + npm run build:docker -- --outDir dist runHook postBuild ''; @@ -42,17 +42,23 @@ let }; in -buildGoModule { +buildGo127Module { pname = "filebrowser-quantum"; inherit version src; sourceRoot = "${src.name}/backend"; - vendorHash = "sha256-YAMh0WMe1zDCJq8BuPcekb1J8RvRoxOmsZarKI1ZWcs="; + excludedPackages = [ "/scripts/" ]; + + vendorHash = "sha256-P3H5kESEd1X5tl0EQyIm680fKz/18KegoPBp1jb69vo="; + + # Tests open database fixtures in _docker for writing + postUnpack = '' + chmod -R u+w ${src.name}/_docker + ''; preBuild = '' - mkdir -p http/embed - cp -r ${frontend}/* http/embed/ + cp -r ${frontend}/* internal/web/embed/ ''; postInstall = '' @@ -62,8 +68,8 @@ buildGoModule { ldflags = [ "-w" "-s" - "-X github.com/gtsteffaniak/filebrowser/backend/version.CommitSHA=testingCommit" - "-X github.com/gtsteffaniak/filebrowser/backend/version.Version=testing" + "-X github.com/gtsteffaniak/filebrowser/backend/internal/version.CommitSHA=testingCommit" + "-X github.com/gtsteffaniak/filebrowser/backend/internal/version.Version=testing" ]; passthru.updateScript = nix-update-script { }; From 95055ae210dc4cc77a9ca81880edfe6c450a0dd6 Mon Sep 17 00:00:00 2001 From: Nikita Uvarov Date: Sat, 24 Oct 2026 21:33:06 +0200 Subject: [PATCH 2/2] filebrowser-quantum: fix updateScript Assisted-by: Claude Code (Claude Opus 5.5) --- pkgs/by-name/fi/filebrowser-quantum/package.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/pkgs/by-name/fi/filebrowser-quantum/package.nix b/pkgs/by-name/fi/filebrowser-quantum/package.nix index 315c33db8296..738ce19e31a0 100644 --- a/pkgs/by-name/fi/filebrowser-quantum/package.nix +++ b/pkgs/by-name/fi/filebrowser-quantum/package.nix @@ -61,6 +61,12 @@ buildGo127Module { cp -r ${frontend}/* internal/web/embed/ ''; + # goModules inherits preBuild, which would make it depend on the frontend; + # nix-update then records the npmDepsHash mismatch as vendorHash + overrideModAttrs = { + preBuild = ""; + }; + postInstall = '' mv $out/bin/backend $out/bin/filebrowser-quantum ''; @@ -72,7 +78,15 @@ buildGo127Module { "-X github.com/gtsteffaniak/filebrowser/backend/internal/version.Version=testing" ]; - passthru.updateScript = nix-update-script { }; + passthru = { + inherit frontend; + updateScript = nix-update-script { + extraArgs = [ + "--subpackage" + "frontend" + ]; + }; + }; meta = { description = "Access and manage your files from the web";