keybase: add cf-private on darwin

Undefined symbols for architecture x86_64:
      "_OBJC_CLASS_$_NSData", referenced from:
          objc-class-ref in _x002.o
      "_OBJC_CLASS_$_NSDictionary", referenced from:
          objc-class-ref in _x002.o
      "_OBJC_CLASS_$_NSURL", referenced from:
          objc-class-ref in _x002.o
    ld: symbol(s) not found for architecture x86_64
This commit is contained in:
Daiderd Jordan 2018-11-07 19:56:56 +01:00
parent 388a868d6d
commit be9fc0d669
No known key found for this signature in database
GPG key ID: D02435D05B810C96
2 changed files with 10 additions and 4 deletions

View file

@ -1,6 +1,7 @@
{ stdenv, lib, buildGoPackage, fetchFromGitHub
, AVFoundation ? null, AudioToolbox ? null, ImageIO ? null, CoreMedia ? null
, Foundation ? null, CoreGraphics ? null, MediaToolbox ? null }:
{ stdenv, lib, buildGoPackage, fetchFromGitHub, cf-private
, AVFoundation, AudioToolbox, ImageIO, CoreMedia
, Foundation, CoreGraphics, MediaToolbox
}:
buildGoPackage rec {
name = "keybase-${version}";
@ -18,7 +19,11 @@ buildGoPackage rec {
sha256 = "1sw6v3vf544vp8grw8p287cx078mr9v0v1wffcj6f9p9shlwj7ic";
};
buildInputs = lib.optionals stdenv.isDarwin [ AVFoundation AudioToolbox ImageIO CoreMedia Foundation CoreGraphics MediaToolbox ];
buildInputs = lib.optionals stdenv.isDarwin [
AVFoundation AudioToolbox ImageIO CoreMedia Foundation CoreGraphics MediaToolbox
# Needed for OBJC_CLASS_$_NSData symbols.
cf-private
];
buildFlags = [ "-tags production" ];
meta = with stdenv.lib; {

View file

@ -3594,6 +3594,7 @@ with pkgs;
kexectools = callPackage ../os-specific/linux/kexectools { };
keybase = callPackage ../tools/security/keybase {
inherit (darwin) cf-private;
# Reasoning for the inherited apple_sdk.frameworks:
# 1. specific compiler errors about: AVFoundation, AudioToolbox, MediaToolbox
# 2. the rest are added from here: https://github.com/keybase/client/blob/68bb8c893c5214040d86ea36f2f86fbb7fac8d39/go/chat/attachments/preview_darwin.go#L7