mirror of
https://github.com/TriliumNext/Notes.git
synced 2025-07-27 18:12:29 +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
|
lib
|
||||||
makeBinaryWrapper
|
makeBinaryWrapper
|
||||||
makeDesktopItem
|
makeDesktopItem
|
||||||
|
makeShellWrapper
|
||||||
moreutils
|
moreutils
|
||||||
removeReferencesTo
|
removeReferencesTo
|
||||||
stdenv
|
stdenv
|
||||||
@ -102,15 +103,20 @@
|
|||||||
|
|
||||||
extraNativeBuildInputs =
|
extraNativeBuildInputs =
|
||||||
[
|
[
|
||||||
makeBinaryWrapper
|
|
||||||
moreutils # sponge
|
moreutils # sponge
|
||||||
nodejs.python
|
nodejs.python
|
||||||
removeReferencesTo
|
removeReferencesTo
|
||||||
]
|
]
|
||||||
++ lib.optionals (app == "desktop") [
|
++ lib.optionals (app == "desktop") [
|
||||||
copyDesktopItems
|
copyDesktopItems
|
||||||
|
# required for NIXOS_OZONE_WL expansion
|
||||||
|
# https://github.com/NixOS/nixpkgs/issues/172583
|
||||||
|
makeShellWrapper
|
||||||
wrapGAppsHook3
|
wrapGAppsHook3
|
||||||
]
|
]
|
||||||
|
++ lib.optionals (app == "server") [
|
||||||
|
makeBinaryWrapper
|
||||||
|
]
|
||||||
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
++ lib.optionals stdenv.hostPlatform.isDarwin [
|
||||||
xcodebuild
|
xcodebuild
|
||||||
darwin.cctools
|
darwin.cctools
|
||||||
@ -187,8 +193,9 @@
|
|||||||
mkdir -p $out/{bin,share/icons/hicolor/512x512/apps,opt/trilium}
|
mkdir -p $out/{bin,share/icons/hicolor/512x512/apps,opt/trilium}
|
||||||
cp --archive apps/desktop/dist/* $out/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
|
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[@]}" \
|
"''${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 \
|
--set-default ELECTRON_IS_DEV 0 \
|
||||||
--add-flags $out/opt/trilium/main.cjs
|
--add-flags $out/opt/trilium/main.cjs
|
||||||
'';
|
'';
|
||||||
|
Loading…
x
Reference in New Issue
Block a user