@@ -1,4 +1,5 @@
1−{ mkDerivation, lib, fetchgit, qtbase, qtquickcontrols, qmake, makeDesktopItem }:
1+{ mkDerivation, lib, stdenv, fetchgit, qtbase, qtquickcontrols, qmake
2+, makeDesktopItem }:
23
34# we now have libqmatrixclient so a future version of tensor that supports it
45# should use that
@@ -30,7 +31,15 @@ mkDerivation rec {
3031 mimeType = "application/x-chat";
3132 };
3233
33− installPhase = ''
34+ installPhase = if stdenv.isDarwin then ''
35+ runHook preInstall
36+
37+ mkdir -p $out/Applications
38+ cp -r tensor.app $out/Applications/tensor.app
39+ wrapQtApp $out/Applications/tensor.app/Contents/MacOS/tensor
40+
41+ runHook postInstall
42+ '' else ''
3443 runHook preInstall
3544
3645 install -Dm755 tensor $out/bin/tensor