git.iko.soy/typeable/nixpkgs
on master help sign in
Merge pull request #123552 from stephank/fix-tensor-darwin

tensor: fix darwin build

commita43542f2b3896a266cc615232da850e5807e7883 authorRobert Scott <code@humanleg.org.uk> dateWed 19 May 2021, 00:05 (6 years ago) parent8bc4cb77fe1784
1 file changed+11−2
pkgs/applications/networking/instant-messengers/tensor/default.nix+11−2
pkgs/applications/networking/instant-messengers/tensor/default.nix+11−2
@@ -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