about summary refs log tree commit diff
path: root/pkgs/applications/misc/syncthingtray
diff options
context:
space:
mode:
authorDavid Knaack <davidkna@users.noreply.github.com>2024-03-06 13:57:43 +0100
committerDavid Knaack <davidkna@users.noreply.github.com>2024-03-07 10:22:16 +0100
commit60a7f5155487f122c7674dbdc2911e5d48c12907 (patch)
treeeda9bfc89f4f214977584b0521444a04bc890e1a /pkgs/applications/misc/syncthingtray
parentaa194f3efe93078a3e697d42cdf4bdc14533e0f3 (diff)
syncthingtray: move app to `/Applications` & add binary to `/bin`
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 0badd79976032..2fa002297f4fb 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}
   '';