summary refs log tree commit diff
path: root/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix
diff options
context:
space:
mode:
authorIlya Fedin <fedin-ilja2010@ya.ru>2021-12-05 09:40:46 +0400
committerIlya Fedin <fedin-ilja2010@ya.ru>2022-03-17 02:26:24 +0400
commit1a8e99e7f84d5e1047d7c92d8f4f8a52c86cf442 (patch)
tree5d1903bd9660bde48ad14cd0ee236e296f49733e /pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix
parentd3367563ef18942b88bbe057e4cd557d2319e01b (diff)
downloadnixpkgs-1a8e99e7f84d5e1047d7c92d8f4f8a52c86cf442.tar
nixpkgs-1a8e99e7f84d5e1047d7c92d8f4f8a52c86cf442.tar.gz
nixpkgs-1a8e99e7f84d5e1047d7c92d8f4f8a52c86cf442.tar.bz2
nixpkgs-1a8e99e7f84d5e1047d7c92d8f4f8a52c86cf442.tar.lz
nixpkgs-1a8e99e7f84d5e1047d7c92d8f4f8a52c86cf442.tar.xz
nixpkgs-1a8e99e7f84d5e1047d7c92d8f4f8a52c86cf442.tar.zst
nixpkgs-1a8e99e7f84d5e1047d7c92d8f4f8a52c86cf442.zip
kotatogram-desktop: add Darwin support
tdesktop and kotatogram both have macos builds, so it shouldn't be hard to make them available in nixpkgs
Diffstat (limited to 'pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix')
-rw-r--r--pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix42
1 files changed, 41 insertions, 1 deletions
diff --git a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix
index e6a2f0f9501..fe62270b8e8 100644
--- a/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix
+++ b/pkgs/applications/networking/instant-messengers/telegram/kotatogram-desktop/tg_owt.nix
@@ -27,6 +27,21 @@
 , mesa
 , libglvnd
 , libepoxy
+, Cocoa
+, AppKit
+, IOKit
+, IOSurface
+, Foundation
+, AVFoundation
+, CoreMedia
+, VideoToolbox
+, CoreGraphics
+, CoreVideo
+, OpenGL
+, Metal
+, MetalKit
+, CoreFoundation
+, ApplicationServices
 }:
 
 stdenv.mkDerivation {
@@ -41,6 +56,11 @@ stdenv.mkDerivation {
     fetchSubmodules = true;
   };
 
+  patches = [
+    # let it build with nixpkgs 10.12 sdk
+    ./tg_owt-10.12-sdk.patch
+  ];
+
   outputs = [ "out" "dev" ];
 
   nativeBuildInputs = [ pkg-config cmake ninja yasm ];
@@ -54,6 +74,8 @@ stdenv.mkDerivation {
     openh264
     usrsctp
     libvpx
+    abseil-cpp
+  ] ++ lib.optionals stdenv.isLinux [
     libX11
     libXtst
     libXcomposite
@@ -63,13 +85,31 @@ stdenv.mkDerivation {
     libXrandr
     libXi
     glib
-    abseil-cpp
     pipewire
     mesa
     libepoxy
     libglvnd
+  ] ++ lib.optionals stdenv.isDarwin [
+    Cocoa
+    AppKit
+    IOKit
+    IOSurface
+    Foundation
+    AVFoundation
+    CoreMedia
+    VideoToolbox
+    CoreGraphics
+    CoreVideo
+    OpenGL
+    Metal
+    MetalKit
+    CoreFoundation
+    ApplicationServices
   ];
 
+  # https://github.com/NixOS/nixpkgs/issues/130963
+  NIX_LDFLAGS = lib.optionalString stdenv.isDarwin "-lc++abi";
+
   enableParallelBuilding = true;
 
   propagatedBuildInputs = [