2021-05-11 12:09:50 +02:00
|
|
|
{ fetchgit, libcommuni, qtbase, qmake, lib, stdenv, wrapQtAppsHook }:
|
2016-01-10 12:01:48 +01:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 14:41:18 +02:00
|
|
|
pname = "communi";
|
2017-08-29 12:45:39 +02:00
|
|
|
version = "3.5.0";
|
2016-01-10 12:01:48 +01:00
|
|
|
|
|
|
|
src = fetchgit {
|
|
|
|
url = "https://github.com/communi/communi-desktop.git";
|
2017-08-29 12:45:39 +02:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "10grskhczh8601s90ikdsbjabgr9ypcp2j7vivjkl456rmg6xbji";
|
2016-08-29 16:43:10 +02:00
|
|
|
fetchSubmodules = true;
|
2016-01-10 12:01:48 +01:00
|
|
|
};
|
|
|
|
|
2021-05-11 12:09:50 +02:00
|
|
|
nativeBuildInputs = [ qmake ]
|
|
|
|
++ lib.optional stdenv.isDarwin wrapQtAppsHook;
|
2016-03-08 13:35:03 +01:00
|
|
|
|
2016-04-16 21:59:20 +02:00
|
|
|
buildInputs = [ libcommuni qtbase ];
|
2016-01-10 12:01:48 +01:00
|
|
|
|
2021-01-12 12:50:23 +01:00
|
|
|
dontWrapQtApps = true;
|
|
|
|
|
2016-04-16 21:59:20 +02:00
|
|
|
preConfigure = ''
|
2016-01-10 12:01:48 +01:00
|
|
|
export QMAKEFEATURES=${libcommuni}/features
|
2016-03-08 13:35:03 +01:00
|
|
|
'';
|
|
|
|
|
2020-09-12 13:25:56 +02:00
|
|
|
qmakeFlags = [
|
|
|
|
"COMMUNI_INSTALL_PREFIX=${placeholder "out"}"
|
|
|
|
"COMMUNI_INSTALL_PLUGINS=${placeholder "out"}/lib/communi/plugins"
|
|
|
|
"COMMUNI_INSTALL_ICONS=${placeholder "out"}/share/icons/hicolor"
|
|
|
|
"COMMUNI_INSTALL_DESKTOP=${placeholder "out"}/share/applications"
|
|
|
|
"COMMUNI_INSTALL_THEMES=${placeholder "out"}/share/communi/themes"
|
2021-05-11 12:09:50 +02:00
|
|
|
(if stdenv.isDarwin
|
|
|
|
then [ "COMMUNI_INSTALL_BINS=${placeholder "out"}/Applications" ]
|
|
|
|
else [ "COMMUNI_INSTALL_BINS=${placeholder "out"}/bin" ])
|
2020-09-12 13:25:56 +02:00
|
|
|
];
|
|
|
|
|
2021-05-11 12:09:50 +02:00
|
|
|
postInstall = if stdenv.isDarwin then ''
|
|
|
|
# Nix qmake does not add the bundle rpath by default.
|
|
|
|
install_name_tool \
|
|
|
|
-add_rpath @executable_path/../Frameworks \
|
|
|
|
$out/Applications/Communi.app/Contents/MacOS/Communi
|
|
|
|
|
|
|
|
wrapQtApp $out/Applications/Communi.app/Contents/MacOS/Communi
|
|
|
|
'' else ''
|
2016-03-16 15:23:10 +01:00
|
|
|
substituteInPlace "$out/share/applications/communi.desktop" \
|
|
|
|
--replace "/usr/bin" "$out/bin"
|
2016-01-10 12:01:48 +01:00
|
|
|
'';
|
|
|
|
|
2017-06-18 13:39:18 +02:00
|
|
|
preFixup = ''
|
2017-08-29 12:45:39 +02:00
|
|
|
rm -rf lib
|
2016-08-29 16:43:10 +02:00
|
|
|
'';
|
|
|
|
|
2021-01-11 08:54:33 +01:00
|
|
|
meta = with lib; {
|
2016-01-10 12:01:48 +01:00
|
|
|
description = "A simple and elegant cross-platform IRC client";
|
2020-04-01 03:11:51 +02:00
|
|
|
homepage = "https://github.com/communi/communi-desktop";
|
2016-01-10 12:01:48 +01:00
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ hrdinka ];
|
2016-03-08 13:35:03 +01:00
|
|
|
platforms = platforms.all;
|
2016-01-10 12:01:48 +01:00
|
|
|
};
|
|
|
|
}
|