Files
nixpkgs/pkgs/by-name/ne/newsflash/package.nix
Dark Steveneq 646b892680
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s
push sheeet
2025-10-09 14:15:47 +02:00

115 lines
2.5 KiB
Nix

{
lib,
stdenv,
fetchFromGitLab,
rustPlatform,
blueprint-compiler,
cargo,
desktop-file-utils,
meson,
ninja,
pkg-config,
rustc,
wrapGAppsHook4,
gdk-pixbuf,
clapper-unwrapped,
gtk4,
libadwaita,
libxml2,
openssl,
sqlite,
webkitgtk_6_0,
glib-networking,
librsvg,
gst_all_1,
gitUpdater,
}:
stdenv.mkDerivation (finalAttrs: {
pname = "newsflash";
version = "4.1.4";
src = fetchFromGitLab {
owner = "news-flash";
repo = "news_flash_gtk";
tag = "v.${finalAttrs.version}";
hash = "sha256-3RGa1f+V7dIgTxQKOceVSr7RwajUgwq05ypBhg6RjMA=";
};
cargoDeps = rustPlatform.fetchCargoVendor {
inherit (finalAttrs) pname version src;
hash = "sha256-CRQH22EP/G6osjsuZJmTWwjq4C06DxiIXlz6zxgbDv4=";
};
postPatch = ''
patchShebangs build-aux/cargo.sh
meson rewrite kwargs set project / version '${finalAttrs.version}'
substituteInPlace src/meson.build --replace-fail \
"'src' / rust_target / 'news_flash_gtk'" \
"'src' / '${stdenv.hostPlatform.rust.cargoShortTarget}' / rust_target / 'news_flash_gtk'"
'';
strictDeps = true;
nativeBuildInputs = [
blueprint-compiler
cargo
desktop-file-utils
meson
ninja
pkg-config
rustc
rustPlatform.bindgenHook
rustPlatform.cargoSetupHook
wrapGAppsHook4
# Provides setup hook to fix "Unrecognized image file format"
gdk-pixbuf
];
buildInputs = [
clapper-unwrapped
gtk4
libadwaita
libxml2
openssl
sqlite
webkitgtk_6_0
# 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
]);
# For https://gitlab.com/news-flash/news_flash_gtk/-/blob/8e5fc4acf5ca6be5b8cd616466a17e7a273f9dda/src/meson.build#L47
env.CARGO_BUILD_TARGET = stdenv.hostPlatform.rust.rustcTargetSpec;
passthru.updateScript = gitUpdater {
rev-prefix = "v.";
ignoredVersions = "(alpha|beta|rc)";
};
meta = {
description = "Modern feed reader designed for the GNOME desktop";
homepage = "https://gitlab.com/news-flash/news_flash_gtk";
license = lib.licenses.gpl3Plus;
maintainers = with lib.maintainers; [
kira-bruneau
stunkymonkey
];
teams = [ lib.teams.gnome-circle ];
platforms = lib.platforms.unix;
mainProgram = "io.gitlab.news_flash.NewsFlash";
};
})