Merge pull request #170139 from marsam/fix-lapce-darwin

lapce: fix build on darwin
main
Mario Rodas 2 years ago committed by GitHub
commit 58679e6a4f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 22
      pkgs/applications/editors/lapce/default.nix
  2. 5
      pkgs/top-level/all-packages.nix

@ -17,6 +17,13 @@
, vulkan-loader
, copyDesktopItems
, makeDesktopItem
, openssl
, libobjc
, Security
, CoreServices
, ApplicationServices
, Carbon
, AppKit
}:
rustPlatform.buildRustPackage rec {
@ -40,7 +47,12 @@ rustPlatform.buildRustPackage rec {
copyDesktopItems
];
# Get openssl-sys to use pkg-config
OPENSSL_NO_VENDOR = 1;
buildInputs = [
openssl
] ++ lib.optionals stdenv.isLinux [
freetype
fontconfig
libxkbcommon
@ -50,10 +62,17 @@ rustPlatform.buildRustPackage rec {
libXrandr
libXi
vulkan-loader
] ++ lib.optionals stdenv.isDarwin [
libobjc
Security
CoreServices
ApplicationServices
Carbon
AppKit
];
# Add missing vulkan dependency to rpath
preFixup = ''
preFixup = lib.optionalString stdenv.isLinux ''
patchelf --add-needed ${vulkan-loader}/lib/libvulkan.so.1 $out/bin/lapce
'';
@ -76,6 +95,5 @@ rustPlatform.buildRustPackage rec {
homepage = "https://github.com/lapce/lapce";
license = with licenses; [ asl20 ];
maintainers = with maintainers; [ elliot ];
broken = stdenv.isDarwin;
};
}

@ -3749,7 +3749,10 @@ with pkgs;
inherit (darwin.apple_sdk.frameworks) Security;
};
lapce = callPackage ../applications/editors/lapce { };
lapce = callPackage ../applications/editors/lapce {
inherit (darwin) libobjc;
inherit (darwin.apple_sdk.frameworks) Security CoreServices ApplicationServices Carbon AppKit;
};
lcdproc = callPackage ../servers/monitoring/lcdproc { };

Loading…
Cancel
Save