mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 10:02:59 +08:00
feat(flake): Wayland support
This commit is contained in:
parent
f56ba7295a
commit
e8f2f0f577
11
flake.nix
11
flake.nix
@ -30,6 +30,7 @@
|
||||
lib
|
||||
makeBinaryWrapper
|
||||
makeDesktopItem
|
||||
makeShellWrapper
|
||||
moreutils
|
||||
removeReferencesTo
|
||||
stdenv
|
||||
@ -102,15 +103,20 @@
|
||||
|
||||
extraNativeBuildInputs =
|
||||
[
|
||||
makeBinaryWrapper
|
||||
moreutils # sponge
|
||||
nodejs.python
|
||||
removeReferencesTo
|
||||
]
|
||||
++ lib.optionals (app == "desktop") [
|
||||
copyDesktopItems
|
||||
# required for NIXOS_OZONE_WL expansion
|
||||
# https://github.com/NixOS/nixpkgs/issues/172583
|
||||
makeShellWrapper
|
||||
wrapGAppsHook3
|
||||
]
|
||||
++ lib.optionals (app == "server") [
|
||||
makeBinaryWrapper
|
||||
]
|
||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||
xcodebuild
|
||||
darwin.cctools
|
||||
@ -187,8 +193,9 @@
|
||||
mkdir -p $out/{bin,share/icons/hicolor/512x512/apps,opt/trilium}
|
||||
cp --archive apps/desktop/dist/* $out/opt/trilium
|
||||
cp apps/client/src/assets/icon.png $out/share/icons/hicolor/512x512/apps/trilium.png
|
||||
makeWrapper ${lib.getExe electron} $out/bin/trilium \
|
||||
makeShellWrapper ${lib.getExe electron} $out/bin/trilium \
|
||||
"''${gappsWrapperArgs[@]}" \
|
||||
--add-flags "\''${NIXOS_OZONE_WL:+\''${WAYLAND_DISPLAY:+--ozone-platform-hint=auto --enable-features=WaylandWindowDecorations --enable-wayland-ime=true}}" \
|
||||
--set-default ELECTRON_IS_DEV 0 \
|
||||
--add-flags $out/opt/trilium/main.cjs
|
||||
'';
|
||||
|
Loading…
x
Reference in New Issue
Block a user