2023-03-23 12:57:04 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
|
|
|
, fetchFromGitHub
|
|
|
|
, vala
|
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, python3
|
|
|
|
, pkg-config
|
2023-04-05 11:02:11 +00:00
|
|
|
, wrapGAppsHook4
|
2023-03-23 12:57:04 +00:00
|
|
|
, desktop-file-utils
|
|
|
|
, gtk4
|
|
|
|
, libadwaita
|
|
|
|
, json-glib
|
|
|
|
, glib
|
|
|
|
, glib-networking
|
2024-07-07 21:35:21 +00:00
|
|
|
, gnome
|
2023-08-28 11:37:08 +00:00
|
|
|
, gobject-introspection
|
2023-04-05 11:02:11 +00:00
|
|
|
, gtksourceview5
|
2023-03-23 12:57:04 +00:00
|
|
|
, libxml2
|
|
|
|
, libgee
|
2024-07-07 21:35:21 +00:00
|
|
|
, librsvg
|
2023-04-05 11:02:11 +00:00
|
|
|
, libsoup_3
|
2023-03-23 12:57:04 +00:00
|
|
|
, libsecret
|
2023-05-23 18:34:21 +00:00
|
|
|
, libwebp
|
2023-07-20 23:45:49 +00:00
|
|
|
, libspelling
|
2024-07-07 21:35:21 +00:00
|
|
|
, webp-pixbuf-loader
|
2024-05-04 05:47:56 +00:00
|
|
|
, icu
|
2023-03-23 12:57:04 +00:00
|
|
|
, gst_all_1
|
2024-06-22 11:08:26 +00:00
|
|
|
, clapper
|
|
|
|
# clapper support is still experimental and has bugs.
|
|
|
|
# See https://github.com/GeopJr/Tuba/pull/931
|
|
|
|
, clapperSupport? false
|
2023-03-23 12:57:04 +00:00
|
|
|
, nix-update-script
|
|
|
|
}:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
|
|
|
pname = "tuba";
|
2024-06-22 11:08:26 +00:00
|
|
|
version = "0.8.1";
|
|
|
|
|
2023-03-23 12:57:04 +00:00
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "GeopJr";
|
|
|
|
repo = "Tuba";
|
|
|
|
rev = "v${version}";
|
2024-06-22 11:08:26 +00:00
|
|
|
hash = "sha256-dN915sPBttnrcOuhUJjEtdojOQi9VRLmc+t1RvWmx64=";
|
2023-03-23 12:57:04 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
|
|
|
meson
|
|
|
|
ninja
|
|
|
|
pkg-config
|
|
|
|
vala
|
|
|
|
python3
|
2023-04-05 11:02:11 +00:00
|
|
|
wrapGAppsHook4
|
2023-03-23 12:57:04 +00:00
|
|
|
desktop-file-utils
|
2023-08-28 11:37:08 +00:00
|
|
|
gobject-introspection
|
2023-03-23 12:57:04 +00:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
|
|
|
glib
|
|
|
|
glib-networking
|
2023-04-05 11:02:11 +00:00
|
|
|
gtksourceview5
|
2023-03-23 12:57:04 +00:00
|
|
|
json-glib
|
|
|
|
libxml2
|
|
|
|
libgee
|
2023-04-05 11:02:11 +00:00
|
|
|
libsoup_3
|
2023-03-23 12:57:04 +00:00
|
|
|
gtk4
|
|
|
|
libadwaita
|
|
|
|
libsecret
|
2023-05-23 18:34:21 +00:00
|
|
|
libwebp
|
2023-07-20 23:45:49 +00:00
|
|
|
libspelling
|
2024-05-04 05:47:56 +00:00
|
|
|
icu
|
2023-03-23 12:57:04 +00:00
|
|
|
] ++ (with gst_all_1; [
|
|
|
|
gstreamer
|
|
|
|
gst-libav
|
|
|
|
gst-plugins-base
|
|
|
|
(gst-plugins-good.override { gtkSupport = true; })
|
|
|
|
gst-plugins-bad
|
2024-06-22 11:08:26 +00:00
|
|
|
]) ++ lib.optionals clapperSupport [
|
|
|
|
clapper
|
|
|
|
];
|
|
|
|
|
|
|
|
mesonFlags = [
|
|
|
|
(lib.mesonBool "clapper" clapperSupport)
|
|
|
|
];
|
2023-03-23 12:57:04 +00:00
|
|
|
|
2023-11-29 05:40:09 +00:00
|
|
|
env.NIX_CFLAGS_COMPILE = lib.optionalString stdenv.cc.isClang "-Wno-error=int-conversion";
|
|
|
|
|
2023-03-23 12:57:04 +00:00
|
|
|
passthru = {
|
2023-07-26 22:21:18 +00:00
|
|
|
updateScript = nix-update-script { };
|
2023-03-23 12:57:04 +00:00
|
|
|
};
|
|
|
|
|
2024-07-07 21:35:21 +00:00
|
|
|
# Pull in WebP support for avatars from Misskey instances.
|
|
|
|
# In postInstall to run before gappsWrapperArgsHook.
|
|
|
|
postInstall = ''
|
|
|
|
export GDK_PIXBUF_MODULE_FILE="${gnome._gdkPixbufCacheBuilder_DO_NOT_USE {
|
|
|
|
extraLoaders = [
|
|
|
|
librsvg
|
|
|
|
webp-pixbuf-loader
|
|
|
|
];
|
|
|
|
}}"
|
|
|
|
'';
|
|
|
|
|
2024-06-22 11:08:26 +00:00
|
|
|
meta = {
|
2023-03-23 12:57:04 +00:00
|
|
|
description = "Browse the Fediverse";
|
|
|
|
homepage = "https://tuba.geopjr.dev/";
|
2023-04-05 11:02:11 +00:00
|
|
|
mainProgram = "dev.geopjr.Tuba";
|
2024-06-22 11:08:26 +00:00
|
|
|
license = lib.licenses.gpl3Only;
|
2023-04-05 11:02:11 +00:00
|
|
|
changelog = "https://github.com/GeopJr/Tuba/releases/tag/v${version}";
|
2024-07-07 22:29:26 +00:00
|
|
|
maintainers = with lib.maintainers; [ chuangzhu aleksana donovanglover ];
|
2023-03-23 12:57:04 +00:00
|
|
|
};
|
|
|
|
}
|