From 24b7f415e6d08370a5f0908066a286adfc368360 Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 21 Oct 2021 20:17:46 +0300 Subject: [PATCH 1/2] neovide: only enable wayland on linux --- .../editors/neovim/neovide/default.nix | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/editors/neovim/neovide/default.nix b/pkgs/applications/editors/neovim/neovide/default.nix index a40ff76eea34..e6443e21eac3 100644 --- a/pkgs/applications/editors/neovim/neovide/default.nix +++ b/pkgs/applications/editors/neovim/neovide/default.nix @@ -17,6 +17,8 @@ , makeFontsConf , libglvnd , libxkbcommon +, stdenv +, enableWayland ? stdenv.isLinux , wayland , xorg }: @@ -96,9 +98,18 @@ rustPlatform.buildRustPackage rec { })) ]; - postFixup = '' + postFixup = let + libPath = lib.makeLibraryPath ([ + libglvnd + libxkbcommon + xorg.libXcursor + xorg.libXext + xorg.libXrandr + xorg.libXi + ] ++ lib.optionals enableWayland [ wayland ]); + in '' wrapProgram $out/bin/neovide \ - --prefix LD_LIBRARY_PATH : ${lib.makeLibraryPath [ libglvnd libxkbcommon wayland xorg.libXcursor xorg.libXext xorg.libXrandr xorg.libXi ]} + --prefix LD_LIBRARY_PATH : ${libPath} ''; postInstall = '' From abe0a8608b3d36c35ec93dfb6898c4d29d1d20bb Mon Sep 17 00:00:00 2001 From: Artturin Date: Thu, 21 Oct 2021 20:51:25 +0300 Subject: [PATCH 2/2] neovide: support darwin --- pkgs/applications/editors/neovim/neovide/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/applications/editors/neovim/neovide/default.nix b/pkgs/applications/editors/neovim/neovide/default.nix index e6443e21eac3..c2a696cd425b 100644 --- a/pkgs/applications/editors/neovim/neovide/default.nix +++ b/pkgs/applications/editors/neovim/neovide/default.nix @@ -126,7 +126,7 @@ rustPlatform.buildRustPackage rec { homepage = "https://github.com/Kethku/neovide"; license = with licenses; [ mit ]; maintainers = with maintainers; [ ck3d ]; - platforms = platforms.linux; + platforms = platforms.unix; mainProgram = "neovide"; }; }