about summary refs log tree commit diff
path: root/pkgs/applications/editors/lapce/default.nix
diff options
context:
space:
mode:
authorMario Rodas <marsam@users.noreply.github.com>2022-04-23 04:20:00 +0000
committerMario Rodas <marsam@users.noreply.github.com>2022-04-23 04:20:00 +0000
commit55c3e3b030b7628ce1b9cb7593f50bbe0cc78292 (patch)
tree23bc006184e1cdfe775ad5f29a6bdeaae9692472 /pkgs/applications/editors/lapce/default.nix
parentf05a7480582998007b810e2ef806a3ec876aa181 (diff)
lapce: fix build on darwin
Diffstat (limited to 'pkgs/applications/editors/lapce/default.nix')
-rw-r--r--pkgs/applications/editors/lapce/default.nix22
1 files changed, 20 insertions, 2 deletions
diff --git a/pkgs/applications/editors/lapce/default.nix b/pkgs/applications/editors/lapce/default.nix
index 2da2a1f46773d..d13b4c05302db 100644
--- a/pkgs/applications/editors/lapce/default.nix
+++ b/pkgs/applications/editors/lapce/default.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;
   };
 }