about summary refs log tree commit diff
path: root/pkgs/applications/networking/feedreaders/newsflash/default.nix
blob: 3023ca28bfe3528c2fe50d7a333606a92e2a9ab2 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
{ lib
, rustPlatform
, fetchFromGitLab
, gdk-pixbuf
, glib
, meson
, ninja
, pkg-config
, wrapGAppsHook
, gsettings-desktop-schemas
, gtk3
, libhandy
, librsvg
, openssl
, sqlite
, webkitgtk
}:

rustPlatform.buildRustPackage rec {
  pname = "newsflash";
  version = "1.0.1";

  src = fetchFromGitLab {
    owner = "news-flash";
    repo = "news_flash_gtk";
    rev = version;
    sha256 = "1y2jj3z08m29s6ggl8q270mqnvdwibs0f2kxybqhi8mya5pyw902";
  };

  cargoPatches = [
    ./cargo.lock.patch
  ];

  cargoSha256 = "0z3nhzpyckga112wn32zzwwlpqdgi6n53n8nwgggixvpbnh98112";

  patches = [
    ./no-post-install.patch
  ];

  postPatch = ''
    chmod +x build-aux/cargo.sh
    patchShebangs .
  '';

  nativeBuildInputs = [
    gdk-pixbuf # provides setup hook to fix "Unrecognized image file format"
    glib # provides glib-compile-resources to compile gresources
    meson
    ninja
    pkg-config
    wrapGAppsHook
  ];

  buildInputs = [
    gdk-pixbuf
    glib
    gsettings-desktop-schemas # used to get system default font in src/article_view/mod.rs
    gtk3
    libhandy
    librsvg # used by gdk-pixbuf & wrapGAppsHook setup hooks to fix "Unrecognized image file format"
    openssl
    sqlite
    webkitgtk
  ];

  # 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 ];
    platforms = platforms.all;
  };
}