2020-09-21 11:43:11 -07:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2021-01-16 18:09:27 -08:00
|
|
|
, vala, cmake, ninja, wrapGAppsHook, pkg-config, gettext
|
2019-05-22 04:03:39 -07:00
|
|
|
, gobject-introspection, gnome3, glib, gdk-pixbuf, gtk3, glib-networking
|
2017-04-20 05:56:04 -07:00
|
|
|
, xorg, libXdmcp, libxkbcommon
|
dino: remove unnecessary private transitive deps
As explained by Orivej (reformatted from Markdown):
> These (except libsignal-protocol-c) are private dependencies of the
> actual dependencies that should neither be propagated nor added
> manually to dino. For example, libpsl and brotli come from
> libsoup-2.4.pc:
>
> Requires: glib-2.0 >= 2.38, gobject-2.0 >= 2.38, gio-2.0 >= 2.38
> Requires.private: libxml-2.0, sqlite3, libpsl >= 0.20, libbrotlidec, zlib
>
> (To be precise, glib uses utillinuxMinimal rather than utillinux.)
>
> The warnings we see, such as Package 'mount', required by 'gio-2.0',
> not found, come from CMake running both pkg-config --libs and
> pkg-config --static --libs to populate both <XXX>_LIBRARIES and
> <XXX>_STATIC_LIBRARIES[1], but dino has no use for the latter.
> Currently these warnings can not be disabled:
> https://gitlab.kitware.com/cmake/cmake/issues/18158
>
> (They could be prevented by pruning Requires.private from shared-only
> libraries akin to <https://github.com/NixOS/nixpkgs/pull/51767>,
> although it can not be detected if a library is shared-only from the
> .pc file alone, and this is just a warning.)
>
> [1]: docs: https://cmake.org/cmake/help/v3.16/module/FindPkgConfig.html
2020-01-30 11:37:29 -08:00
|
|
|
, libnotify, libsoup, libgee
|
2020-01-29 16:42:24 -08:00
|
|
|
, librsvg, libsignal-protocol-c
|
2020-05-08 09:24:41 -07:00
|
|
|
, fetchpatch
|
2017-04-20 05:56:04 -07:00
|
|
|
, libgcrypt
|
|
|
|
, epoxy
|
2018-02-24 18:23:58 -08:00
|
|
|
, at-spi2-core
|
2017-04-20 05:56:04 -07:00
|
|
|
, sqlite
|
|
|
|
, dbus
|
|
|
|
, gpgme
|
|
|
|
, pcre
|
2018-11-27 06:49:30 -08:00
|
|
|
, qrencode
|
2019-02-05 16:54:07 -08:00
|
|
|
, icu
|
2017-04-20 05:56:04 -07:00
|
|
|
}:
|
|
|
|
|
2020-01-29 15:44:10 -08:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dino";
|
2020-11-12 09:15:45 -08:00
|
|
|
version = "0.2.0";
|
2017-04-20 05:56:04 -07:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dino";
|
|
|
|
repo = "dino";
|
2020-01-29 15:44:10 -08:00
|
|
|
rev = "v${version}";
|
2020-11-12 09:15:45 -08:00
|
|
|
sha256 = "0wy1hb3kz3k4gqqwx308n37cqag2d017jwfz0b5s30nkx2pbwspw";
|
2017-04-20 05:56:04 -07:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
vala
|
|
|
|
cmake
|
2017-12-02 23:51:16 -08:00
|
|
|
ninja
|
2021-01-16 18:09:27 -08:00
|
|
|
pkg-config
|
2017-04-20 05:56:04 -07:00
|
|
|
wrapGAppsHook
|
2019-02-05 16:54:07 -08:00
|
|
|
gettext
|
2017-04-20 05:56:04 -07:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2018-11-27 06:49:30 -08:00
|
|
|
qrencode
|
2018-12-02 03:41:15 -08:00
|
|
|
gobject-introspection
|
2018-02-24 18:23:58 -08:00
|
|
|
glib-networking
|
2017-04-20 05:56:04 -07:00
|
|
|
glib
|
2019-02-13 13:47:50 -08:00
|
|
|
libgee
|
|
|
|
gnome3.adwaita-icon-theme
|
2017-04-20 05:56:04 -07:00
|
|
|
sqlite
|
2019-05-22 04:03:39 -07:00
|
|
|
gdk-pixbuf
|
2017-04-20 05:56:04 -07:00
|
|
|
gtk3
|
|
|
|
libnotify
|
|
|
|
gpgme
|
|
|
|
libgcrypt
|
2017-09-20 04:01:13 -07:00
|
|
|
libsoup
|
2017-04-20 05:56:04 -07:00
|
|
|
pcre
|
|
|
|
epoxy
|
2018-02-24 18:23:58 -08:00
|
|
|
at-spi2-core
|
2017-04-20 05:56:04 -07:00
|
|
|
dbus
|
2019-02-05 16:54:07 -08:00
|
|
|
icu
|
2020-01-29 15:44:10 -08:00
|
|
|
libsignal-protocol-c
|
2020-01-29 16:42:24 -08:00
|
|
|
librsvg
|
2020-09-21 11:43:11 -07:00
|
|
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
|
|
|
xorg.libxcb
|
|
|
|
xorg.libpthreadstubs
|
|
|
|
libXdmcp
|
|
|
|
libxkbcommon
|
2017-04-20 05:56:04 -07:00
|
|
|
];
|
|
|
|
|
2020-09-21 11:43:11 -07:00
|
|
|
# Dino looks for plugins with a .so filename extension, even on macOS where
|
|
|
|
# .dylib is appropriate, and despite the fact that it builds said plugins with
|
|
|
|
# that as their filename extension
|
|
|
|
#
|
|
|
|
# Therefore, on macOS rename all of the plugins to use correct names that Dino
|
|
|
|
# will load
|
|
|
|
#
|
|
|
|
# See https://github.com/dino/dino/wiki/macOS
|
|
|
|
postFixup = lib.optionalString (stdenv.isDarwin) ''
|
|
|
|
cd "$out/lib/dino/plugins/"
|
|
|
|
for f in *.dylib; do
|
|
|
|
mv "$f" "$(basename "$f" .dylib).so"
|
|
|
|
done
|
|
|
|
'';
|
|
|
|
|
2021-01-10 23:54:33 -08:00
|
|
|
meta = with lib; {
|
2019-09-03 15:49:40 -07:00
|
|
|
description = "Modern Jabber/XMPP Client using GTK/Vala";
|
2020-03-31 18:11:51 -07:00
|
|
|
homepage = "https://github.com/dino/dino";
|
2017-04-20 05:56:04 -07:00
|
|
|
license = licenses.gpl3;
|
2020-09-21 16:42:35 -07:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2020-01-29 16:29:11 -08:00
|
|
|
maintainers = with maintainers; [ mic92 qyliss ];
|
2017-04-20 05:56:04 -07:00
|
|
|
};
|
|
|
|
}
|