nixpkgs/pkgs/applications/networking/feedreaders/newsflash/default.nix

106 lines
2.3 KiB
Nix

{ lib
, stdenv
, rustPlatform
, fetchFromGitLab
, meson
, ninja
, pkg-config
, wrapGAppsHook4
, gdk-pixbuf
, glib
, gtk4
, libadwaita
, libxml2
, openssl
, sqlite
, webkitgtk
, glib-networking
, librsvg
, gst_all_1
, gitUpdater
}:
stdenv.mkDerivation (finalAttrs: {
pname = "newsflash";
version = "2.2.4";
src = fetchFromGitLab {
owner = "news-flash";
repo = "news_flash_gtk";
rev = "refs/tags/v.${finalAttrs.version}";
sha256 = "sha256-civHj8a5LYV3XaAjSJBdn15+8sdO/yLlWBXCNW56plA=";
};
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
outputHashes = {
"news-flash-2.2.2" = "sha256-LN5VhJk+NGTR0fohI0LmfeLDS9IkfVE7IFIzmSPF4u0=";
"newsblur_api-0.2.0" = "sha256-+3AobEX+RtBRgX1TIr4rRX0ngJvNVp1oXzkbhppi73M=";
};
};
patches = [
# Post install tries to generate an icon cache & update the
# desktop database. The gtk setup hook drop-icon-theme-cache.sh
# would strip out the icon cache and the desktop database wouldn't
# be included in $out. They will generated by xdg.mime.enable &
# gtk.iconCache.enable instead.
./no-post-install.patch
];
postPatch = ''
patchShebangs build-aux/cargo.sh
'';
nativeBuildInputs = [
meson
ninja
pkg-config
wrapGAppsHook4
# Provides setup hook to fix "Unrecognized image file format"
gdk-pixbuf
# Provides glib-compile-resources to compile gresources
glib
] ++ (with rustPlatform; [
cargoSetupHook
rust.cargo
rust.rustc
]);
buildInputs = [
gtk4
libadwaita
libxml2
openssl
sqlite
webkitgtk
# TLS support for loading external content in webkitgtk WebView
glib-networking
# SVG support for gdk-pixbuf
librsvg
] ++ (with gst_all_1; [
# Audio & video support for webkitgtk WebView
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-bad
]);
passthru.updateScript = gitUpdater {
rev-prefix = "v.";
};
meta = with lib; {
description = "A modern feed reader designed for the GNOME desktop";
homepage = "https://gitlab.com/news-flash/news_flash_gtk";
license = licenses.gpl3Plus;
maintainers = with maintainers; [ kira-bruneau stunkymonkey ];
platforms = platforms.unix;
mainProgram = "com.gitlab.newsflash";
};
})