From 7fe17847a2a7fbc17f8e72d218150f14da763ac1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phan=20Kochen?= Date: Tue, 18 May 2021 19:33:46 +0200 Subject: [PATCH] tensor: fix darwin build --- .../instant-messengers/tensor/default.nix | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/pkgs/applications/networking/instant-messengers/tensor/default.nix b/pkgs/applications/networking/instant-messengers/tensor/default.nix index 114b3ab8f4d1..3969627a67a1 100644 --- a/pkgs/applications/networking/instant-messengers/tensor/default.nix +++ b/pkgs/applications/networking/instant-messengers/tensor/default.nix @@ -1,4 +1,5 @@ -{ mkDerivation, lib, fetchgit, qtbase, qtquickcontrols, qmake, makeDesktopItem }: +{ mkDerivation, lib, stdenv, fetchgit, qtbase, qtquickcontrols, qmake +, makeDesktopItem }: # we now have libqmatrixclient so a future version of tensor that supports it # should use that @@ -30,7 +31,15 @@ mkDerivation rec { mimeType = "application/x-chat"; }; - installPhase = '' + installPhase = if stdenv.isDarwin then '' + runHook preInstall + + mkdir -p $out/Applications + cp -r tensor.app $out/Applications/tensor.app + wrapQtApp $out/Applications/tensor.app/Contents/MacOS/tensor + + runHook postInstall + '' else '' runHook preInstall install -Dm755 tensor $out/bin/tensor