From cb0e792f3221d8343e9ce48ff9fbbb2a4acf5f5b Mon Sep 17 00:00:00 2001 From: Simon Gardling Date: Sat, 21 Mar 2026 08:39:56 -0400 Subject: [PATCH] syncstorage-rs: 0.21.1-unstable-2026-01-26 -> 0.22.2 --- pkgs/by-name/sy/syncstorage-rs/package.nix | 19 +++++++++++++++---- 1 file changed, 15 insertions(+), 4 deletions(-) diff --git a/pkgs/by-name/sy/syncstorage-rs/package.nix b/pkgs/by-name/sy/syncstorage-rs/package.nix index ae0684f2a674..4a9d103d51b6 100644 --- a/pkgs/by-name/sy/syncstorage-rs/package.nix +++ b/pkgs/by-name/sy/syncstorage-rs/package.nix @@ -1,5 +1,6 @@ { fetchFromGitHub, + fetchurl, rustPlatform, pkg-config, python3, @@ -19,17 +20,23 @@ let p.tokenlib p.cryptography ]); + # utoipa-swagger-ui downloads Swagger UI assets at build time. + # Prefetch the archive for sandboxed builds. + swaggerUi = fetchurl { + url = "https://github.com/swagger-api/swagger-ui/archive/refs/tags/v5.17.14.zip"; + hash = "sha256-SBJE0IEgl7Efuu73n3HZQrFxYX+cn5UU5jrL4T5xzNw="; + }; in rustPlatform.buildRustPackage (finalAttrs: { pname = "syncstorage-rs"; - version = "0.21.1-unstable-2026-01-26"; + version = "0.22.2"; src = fetchFromGitHub { owner = "mozilla-services"; repo = "syncstorage-rs"; - rev = "11659d98f9c69948a0aab353437ce2036c388711"; - hash = "sha256-G37QvxTNh/C3gmKG0UYHI6QBr0F+KLGRNI/Sx33uOsc="; + rev = "refs/tags/${finalAttrs.version}"; + hash = "sha256-hEDa9hk00QvMY86zrtTq3+UOmbNehDb7Ya8St9u6IuA="; }; nativeBuildInputs = [ @@ -43,12 +50,16 @@ rustPlatform.buildRustPackage (finalAttrs: { libmysqlclient ]; + env = { + SWAGGER_UI_DOWNLOAD_URL = "file://${swaggerUi}"; + }; + preFixup = '' wrapProgram $out/bin/syncserver \ --prefix PATH : ${lib.makeBinPath [ pyFxADeps ]} ''; - cargoHash = "sha256-9Dcf5mDyK/XjsKTlCPXTHoBkIq+FFPDg1zfK24Y9nHQ="; + cargoHash = "sha256-lTjvRTenmxYAYS5HB32x19DLkdd09jeWOhUbzt7TQ4Y="; # almost all tests need a DB to test against doCheck = false;