Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

neovide: fix build on darwin #146052

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions pkgs/applications/editors/neovim/neovide/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,18 @@
, stdenv
, enableWayland ? stdenv.isLinux
, wayland
, xcbuild
, xorg
# Apple frameworks
SuperSandro2000 marked this conversation as resolved.
Show resolved Hide resolved
, AppKit
, ApplicationServices
, Carbon
, CoreFoundation
, CoreGraphics
, CoreVideo
, Foundation
, OpenGL
, QuartzCore
}:
rustPlatform.buildRustPackage rec {
pname = "neovide";
Expand Down Expand Up @@ -73,6 +84,8 @@ rustPlatform.buildRustPackage rec {
makeWrapper
python2 # skia-bindings
llvmPackages.clang # skia
] ++ lib.optionals stdenv.isDarwin [
xcbuild
];

# All tests passes but at the end cargo prints for unknown reason:
Expand All @@ -96,6 +109,16 @@ rustPlatform.buildRustPackage rec {
}))
];
}))
] ++ lib.optionals stdenv.isDarwin [
AppKit
ApplicationServices
Carbon
CoreFoundation
CoreGraphics
CoreVideo
Foundation
OpenGL
QuartzCore
];

postFixup = let
Expand Down
4 changes: 4 additions & 0 deletions pkgs/build-support/rust/default-crate-overrides.nix
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ in
buildInputs = [ freetype ];
};

skia-bindings = attrs: {
nativeBuildInputs = lib.optionals stdenv.isDarwin [ xcbuild ];
};

thrussh-libsodium = attrs: {
nativeBuildInputs = [ pkg-config ];
buildInputs = [ libsodium ];
Expand Down
13 changes: 12 additions & 1 deletion pkgs/top-level/all-packages.nix
Original file line number Diff line number Diff line change
Expand Up @@ -28673,7 +28673,18 @@ with pkgs;

gnvim = callPackage ../applications/editors/neovim/gnvim/wrapper.nix { };

neovide = callPackage ../applications/editors/neovim/neovide { };
neovide = callPackage ../applications/editors/neovim/neovide {
inherit (darwin.apple_sdk.frameworks)
AppKit
ApplicationServices
Carbon
CoreFoundation
CoreGraphics
CoreVideo
Foundation
OpenGL
QuartzCore;
};

neovim-remote = callPackage ../applications/editors/neovim/neovim-remote.nix { };

Expand Down