about summary refs log tree commit diff
path: root/pkgs/applications/misc/syncthingtray
diff options
context:
space:
mode:
authorDoron Behar <doron.behar@gmail.com>2024-03-07 22:12:28 +0200
committerGitHub <noreply@github.com>2024-03-07 22:12:28 +0200
commit3deaab7643f89048f2ac8e2382dcdb5e04f1bb87 (patch)
treeb526d25371b9695c34f670a20726c4258d344e61 /pkgs/applications/misc/syncthingtray
parent8c8cf43fcd70b2ac61abe4d03af516d6b69b13ca (diff)
parent5e4af1995e611352d9d9a3d55e5506e2f14ea1d3 (diff)
Merge pull request #293766 from davidkna/patch-4
syncthingtray: install app bundle in `/Applications`
Diffstat (limited to 'pkgs/applications/misc/syncthingtray')
-rw-r--r--pkgs/applications/misc/syncthingtray/default.nix9
1 files changed, 7 insertions, 2 deletions
diff --git a/pkgs/applications/misc/syncthingtray/default.nix b/pkgs/applications/misc/syncthingtray/default.nix
index e98e3bdbfa6fb..609bd81e40e40 100644
--- a/pkgs/applications/misc/syncthingtray/default.nix
+++ b/pkgs/applications/misc/syncthingtray/default.nix
@@ -76,8 +76,13 @@ stdenv.mkDerivation (finalAttrs: {
     export QT_QPA_PLATFORM=offscreen
     export QT_PLUGIN_PATH="${lib.getBin qtbase}/${qtbase.qtPluginPrefix}"
   '';
-  # don't test --help  on Darwin because output is .app
-  doInstallCheck = !stdenv.isDarwin;
+  postInstall = lib.optionalString stdenv.isDarwin ''
+    # put the app bundle into the proper place /Applications instead of /bin
+    mkdir -p $out/Applications
+    mv $out/bin/syncthingtray.app $out/Applications
+    # Make binary available in PATH like on other platforms
+    ln -s $out/Applications/syncthingtray.app/Contents/MacOS/syncthingtray $out/bin/syncthingtray
+  '';
   installCheckPhase = ''
     $out/bin/syncthingtray --help | grep ${finalAttrs.version}
   '';