snowflake/pkgs/chatterino7/default.nix

54 lines
1.5 KiB
Nix
Raw Normal View History

2023-04-14 20:15:12 -04:00
{
stdenv,
cmake,
pkgs,
2023-05-25 15:03:52 -04:00
lib,
makeDesktopItem,
2023-04-14 20:15:12 -04:00
}:
stdenv.mkDerivation rec {
pname = "chatterino7";
version = "7.4.4";
2023-04-14 20:15:12 -04:00
src = pkgs.fetchFromGitHub {
owner = "SevenTV";
repo = pname;
2023-08-25 00:06:46 -04:00
rev = "aaca86ed9e77b1acae97cc786bb60212f97608e3";
sha256 = "sha256-5OutMEDAP4GVT4eCHYoC+sJglbf+fw1blsn1hiSahMo=";
2023-04-14 20:15:12 -04:00
fetchSubmodules = true;
};
2023-04-23 17:45:37 -04:00
nativeBuildInputs = with pkgs; [cmake pkg-config libsForQt5.qt5.wrapQtAppsHook];
buildInputs = with pkgs; [libsForQt5.qt5.qtbase libsForQt5.qt5.qtsvg libsForQt5.qt5.qtmultimedia libsForQt5.qt5.qtimageformats libsForQt5.qt5.qttools boost openssl libsecret];
configurationPhase = ''
mkdir build && cd build
cmake ..
2023-04-14 20:15:12 -04:00
'';
2023-04-23 17:45:37 -04:00
buildPhase = ''
make
2023-04-14 20:15:12 -04:00
'';
2023-04-23 17:45:37 -04:00
installPhase =
''
mkdir -p "$out/bin"
2023-05-25 15:03:52 -04:00
cp "bin/chatterino" "$out/bin"
2023-04-23 17:45:37 -04:00
''
+ ''
mkdir -p $out/share/icons/hicolor/256x256/apps
cp $src/resources/icon.png $out/share/icons/hicolor/256x256/apps/chatterino.png
'';
2023-05-25 15:03:52 -04:00
postFixup = ''
mkdir -p $out/share/applications
ln -s ${desktopFile}/share/applications/* $out/share/applications
'';
desktopFile = makeDesktopItem {
name = "Chatterino7";
desktopName = "Chatterino7";
exec = "chatterino";
icon = "chatterino";
comment = meta.description;
};
meta = with lib; {
description = "Chat client for twitch.tv";
homepage = "https://github.com/SevenTV/chatterino7";
license = licenses.mit;
maintainers = with maintainers; [notohh];
};
2023-04-23 17:45:37 -04:00
}