Unverified Commit b40f76cd authored by Doron Behar's avatar Doron Behar Committed by GitHub
Browse files

Merge pull request #226213 from Waelwindows/darwin-syncthingtray

Support building `syncthingtray` on Darwin
parents f30febf8 9da70d13
Loading
Loading
Loading
Loading
+9 −6
Original line number Diff line number Diff line
{ 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;
  };
}
+7 −2
Original line number Diff line number Diff line
@@ -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;
  };
}
+1 −1
Original line number Diff line number Diff line
@@ -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;
  };
}
+1 −1
Original line number Diff line number Diff line
@@ -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;
  };
}