forked from mirrors/nixpkgs
94 lines
1.9 KiB
Nix
94 lines
1.9 KiB
Nix
{ lib
|
|
, rustPlatform
|
|
, fetchFromGitLab
|
|
, meson
|
|
, ninja
|
|
, pkg-config
|
|
, wrapGAppsHook
|
|
, gdk-pixbuf
|
|
, glib
|
|
, gtk3
|
|
, libhandy
|
|
, openssl
|
|
, sqlite
|
|
, webkitgtk
|
|
, glib-networking
|
|
, librsvg
|
|
, gst_all_1
|
|
}:
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
pname = "newsflash";
|
|
version = "1.1.1";
|
|
|
|
src = fetchFromGitLab {
|
|
owner = "news-flash";
|
|
repo = "news_flash_gtk";
|
|
rev = version;
|
|
sha256 = "1z47h23g87dqmr9sfjl36fs5xjm2wj7z2bri9g0a4jcpwzl5awsd";
|
|
};
|
|
|
|
cargoSha256 = "0rnrdh9ganj63hf9j890yj9pahcgza95z7x020w72mbb4648hq26";
|
|
|
|
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 = ''
|
|
chmod +x build-aux/cargo.sh
|
|
patchShebangs .
|
|
'';
|
|
|
|
nativeBuildInputs = [
|
|
meson
|
|
ninja
|
|
pkg-config
|
|
wrapGAppsHook
|
|
|
|
# Provides setup hook to fix "Unrecognized image file format"
|
|
gdk-pixbuf
|
|
|
|
# Provides glib-compile-resources to compile gresources
|
|
glib
|
|
];
|
|
|
|
buildInputs = [
|
|
gtk3
|
|
libhandy
|
|
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
|
|
]);
|
|
|
|
# Unset default rust phases to use meson & ninja instead
|
|
configurePhase = null;
|
|
buildPhase = null;
|
|
checkPhase = null;
|
|
installPhase = null;
|
|
installCheckPhase = null;
|
|
|
|
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; [ metadark ];
|
|
};
|
|
}
|