From 756145d09abfb649a57d7154edda1b7ff9bf9558 Mon Sep 17 00:00:00 2001 From: emaryn Date: Sun, 8 Jun 2025 21:40:30 +0800 Subject: [PATCH] weasis: 4.5.1 -> 4.6.1 Diff: https://github.com/nroduit/Weasis/compare/v4.5.1...v4.6.1 Changelog: https://github.com/nroduit/Weasis/releases/tag/v4.6.1 --- pkgs/by-name/we/weasis/package.nix | 36 ++++++++++++++---------------- 1 file changed, 17 insertions(+), 19 deletions(-) diff --git a/pkgs/by-name/we/weasis/package.nix b/pkgs/by-name/we/weasis/package.nix index cd2a81853fe9..3978f8236141 100644 --- a/pkgs/by-name/we/weasis/package.nix +++ b/pkgs/by-name/we/weasis/package.nix @@ -2,34 +2,32 @@ lib, stdenv, fetchzip, - jdk23, + jdk24, copyDesktopItems, makeDesktopItem, }: let - throwSystem = throw "Unsupported system: ${stdenv.system}"; - platform = - { - "x86_64-linux" = "linux-x86-64"; - } - .${stdenv.system} or throwSystem; + selectSystem = + attrs: + attrs.${stdenv.hostPlatform.system} or (throw "Unsupported system: ${stdenv.hostPlatform.system}"); + platform = selectSystem { + "x86_64-linux" = "linux-x86-64"; + }; in -stdenv.mkDerivation rec { +stdenv.mkDerivation (finalAttrs: { pname = "weasis"; - version = "4.5.1"; + version = "4.6.1"; # Their build instructions indicate to use the packaging script src = fetchzip { - url = "https://github.com/nroduit/Weasis/releases/download/v${version}/weasis-native.zip"; - hash = "sha256-aGoTSOZ1W8JHQ0+FcJ9RZ47A1LfXJOoGNmVDiUd9zxE="; + url = "https://github.com/nroduit/Weasis/releases/download/v${finalAttrs.version}/weasis-native.zip"; + hash = "sha256-poBMlSjaT4Mx4CV/19S7Dzk48RsgeKrBxl9KXRDzWrc="; stripRoot = false; }; - nativeBuildInputs = [ - copyDesktopItems - ]; + nativeBuildInputs = [ copyDesktopItems ]; desktopItems = [ (makeDesktopItem { @@ -44,7 +42,7 @@ stdenv.mkDerivation rec { exec = "Weasis"; icon = "Weasis"; desktopName = "Weasis"; - comment = meta.description; + comment = finalAttrs.meta.description; }) ]; @@ -55,7 +53,7 @@ stdenv.mkDerivation rec { buildPhase = '' runHook preBuild - ./build/script/package-weasis.sh --no-installer --jdk ${jdk23} + ./build/script/package-weasis.sh --no-installer --jdk ${jdk24} runHook postBuild ''; @@ -65,7 +63,7 @@ stdenv.mkDerivation rec { mkdir -p $out/share/{applications,pixmaps} - mv weasis-${platform}-jdk${lib.versions.major jdk23.version}-${version}/Weasis/* $out/ + mv weasis-${platform}-jdk${lib.versions.major jdk24.version}-${finalAttrs.version}/Weasis/* $out/ mv $out/lib/*.png $out/share/pixmaps/ runHook postInstall @@ -75,7 +73,7 @@ stdenv.mkDerivation rec { description = "Multipurpose standalone and web-based DICOM viewer with a highly modular architecture"; homepage = "https://weasis.org"; # Using changelog from releases as it is more accurate - changelog = "https://github.com/nroduit/Weasis/releases/tag/v${version}"; + changelog = "https://github.com/nroduit/Weasis/releases/tag/v${finalAttrs.version}"; license = with lib.licenses; [ asl20 epl20 @@ -84,4 +82,4 @@ stdenv.mkDerivation rec { platforms = [ "x86_64-linux" ]; mainProgram = "Weasis"; }; -} +})