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

qtox: Fix compilation on darwin #105065

Merged
merged 3 commits into from Dec 9, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
38 changes: 16 additions & 22 deletions pkgs/applications/networking/instant-messengers/qtox/default.nix
@@ -1,24 +1,19 @@
{ stdenv, mkDerivation, lib, fetchFromGitHub, cmake, pkgconfig
, libtoxcore
, libpthreadstubs, libXdmcp, libXScrnSaver
{ stdenv, mkDerivation, fetchFromGitHub, cmake, pkg-config, perl
, libtoxcore, libpthreadstubs, libXdmcp, libXScrnSaver
, qtbase, qtsvg, qttools, qttranslations
, ffmpeg_3, filter-audio, libexif, libsodium, libopus
, libvpx, openal, pcre, qrencode, sqlcipher
, AVFoundation ? null }:
, AVFoundation }:

let
version = "1.17.3";
rev = "v${version}";

in mkDerivation {
mkDerivation rec {
pname = "qtox";
inherit version;
version = "1.17.3";

src = fetchFromGitHub {
owner = "qTox";
repo = "qTox";
owner = "qTox";
repo = "qTox";
rev = "v${version}";
sha256 = "19xgw9bqirxbgvj5cdh20qxh61pkwk838lq1l78n6py1qrs7z5wp";
inherit rev;
};

buildInputs = [
Expand All @@ -27,25 +22,24 @@ in mkDerivation {
qtbase qtsvg qttranslations
ffmpeg_3 filter-audio libexif libopus libsodium
libvpx openal pcre qrencode sqlcipher
] ++ lib.optionals stdenv.isDarwin [ AVFoundation] ;

nativeBuildInputs = [ cmake pkgconfig qttools ];
] ++ stdenv.lib.optionals stdenv.isDarwin [ AVFoundation] ;

enableParallelBuilding = true;
nativeBuildInputs = [ cmake pkg-config qttools ]
++ stdenv.lib.optionals stdenv.isDarwin [ perl ];

cmakeFlags = [
"-DGIT_DESCRIBE=${rev}"
"-DGIT_DESCRIBE=v${version}"
"-DENABLE_STATUSNOTIFIER=False"
"-DENABLE_GTK_SYSTRAY=False"
"-DENABLE_APPINDICATOR=False"
"-DTIMESTAMP=1"
];

meta = with lib; {
meta = with stdenv.lib; {
description = "Qt Tox client";
homepage = "https://tox.chat";
license = licenses.gpl3;
homepage = "https://tox.chat";
license = licenses.gpl3;
maintainers = with maintainers; [ akaWolf peterhoeg ];
platforms = platforms.all;
platforms = platforms.all;
};
}
2 changes: 1 addition & 1 deletion pkgs/os-specific/darwin/apple-sdk/frameworks.nix
Expand Up @@ -6,7 +6,7 @@

with frameworks; with libs; {
AGL = { inherit Carbon OpenGL; };
AVFoundation = { inherit ApplicationServices CoreGraphics; };
AVFoundation = { inherit ApplicationServices CoreGraphics CoreMedia MediaToolbox; };
AVKit = {};
Accounts = {};
AddressBook = { inherit libobjc Carbon ContactsPersistence; };
Expand Down
4 changes: 3 additions & 1 deletion pkgs/top-level/all-packages.nix
Expand Up @@ -23605,7 +23605,9 @@ in

qtemu = libsForQt5.callPackage ../applications/virtualization/qtemu { };

qtox = libsForQt5.callPackage ../applications/networking/instant-messengers/qtox { };
qtox = libsForQt5.callPackage ../applications/networking/instant-messengers/qtox {
inherit (darwin.apple_sdk.frameworks) AVFoundation;
};

qtpass = libsForQt5.callPackage ../applications/misc/qtpass { };

Expand Down