nixpkgs/pkgs/applications/networking/instant-messengers/dino/default.nix
Profpatsch 4a7f99d55d treewide: with stdenv.lib; in meta -> with lib;
Part of: https://github.com/NixOS/nixpkgs/issues/108938

meta = with stdenv.lib;

is a widely used pattern. We want to slowly remove
the `stdenv.lib` indirection and encourage people
to use `lib` directly. Thus let’s start with the meta
field.

This used a rewriting script to mostly automatically
replace all occurances of this pattern, and add the
`lib` argument to the package header if it doesn’t
exist yet.

The script in its current form is available at
https://cs.tvl.fyi/depot@2f807d7f141068d2d60676a89213eaa5353ca6e0/-/blob/users/Profpatsch/nixpkgs-rewriter/default.nix
2021-01-11 10:38:22 +01:00

90 lines
1.9 KiB
Nix

{ lib, stdenv, fetchFromGitHub
, vala, cmake, ninja, wrapGAppsHook, pkgconfig, gettext
, gobject-introspection, gnome3, glib, gdk-pixbuf, gtk3, glib-networking
, xorg, libXdmcp, libxkbcommon
, libnotify, libsoup, libgee
, librsvg, libsignal-protocol-c
, fetchpatch
, libgcrypt
, epoxy
, at-spi2-core
, sqlite
, dbus
, gpgme
, pcre
, qrencode
, icu
}:
stdenv.mkDerivation rec {
pname = "dino";
version = "0.2.0";
src = fetchFromGitHub {
owner = "dino";
repo = "dino";
rev = "v${version}";
sha256 = "0wy1hb3kz3k4gqqwx308n37cqag2d017jwfz0b5s30nkx2pbwspw";
};
nativeBuildInputs = [
vala
cmake
ninja
pkgconfig
wrapGAppsHook
gettext
];
buildInputs = [
qrencode
gobject-introspection
glib-networking
glib
libgee
gnome3.adwaita-icon-theme
sqlite
gdk-pixbuf
gtk3
libnotify
gpgme
libgcrypt
libsoup
pcre
epoxy
at-spi2-core
dbus
icu
libsignal-protocol-c
librsvg
] ++ lib.optionals (!stdenv.isDarwin) [
xorg.libxcb
xorg.libpthreadstubs
libXdmcp
libxkbcommon
];
# 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
'';
meta = with lib; {
description = "Modern Jabber/XMPP Client using GTK/Vala";
homepage = "https://github.com/dino/dino";
license = licenses.gpl3;
platforms = platforms.linux ++ platforms.darwin;
maintainers = with maintainers; [ mic92 qyliss ];
};
}