2020-07-22 05:09:19 +01:00
|
|
|
{ lib
|
2021-02-28 16:46:30 +00:00
|
|
|
, stdenv
|
2020-07-22 05:09:19 +01:00
|
|
|
, rustPlatform
|
|
|
|
, fetchFromGitLab
|
2024-05-03 18:35:37 +01:00
|
|
|
, substituteAll
|
2023-05-12 15:17:16 +01:00
|
|
|
, cargo
|
2020-07-22 05:09:19 +01:00
|
|
|
, meson
|
|
|
|
, ninja
|
|
|
|
, pkg-config
|
2023-05-12 15:17:16 +01:00
|
|
|
, rustc
|
2023-09-24 15:58:59 +01:00
|
|
|
, blueprint-compiler
|
2022-09-29 02:14:16 +01:00
|
|
|
, wrapGAppsHook4
|
2020-07-28 01:02:03 +01:00
|
|
|
, 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
|
2020-07-28 01:02:03 +01:00
|
|
|
, 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
|
|
|
}:
|
|
|
|
|
2022-09-30 21:18:41 +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
|
|
|
};
|
|
|
|
|
2023-03-25 23:16:46 +00: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=";
|
2023-03-25 23:16:46 +00:00
|
|
|
};
|
2021-02-28 16:46:30 +00:00
|
|
|
};
|
2020-07-22 05:09:19 +01:00
|
|
|
|
|
|
|
patches = [
|
2021-02-15 16:08:29 +00:00
|
|
|
# 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
|
|
|
|
2020-07-28 01:02:03 +01:00
|
|
|
# Provides setup hook to fix "Unrecognized image file format"
|
2020-07-22 05:09:19 +01:00
|
|
|
gdk-pixbuf
|
2020-07-28 01:02:03 +01:00
|
|
|
|
|
|
|
# Provides glib-compile-resources to compile gresources
|
2020-07-22 05:09:19 +01:00
|
|
|
glib
|
2023-05-12 15:17:16 +01:00
|
|
|
rustPlatform.cargoSetupHook
|
|
|
|
cargo
|
|
|
|
rustc
|
2023-09-24 15:58:59 +01:00
|
|
|
blueprint-compiler
|
2023-05-12 15:17:16 +01:00
|
|
|
];
|
2020-07-28 01:02:03 +01:00
|
|
|
|
|
|
|
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
|
2020-07-28 01:02:03 +01:00
|
|
|
|
|
|
|
# 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
|
2020-07-28 01:02:03 +01:00
|
|
|
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
|
|
|
};
|
2022-09-30 21:18:41 +01:00
|
|
|
})
|