From d8a8f66ef75f452e588f986f860b959aef58920c Mon Sep 17 00:00:00 2001 From: Emily Date: Wed, 18 Feb 2026 08:11:46 +0000 Subject: [PATCH] libreoffice-bin: drop `x86_64-darwin` from update script --- .../office/libreoffice/darwin/default.nix | 20 +++++-------------- .../office/libreoffice/darwin/update.nix | 6 ++---- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/pkgs/applications/office/libreoffice/darwin/default.nix b/pkgs/applications/office/libreoffice/darwin/default.nix index a2fdd448cdec..eb613364c8f3 100644 --- a/pkgs/applications/office/libreoffice/darwin/default.nix +++ b/pkgs/applications/office/libreoffice/darwin/default.nix @@ -12,22 +12,15 @@ let version = "26.2.4"; dist = { - aarch64-darwin = rec { - arch = "aarch64"; - archSuffix = arch; - url = "https://download.documentfoundation.org/libreoffice/stable/${version}/mac/${arch}/LibreOffice_${version}_MacOS_${archSuffix}.dmg"; - sha256 = "64e0ad05564554eeee639d49b08b20908a38d4722ec95f1620d05c99bcbe9fb1"; - }; + url = "https://download.documentfoundation.org/libreoffice/stable/${version}/mac/aarch64/LibreOffice_${version}_MacOS_aarch64.dmg"; + sha256 = "64e0ad05564554eeee639d49b08b20908a38d4722ec95f1620d05c99bcbe9fb1"; }; in stdenvNoCC.mkDerivation { inherit version; pname = "libreoffice"; src = fetchurl { - inherit - (dist.${stdenvNoCC.hostPlatform.system} - or (throw "Unsupported system: ${stdenvNoCC.hostPlatform.system}") - ) + inherit (dist) url sha256 ; @@ -52,16 +45,13 @@ stdenvNoCC.mkDerivation { let defaultNixFile = toString ./default.nix; updateNix = toString ./update.nix; - aarch64Url = dist."aarch64-darwin".url; - x86_64Url = dist."x86_64-darwin".url; in writeScript "update-libreoffice.sh" '' #!/usr/bin/env nix-shell - #!nix-shell -i bash --argstr aarch64Url ${aarch64Url} --argstr x86_64Url ${x86_64Url} --argstr version ${version} ${updateNix} + #!nix-shell -i bash --argstr url ${dist.url} --argstr version ${version} ${updateNix} set -eou pipefail - update-source-version libreoffice-bin $newVersion $newAarch64Sha256 --file=${defaultNixFile} --system=aarch64-darwin --ignore-same-version - update-source-version libreoffice-bin $newVersion $newX86_64Sha256 --file=${defaultNixFile} --system=x86_64-darwin --ignore-same-version + update-source-version libreoffice-bin $newVersion $newSha256 --file=${defaultNixFile} --ignore-same-version ''; meta = { diff --git a/pkgs/applications/office/libreoffice/darwin/update.nix b/pkgs/applications/office/libreoffice/darwin/update.nix index f3c5c758b428..17f4c69cf85e 100644 --- a/pkgs/applications/office/libreoffice/darwin/update.nix +++ b/pkgs/applications/office/libreoffice/darwin/update.nix @@ -1,7 +1,6 @@ # Impure functions, for passthru.updateScript runtime only { - aarch64Url, - x86_64Url, + url, version, pkgs ? import ../../../../../default.nix { }, }: @@ -14,6 +13,5 @@ in pkgs.mkShell rec { buildInputs = [ pkgs.common-updater-scripts ]; newVersion = getLatestStableVersion; - newAarch64Sha256 = getSha256 aarch64Url version newVersion; - newX86_64Sha256 = getSha256 x86_64Url version newVersion; + newSha256 = getSha256 url version newVersion; }