From 8e3b74171da04dec217866ce89e6c6c453ca23e0 Mon Sep 17 00:00:00 2001 From: waelwindows Date: Sat, 15 Apr 2023 02:15:15 +0300 Subject: [PATCH 1/4] cpp-utilities: Add Darwin support --- pkgs/development/libraries/cpp-utilities/default.nix | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/pkgs/development/libraries/cpp-utilities/default.nix b/pkgs/development/libraries/cpp-utilities/default.nix index 8fc767530caf..f2681736975e 100644 --- a/pkgs/development/libraries/cpp-utilities/default.nix +++ b/pkgs/development/libraries/cpp-utilities/default.nix @@ -3,6 +3,7 @@ , fetchFromGitHub , cmake , cppunit +, iconv }: stdenv.mkDerivation rec { @@ -18,19 +19,23 @@ stdenv.mkDerivation rec { nativeBuildInputs = [ cmake ]; nativeCheckInputs = [ cppunit ]; + buildInputs = lib.optionals stdenv.isDarwin [ + iconv # needed on Darwin, see https://github.com/Martchus/cpp-utilities/issues/4 + ]; # Otherwise, tests fail since the resulting shared object libc++utilities.so is only available in PWD of the make files preCheck = '' checkFlagsArray+=( "LD_LIBRARY_PATH=$PWD" ) ''; - doCheck = true; + # tests fail on Darwin + doCheck = !stdenv.isDarwin; meta = with lib; { homepage = "https://github.com/Martchus/cpp-utilities"; description = "Common C++ classes and routines used by @Martchus' applications featuring argument parser, IO and conversion utilities"; license = licenses.gpl2Plus; maintainers = with maintainers; [ doronbehar ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } From 1dffb0f917025ef0447511eadcc0f2205ef799e1 Mon Sep 17 00:00:00 2001 From: waelwindows Date: Sat, 15 Apr 2023 02:17:28 +0300 Subject: [PATCH 2/4] qtutilities: Add Darwin to supported platforms --- pkgs/development/libraries/qtutilities/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/qtutilities/default.nix b/pkgs/development/libraries/qtutilities/default.nix index cc68ae8d9276..f6bdc39eec37 100644 --- a/pkgs/development/libraries/qtutilities/default.nix +++ b/pkgs/development/libraries/qtutilities/default.nix @@ -28,6 +28,6 @@ stdenv.mkDerivation rec { description = "Common Qt related C++ classes and routines used by @Martchus' applications such as dialogs, widgets and models Topics"; license = licenses.gpl2Plus; maintainers = with maintainers; [ doronbehar ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } From e0eec9aed436763c822664bd791cfeeb717314f1 Mon Sep 17 00:00:00 2001 From: waelwindows Date: Sat, 15 Apr 2023 02:17:58 +0300 Subject: [PATCH 3/4] qtforkawesome: Add Darwin to supported platforms --- pkgs/development/libraries/qtforkawesome/default.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/development/libraries/qtforkawesome/default.nix b/pkgs/development/libraries/qtforkawesome/default.nix index 5af59da875df..8fec60db1362 100644 --- a/pkgs/development/libraries/qtforkawesome/default.nix +++ b/pkgs/development/libraries/qtforkawesome/default.nix @@ -53,7 +53,7 @@ in stdenv.mkDerivation rec { description = "Library that bundles ForkAwesome for use within Qt applications"; license = licenses.gpl2Plus; maintainers = with maintainers; [ doronbehar ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; } From 9da70d133f182fd6afaf437ca4f03694922a5d31 Mon Sep 17 00:00:00 2001 From: waelwindows Date: Sat, 15 Apr 2023 02:19:22 +0300 Subject: [PATCH 4/4] syncthingtray: Add Darwin support --- pkgs/applications/misc/syncthingtray/default.nix | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/pkgs/applications/misc/syncthingtray/default.nix b/pkgs/applications/misc/syncthingtray/default.nix index 2822d1374549..4ccea88032e6 100644 --- a/pkgs/applications/misc/syncthingtray/default.nix +++ b/pkgs/applications/misc/syncthingtray/default.nix @@ -1,5 +1,6 @@ { mkDerivation , lib +, stdenv , fetchFromGitHub , substituteAll , qtbase @@ -14,11 +15,12 @@ , kio , plasma-framework , qttools +, iconv , webviewSupport ? true , jsSupport ? true -, kioPluginSupport ? true -, plasmoidSupport ? true -, systemdSupport ? true +, kioPluginSupport ? stdenv.isLinux +, plasmoidSupport ? stdenv.isLinux +, systemdSupport ? stdenv.isLinux /* It is possible to set via this option an absolute exec path that will be written to the `~/.config/autostart/syncthingtray.desktop` file generated during runtime. Alternatively, one can edit the desktop file themselves after @@ -44,7 +46,7 @@ mkDerivation rec { qtutilities boost qtforkawesome - ] + ] ++ lib.optionals stdenv.isDarwin [ iconv ] ++ lib.optionals webviewSupport [ qtwebengine ] ++ lib.optionals jsSupport [ qtdeclarative ] ++ lib.optionals kioPluginSupport [ kio ] @@ -59,7 +61,8 @@ mkDerivation rec { ; # No tests are available by upstream, but we test --help anyway - doInstallCheck = true; + # Don't test on Darwin because output is .app + doInstallCheck = !stdenv.isDarwin; installCheckPhase = '' $out/bin/syncthingtray --help | grep ${version} ''; @@ -79,6 +82,6 @@ mkDerivation rec { description = "Tray application and Dolphin/Plasma integration for Syncthing"; license = licenses.gpl2Plus; maintainers = with maintainers; [ doronbehar ]; - platforms = platforms.linux; + platforms = platforms.linux ++ platforms.darwin; }; }