chatterino2: fix install on macOS

On Darwin/macOS, chatterino2's install phase copies no files into the
output. `make install` does not copy chatterino2.app. Copy the .app
manually, fixing the installation.

With this patch, chatterino2 almost works on macOS. Issue #42893
applies, so to make chatterino2 work, you must install qtbase in your
environment. For example:

    $ nix-env -iA nixpkgs.qt5.qtbase
    $ open ~/.nix-profile/Applications/chatterino.app
This commit is contained in:
Matthew Glazar 2020-02-01 17:53:55 -08:00
parent edbf5d86e1
commit cdd1c216ff

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 }:
mkDerivation rec {
pname = "chatterino2";
@ -12,6 +12,10 @@ mkDerivation rec {
};
nativeBuildInputs = [ qmake pkgconfig ];
buildInputs = [ qtbase qtsvg qtmultimedia boost openssl ];
postInstall = lib.optionalString stdenv.isDarwin ''
mkdir -p "$out/Applications"
mv bin/chatterino.app "$out/Applications/"
'';
meta = with lib; {
description = "A chat client for Twitch chat";
longDescription = ''