This repository was archived by the owner on Jun 24, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 3030 lib
3131 makeBinaryWrapper
3232 makeDesktopItem
33+ makeShellWrapper
3334 moreutils
3435 removeReferencesTo
3536 stdenv
102103
103104 extraNativeBuildInputs =
104105 [
105- makeBinaryWrapper
106106 moreutils # sponge
107107 nodejs . python
108108 removeReferencesTo
109109 ]
110110 ++ lib . optionals ( app == "desktop" ) [
111111 copyDesktopItems
112+ # required for NIXOS_OZONE_WL expansion
113+ # https://github.com/NixOS/nixpkgs/issues/172583
114+ makeShellWrapper
112115 wrapGAppsHook3
113116 ]
117+ ++ lib . optionals ( app == "server" ) [
118+ makeBinaryWrapper
119+ ]
114120 ++ lib . optionals stdenv . hostPlatform . isDarwin [
115121 xcodebuild
116122 darwin . cctools
187193 mkdir -p $out/{bin,share/icons/hicolor/512x512/apps,opt/trilium}
188194 cp --archive apps/desktop/dist/* $out/opt/trilium
189195 cp apps/client/src/assets/icon.png $out/share/icons/hicolor/512x512/apps/trilium.png
190- makeWrapper ${ lib . getExe electron } $out/bin/trilium \
196+ makeShellWrapper ${ lib . getExe electron } $out/bin/trilium \
191197 "'' ${gappsWrapperArgs[@]}" \
198+ --add-flags "\'' ${NIXOS_OZONE_WL:+\'' ${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
192199 --set-default ELECTRON_IS_DEV 0 \
193200 --add-flags $out/opt/trilium/main.cjs
194201 '' ;
You can’t perform that action at this time.
0 commit comments