nixpkgs mirror (for testing)
github.com/NixOS/nixpkgs
nix
1{
2 lib,
3 stdenv,
4 fetchFromGitLab,
5 rustPlatform,
6 blueprint-compiler,
7 cargo,
8 desktop-file-utils,
9 meson,
10 ninja,
11 pkg-config,
12 rustc,
13 wrapGAppsHook4,
14 gdk-pixbuf,
15 clapper-unwrapped,
16 gtk4,
17 libadwaita,
18 libxml2,
19 openssl,
20 sqlite,
21 webkitgtk_6_0,
22 glib-networking,
23 librsvg,
24 gst_all_1,
25 gitUpdater,
26}:
27
28stdenv.mkDerivation (finalAttrs: {
29 pname = "newsflash";
30 version = "4.1.2";
31
32 src = fetchFromGitLab {
33 owner = "news-flash";
34 repo = "news_flash_gtk";
35 tag = "v.${finalAttrs.version}";
36 hash = "sha256-yNO9ju5AQzMeZlQN1f3FRiFA6hq89mSuQClrJkoM+xE=";
37 };
38
39 cargoDeps = rustPlatform.fetchCargoVendor {
40 inherit (finalAttrs) pname version src;
41 hash = "sha256-gF1wHLM5t0jYm/nWQQeAbDlExsPYNV0/YYH0yfQuetM=";
42 };
43
44 postPatch = ''
45 patchShebangs build-aux/cargo.sh
46 meson rewrite kwargs set project / version '${finalAttrs.version}'
47 '';
48
49 strictDeps = true;
50
51 nativeBuildInputs = [
52 blueprint-compiler
53 cargo
54 desktop-file-utils
55 meson
56 ninja
57 pkg-config
58 rustc
59 rustPlatform.bindgenHook
60 rustPlatform.cargoSetupHook
61 wrapGAppsHook4
62
63 # Provides setup hook to fix "Unrecognized image file format"
64 gdk-pixbuf
65
66 ];
67
68 buildInputs = [
69 clapper-unwrapped
70 gtk4
71 libadwaita
72 libxml2
73 openssl
74 sqlite
75 webkitgtk_6_0
76
77 # TLS support for loading external content in webkitgtk WebView
78 glib-networking
79
80 # SVG support for gdk-pixbuf
81 librsvg
82 ]
83 ++ (with gst_all_1; [
84 # Audio & video support for webkitgtk WebView
85 gstreamer
86 gst-plugins-base
87 gst-plugins-good
88 gst-plugins-bad
89 ]);
90
91 passthru.updateScript = gitUpdater {
92 rev-prefix = "v.";
93 ignoredVersions = "(alpha|beta|rc)";
94 };
95
96 meta = {
97 description = "Modern feed reader designed for the GNOME desktop";
98 homepage = "https://gitlab.com/news-flash/news_flash_gtk";
99 license = lib.licenses.gpl3Plus;
100 maintainers = with lib.maintainers; [
101 kira-bruneau
102 stunkymonkey
103 ];
104 teams = [ lib.teams.gnome-circle ];
105 platforms = lib.platforms.unix;
106 mainProgram = "io.gitlab.news_flash.NewsFlash";
107 };
108})