Merge pull request #79067 from strager/chatterino2-darwin

chatterino2: fix install on macOS
This commit is contained in:
Daiderd Jordan 2020-02-25 08:46:34 +01:00 committed by GitHub
commit 1b5e9c4818
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -1,4 +1,4 @@
{ mkDerivation, lib, pkgconfig, fetchFromGitHub, qtbase, qtsvg, qtmultimedia, qmake, boost, openssl }:
{ mkDerivation, stdenv, lib, pkgconfig, fetchFromGitHub, qtbase, qtsvg, qtmultimedia, qmake, boost, openssl, wrapQtAppsHook }:
mkDerivation rec {
pname = "chatterino2";
@ -10,8 +10,15 @@ mkDerivation rec {
sha256 = "0i2385hamhd9i7jdy906cfrd81cybw524j92l87c8pzrkxphignk";
fetchSubmodules = true;
};
nativeBuildInputs = [ qmake pkgconfig ];
nativeBuildInputs = [ qmake pkgconfig wrapQtAppsHook ];
buildInputs = [ qtbase qtsvg qtmultimedia boost openssl ];
postInstall = lib.optionalString stdenv.isDarwin ''
mkdir -p "$out/Applications"
mv bin/chatterino.app "$out/Applications/"
'';
postFixup = lib.optionalString stdenv.isDarwin ''
wrapQtApp "$out/Applications/chatterino.app/Contents/MacOS/chatterino"
'';
meta = with lib; {
description = "A chat client for Twitch chat";
longDescription = ''