From 0976ddb447486f808afa74987f36baa58594cba4 Mon Sep 17 00:00:00 2001 From: Mukul Agarwal Date: Mon, 6 Jul 2026 19:24:25 -0400 Subject: [PATCH] zotero: change all instances of targetPlatform to hostPlatform (cherry picked from commit f4b1bade01b2239ab315431df7f1199b270bb440) --- pkgs/by-name/zo/zotero/package.nix | 24 +++++++++++------------- 1 file changed, 11 insertions(+), 13 deletions(-) diff --git a/pkgs/by-name/zo/zotero/package.nix b/pkgs/by-name/zo/zotero/package.nix index f9759391318b..87f409fcef08 100644 --- a/pkgs/by-name/zo/zotero/package.nix +++ b/pkgs/by-name/zo/zotero/package.nix @@ -181,10 +181,10 @@ buildNpmPackage (finalAttrs: { rsync copyDesktopItems ] - ++ lib.optionals stdenv.targetPlatform.isDarwin [ + ++ lib.optionals stdenv.hostPlatform.isDarwin [ makeBinaryWrapper ] - ++ lib.optionals (!stdenv.targetPlatform.isDarwin) [ + ++ lib.optionals (!stdenv.hostPlatform.isDarwin) [ wrapGAppsHook3 ]; @@ -246,12 +246,12 @@ buildNpmPackage (finalAttrs: { # The correct firefox version can be found in zotero/app/config.sh at `GECKO_VERSION_LINUX`. mkdir -p app/xulrunner/ '' - + lib.optionalString stdenv.targetPlatform.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' cp -r "${firefox-esr-140-unwrapped}/Applications/Firefox ESR.app" app/xulrunner/Firefox.app '' - + lib.optionalString (!stdenv.targetPlatform.isDarwin) '' - cp -r "${firefox-esr-140-unwrapped}/lib/firefox" "app/xulrunner/firefox-${stdenv.targetPlatform.parsed.kernel.name}-${ - lib.replaceString "aarch64" "arm64" stdenv.targetPlatform.parsed.cpu.name + + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' + cp -r "${firefox-esr-140-unwrapped}/lib/firefox" "app/xulrunner/firefox-${stdenv.hostPlatform.parsed.kernel.name}-${ + lib.replaceString "aarch64" "arm64" stdenv.hostPlatform.parsed.cpu.name }" '' + '' @@ -260,9 +260,7 @@ buildNpmPackage (finalAttrs: { build_dir=$(mktemp -d) ./app/scripts/prepare_build -s ./build -o "$build_dir" -c release ./app/build.sh -d "$build_dir" -c release -s \ - ${ - if stdenv.targetPlatform.isDarwin then "-p m" else "-p l -a ${zoteroArch stdenv.targetPlatform}" - } + ${if stdenv.hostPlatform.isDarwin then "-p m" else "-p l -a ${zoteroArch stdenv.hostPlatform}"} runHook postBuild ''; @@ -306,12 +304,12 @@ buildNpmPackage (finalAttrs: { installPhase = '' runHook preInstall '' - + lib.optionalString stdenv.targetPlatform.isDarwin '' + + lib.optionalString stdenv.hostPlatform.isDarwin '' # Copy package contents mkdir -p $out/Applications cp -r app/staging/Zotero.app $out/Applications/ '' - + lib.optionalString (!stdenv.targetPlatform.isDarwin) '' + + lib.optionalString (!stdenv.hostPlatform.isDarwin) '' # Copy package contents mkdir -p $out/lib/ cp -r app/staging/*/. $out/lib/ @@ -330,7 +328,7 @@ buildNpmPackage (finalAttrs: { runHook postInstall ''; - preFixup = lib.optionalString (!stdenv.targetPlatform.isDarwin) '' + preFixup = lib.optionalString (!stdenv.hostPlatform.isDarwin) '' gappsWrapperArgs+=(--suffix LD_LIBRARY_PATH : ${ lib.makeLibraryPath [ libGL @@ -340,7 +338,7 @@ buildNpmPackage (finalAttrs: { }) ''; - postFixup = lib.optionalString stdenv.targetPlatform.isDarwin '' + postFixup = lib.optionalString stdenv.hostPlatform.isDarwin '' mkdir -p $out/bin makeWrapper $out/Applications/Zotero.app/Contents/MacOS/zotero $out/bin/zotero '';