2020-09-21 19:43:11 +01:00
|
|
|
{ lib, stdenv, fetchFromGitHub
|
2017-12-03 07:51:16 +00:00
|
|
|
, vala, cmake, ninja, wrapGAppsHook, pkgconfig, gettext
|
2019-05-22 12:03:39 +01:00
|
|
|
, gobject-introspection, gnome3, glib, gdk-pixbuf, gtk3, glib-networking
|
2017-04-20 13:56:04 +01: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 19:37:29 +00:00
|
|
|
, libnotify, libsoup, libgee
|
2020-01-30 00:42:24 +00:00
|
|
|
, librsvg, libsignal-protocol-c
|
2020-05-08 17:24:41 +01:00
|
|
|
, fetchpatch
|
2017-04-20 13:56:04 +01:00
|
|
|
, libgcrypt
|
|
|
|
, epoxy
|
2018-02-25 02:23:58 +00:00
|
|
|
, at-spi2-core
|
2017-04-20 13:56:04 +01:00
|
|
|
, sqlite
|
|
|
|
, dbus
|
|
|
|
, gpgme
|
|
|
|
, pcre
|
2018-11-27 14:49:30 +00:00
|
|
|
, qrencode
|
2019-02-06 00:54:07 +00:00
|
|
|
, icu
|
2017-04-20 13:56:04 +01:00
|
|
|
}:
|
|
|
|
|
2020-01-29 23:44:10 +00:00
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "dino";
|
|
|
|
version = "0.1.0";
|
2017-04-20 13:56:04 +01:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dino";
|
|
|
|
repo = "dino";
|
2020-01-29 23:44:10 +00:00
|
|
|
rev = "v${version}";
|
|
|
|
sha256 = "1k5cgj5n8s40i71wqdh6m1q0njl45ichfdbbywx9rga5hljz1c54";
|
2017-04-20 13:56:04 +01:00
|
|
|
};
|
|
|
|
|
2020-05-08 17:24:41 +01:00
|
|
|
patches = [
|
|
|
|
(fetchpatch {
|
|
|
|
# Allow newer versions of libsignal-protocol-c
|
|
|
|
url = "https://github.com/dino/dino/commit/fbd70ceaac5ebbddfa21a580c61165bf5b861303.patch";
|
|
|
|
sha256 = "0ydpwsmwrzfsry89fsffkfalhki4n1dw99ixjvpiingdrhjmwyl2";
|
|
|
|
excludes = [ "plugins/signal-protocol/libsignal-protocol-c" ];
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
2017-04-20 13:56:04 +01:00
|
|
|
nativeBuildInputs = [
|
|
|
|
vala
|
|
|
|
cmake
|
2017-12-03 07:51:16 +00:00
|
|
|
ninja
|
2017-04-20 13:56:04 +01:00
|
|
|
pkgconfig
|
|
|
|
wrapGAppsHook
|
2019-02-06 00:54:07 +00:00
|
|
|
gettext
|
2017-04-20 13:56:04 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2018-11-27 14:49:30 +00:00
|
|
|
qrencode
|
2018-12-02 11:41:15 +00:00
|
|
|
gobject-introspection
|
2018-02-25 02:23:58 +00:00
|
|
|
glib-networking
|
2017-04-20 13:56:04 +01:00
|
|
|
glib
|
2019-02-13 21:47:50 +00:00
|
|
|
libgee
|
|
|
|
gnome3.adwaita-icon-theme
|
2017-04-20 13:56:04 +01:00
|
|
|
sqlite
|
2019-05-22 12:03:39 +01:00
|
|
|
gdk-pixbuf
|
2017-04-20 13:56:04 +01:00
|
|
|
gtk3
|
|
|
|
libnotify
|
|
|
|
gpgme
|
|
|
|
libgcrypt
|
2017-09-20 12:01:13 +01:00
|
|
|
libsoup
|
2017-04-20 13:56:04 +01:00
|
|
|
pcre
|
|
|
|
epoxy
|
2018-02-25 02:23:58 +00:00
|
|
|
at-spi2-core
|
2017-04-20 13:56:04 +01:00
|
|
|
dbus
|
2019-02-06 00:54:07 +00:00
|
|
|
icu
|
2020-01-29 23:44:10 +00:00
|
|
|
libsignal-protocol-c
|
2020-01-30 00:42:24 +00:00
|
|
|
librsvg
|
2020-09-21 19:43:11 +01:00
|
|
|
] ++ lib.optionals (!stdenv.isDarwin) [
|
|
|
|
xorg.libxcb
|
|
|
|
xorg.libpthreadstubs
|
|
|
|
libXdmcp
|
|
|
|
libxkbcommon
|
2017-04-20 13:56:04 +01:00
|
|
|
];
|
|
|
|
|
2020-09-21 19:43:11 +01: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
|
|
|
|
'';
|
|
|
|
|
2017-04-20 13:56:04 +01:00
|
|
|
meta = with stdenv.lib; {
|
2019-09-03 23:49:40 +01:00
|
|
|
description = "Modern Jabber/XMPP Client using GTK/Vala";
|
2020-04-01 02:11:51 +01:00
|
|
|
homepage = "https://github.com/dino/dino";
|
2017-04-20 13:56:04 +01:00
|
|
|
license = licenses.gpl3;
|
2020-09-22 00:42:35 +01:00
|
|
|
platforms = platforms.linux ++ platforms.darwin;
|
2020-01-30 00:29:11 +00:00
|
|
|
maintainers = with maintainers; [ mic92 qyliss ];
|
2017-04-20 13:56:04 +01:00
|
|
|
};
|
|
|
|
}
|