From b224b4db27f88deb08216e8b59e004ad210a2515 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 26 Nov 2020 20:14:13 +0100 Subject: [PATCH 1/3] qtox: Fix compilation on darwin, remove parallelBuilds, cleanups --- .../instant-messengers/qtox/default.nix | 38 ++++++++----------- pkgs/top-level/all-packages.nix | 4 +- 2 files changed, 19 insertions(+), 23 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/qtox/default.nix b/pkgs/applications/networking/instant-messengers/qtox/default.nix index 952182def26..2605d6dc081 100644 --- a/pkgs/applications/networking/instant-messengers/qtox/default.nix +++ b/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 = [ @@ -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] ; + ] ++ stdenv.lib.optionals stdenv.isDarwin [ AVFoundation] ; - nativeBuildInputs = [ cmake pkgconfig qttools ]; - - 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; }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 8d4fab92a52..bc2451be96b 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -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 { }; From eb1d742813a59dcee35cfc2c0702d482e56809a3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 26 Nov 2020 20:13:28 +0100 Subject: [PATCH 2/3] apple_sdk.frameworks.AVFoundation: Add missing CoreMedia This fixes apple-framework-AVFoundation/Library/Frameworks/AVFoundation.framework/Headers/AVAsset.h:17:9: fatal error: 'CoreMedia/CMTime.h' file not found --- pkgs/os-specific/darwin/apple-sdk/frameworks.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix index bf0b134773d..5f454fa4efe 100644 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -6,7 +6,7 @@ with frameworks; with libs; { AGL = { inherit Carbon OpenGL; }; - AVFoundation = { inherit ApplicationServices CoreGraphics; }; + AVFoundation = { inherit ApplicationServices CoreGraphics CoreMedia; }; AVKit = {}; Accounts = {}; AddressBook = { inherit libobjc Carbon ContactsPersistence; }; From 848d1986b859a0eb49148dfe3bc5e2efc9ae810e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sandro=20J=C3=A4ckel?= Date: Thu, 26 Nov 2020 20:16:04 +0100 Subject: [PATCH 3/3] apple_sdk.frameworks.AVFoundation: Add missing MediaToolbox This fixes: /nix/store/7ckpydmlah3j86py3c4f27p0fbkxyzfi-apple-framework-AVFoundation/Library/Frameworks/AVFoundation.framework/Headers/AVAudioMix.h:15:9: fatal error: 'MediaToolbox/MTAudioProcessingTap.h' file not found --- pkgs/os-specific/darwin/apple-sdk/frameworks.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix index 5f454fa4efe..d3b00e6a6a6 100644 --- a/pkgs/os-specific/darwin/apple-sdk/frameworks.nix +++ b/pkgs/os-specific/darwin/apple-sdk/frameworks.nix @@ -6,7 +6,7 @@ with frameworks; with libs; { AGL = { inherit Carbon OpenGL; }; - AVFoundation = { inherit ApplicationServices CoreGraphics CoreMedia; }; + AVFoundation = { inherit ApplicationServices CoreGraphics CoreMedia MediaToolbox; }; AVKit = {}; Accounts = {}; AddressBook = { inherit libobjc Carbon ContactsPersistence; };