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

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

121 lines
2.6 KiB
Nix
Raw Normal View History

2020-07-22 05:09:19 +01:00
{ lib
, stdenv
2020-07-22 05:09:19 +01:00
, rustPlatform
, fetchFromGitLab
2024-05-03 18:35:37 +01:00
, substituteAll
, cargo
2020-07-22 05:09:19 +01:00
, meson
, ninja
, pkg-config
, rustc
2023-09-24 15:58:59 +01:00
, blueprint-compiler
2022-09-29 02:14:16 +01:00
, wrapGAppsHook4
, gdk-pixbuf
, glib
2024-06-01 17:13:12 +01:00
, clapper
2022-09-29 02:14:16 +01:00
, gtk4
, libadwaita
2022-09-30 21:11:40 +01:00
, libxml2
2020-07-22 05:09:19 +01:00
, openssl
, sqlite
, webkitgtk
, glib-networking
, librsvg
2021-06-20 13:01:47 +01:00
, gst_all_1
2022-10-05 00:40:22 +01:00
, gitUpdater
2020-07-22 05:09:19 +01:00
}:
stdenv.mkDerivation (finalAttrs: {
2020-07-22 05:09:19 +01:00
pname = "newsflash";
2024-06-01 17:13:12 +01:00
version = "3.3.0";
2020-07-22 05:09:19 +01:00
src = fetchFromGitLab {
owner = "news-flash";
repo = "news_flash_gtk";
2023-05-04 21:52:25 +01:00
rev = "refs/tags/v.${finalAttrs.version}";
2024-06-01 17:13:12 +01:00
hash = "sha256-s8h/OIJJzMmsCsaQJ0SOjCAVXfYQbjOupdDtLOqM9d0=";
2020-07-22 05:09:19 +01:00
};
cargoDeps = rustPlatform.importCargoLock {
lockFile = ./Cargo.lock;
outputHashes = {
2024-06-01 17:13:12 +01:00
"clapper-0.1.0" = "sha256-xQ7l6luO5E4PMjtN9elg0bkJa7IhWzA7KuYDJ+m/VY0=";
"news-flash-2.3.0-alpha.0" = "sha256-ZgX6tQmPDMSpLcYD04u2ReQXdzeGzQTwGaUy/y4z4do=";
2024-03-26 20:10:29 +00:00
"newsblur_api-0.3.0" = "sha256-m2178zdJzeskl3BQpZr6tlxTAADehxz8uYcZzi15nhQ=";
};
};
2020-07-22 05:09:19 +01:00
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.
2020-07-22 05:09:19 +01:00
./no-post-install.patch
2024-05-03 18:35:37 +01:00
# Replace placeholder "0.0.0" project version with nixpkgs version
(substituteAll {
src = ./hardcode-version.patch;
inherit (finalAttrs) version;
})
2020-07-22 05:09:19 +01:00
];
postPatch = ''
2022-09-30 21:25:35 +01:00
patchShebangs build-aux/cargo.sh
2020-07-22 05:09:19 +01:00
'';
2024-06-01 17:18:53 +01:00
strictDeps = true;
2020-07-22 05:09:19 +01:00
nativeBuildInputs = [
meson
ninja
pkg-config
2022-09-29 02:14:16 +01:00
wrapGAppsHook4
2020-07-22 05:09:19 +01:00
# Provides setup hook to fix "Unrecognized image file format"
2020-07-22 05:09:19 +01:00
gdk-pixbuf
# Provides glib-compile-resources to compile gresources
2020-07-22 05:09:19 +01:00
glib
rustPlatform.cargoSetupHook
cargo
rustc
2023-09-24 15:58:59 +01:00
blueprint-compiler
];
buildInputs = [
2024-06-01 17:13:12 +01:00
clapper
2022-09-29 02:14:16 +01:00
gtk4
libadwaita
2022-09-30 21:11:40 +01:00
libxml2
2020-07-22 05:09:19 +01:00
openssl
sqlite
webkitgtk
# TLS support for loading external content in webkitgtk WebView
glib-networking
# SVG support for gdk-pixbuf
librsvg
] ++ (with gst_all_1; [
2020-08-10 04:41:04 +01:00
# Audio & video support for webkitgtk WebView
gstreamer
gst-plugins-base
gst-plugins-good
gst-plugins-bad
]);
2020-07-22 05:09:19 +01:00
2022-10-05 00:40:22 +01:00
passthru.updateScript = gitUpdater {
rev-prefix = "v.";
};
2020-07-22 05:09:19 +01:00
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;
2021-11-06 10:43:19 +00:00
maintainers = with maintainers; [ kira-bruneau stunkymonkey ];
2021-06-20 13:01:47 +01:00
platforms = platforms.unix;
2023-09-24 15:58:59 +01:00
mainProgram = "io.gitlab.news_flash.NewsFlash";
2020-07-22 05:09:19 +01:00
};
})