2021-01-28 11:28:07 +01:00
|
|
|
{ lib
|
|
|
|
, fetchFromGitLab
|
2022-01-23 08:19:08 +01:00
|
|
|
, fetchpatch
|
2021-01-28 11:28:07 +01:00
|
|
|
, meson
|
|
|
|
, gobject-introspection
|
|
|
|
, pkg-config
|
|
|
|
, ninja
|
|
|
|
, python3
|
2022-01-23 08:19:08 +01:00
|
|
|
, wrapGAppsHook4
|
|
|
|
, gtk4
|
2021-01-28 11:28:07 +01:00
|
|
|
, gdk-pixbuf
|
|
|
|
, webkitgtk
|
2022-01-23 08:19:08 +01:00
|
|
|
, gtksourceview5
|
2021-01-28 11:28:07 +01:00
|
|
|
, glib-networking
|
2022-01-23 08:19:08 +01:00
|
|
|
, libadwaita
|
|
|
|
, appstream
|
2021-01-28 11:28:07 +01:00
|
|
|
}:
|
|
|
|
|
|
|
|
python3.pkgs.buildPythonApplication rec {
|
|
|
|
pname = "giara";
|
2022-01-23 08:19:08 +01:00
|
|
|
version = "1.0";
|
2021-01-28 11:28:07 +01:00
|
|
|
|
|
|
|
format = "other";
|
|
|
|
|
|
|
|
src = fetchFromGitLab {
|
|
|
|
domain = "gitlab.gnome.org";
|
|
|
|
owner = "World";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
2022-01-23 08:19:08 +01:00
|
|
|
hash = "sha256-xDIzgr8zYal0r0sASWqiSZANCMC52LrVmLjlnGAd2Mg=";
|
2021-01-28 11:28:07 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
nativeBuildInputs = [
|
2022-01-23 08:19:08 +01:00
|
|
|
appstream
|
2021-01-28 11:28:07 +01:00
|
|
|
meson
|
|
|
|
gobject-introspection
|
|
|
|
pkg-config
|
|
|
|
ninja
|
2022-01-23 08:19:08 +01:00
|
|
|
wrapGAppsHook4
|
2021-01-28 11:28:07 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
buildInputs = [
|
2022-01-23 08:19:08 +01:00
|
|
|
gtk4
|
2021-01-28 11:28:07 +01:00
|
|
|
gdk-pixbuf
|
|
|
|
webkitgtk
|
2022-01-23 08:19:08 +01:00
|
|
|
gtksourceview5
|
2021-01-28 11:28:07 +01:00
|
|
|
glib-networking
|
2022-01-23 08:19:08 +01:00
|
|
|
libadwaita
|
2021-01-28 11:28:07 +01:00
|
|
|
];
|
|
|
|
|
|
|
|
pythonPath = with python3.pkgs; [
|
|
|
|
pygobject3
|
|
|
|
pycairo
|
2021-07-03 13:37:24 +02:00
|
|
|
python-dateutil
|
2021-01-28 11:28:07 +01:00
|
|
|
praw
|
|
|
|
pillow
|
|
|
|
mistune
|
|
|
|
beautifulsoup4
|
|
|
|
];
|
|
|
|
|
2022-01-23 08:19:08 +01:00
|
|
|
patches = [
|
|
|
|
# Proper support for gtk4 and libadwaita
|
|
|
|
# @TODO: Remove when bumping the version.
|
|
|
|
(fetchpatch {
|
|
|
|
name = "giara-gtk4-libadwaita.patch";
|
|
|
|
url = "https://gitlab.gnome.org/World/giara/-/commit/6204427f8b8e3d8c72b669717a3f129ffae401d9.patch";
|
|
|
|
sha256 = "sha256-E8kbVsACPD2gkfNrzYUy0+1U7+/pIkUu4rCkX+xY0us=";
|
|
|
|
})
|
|
|
|
];
|
|
|
|
|
|
|
|
postPatch = ''
|
|
|
|
substituteInPlace meson_post_install.py \
|
|
|
|
--replace "gtk-update-icon-cache" "gtk4-update-icon-cache"
|
|
|
|
'';
|
|
|
|
|
2021-01-28 11:28:07 +01:00
|
|
|
# Fix setup-hooks https://github.com/NixOS/nixpkgs/issues/56943
|
|
|
|
strictDeps = false;
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "A Reddit app, built with Python, GTK and Handy; Created with mobile Linux in mind";
|
|
|
|
maintainers = with maintainers; [ dasj19 ];
|
|
|
|
homepage = "https://gitlab.gnome.org/World/giara";
|
|
|
|
license = licenses.gpl3Plus;
|
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|