mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-01 01:33:20 +00:00
Merge pull request #226213 from Waelwindows/darwin-syncthingtray
Support building `syncthingtray` on Darwin
This commit is contained in:
commit
b40f76cd77
@ -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;
|
||||
};
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
||||
|
@ -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;
|
||||
};
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user