1{
2 lib,
3 rustPlatform,
4 fetchFromGitLab,
5 pkg-config,
6 wrapGAppsHook4,
7 libadwaita,
8 openssl,
9 webkitgtk_6_0,
10 sqlite,
11 glib-networking,
12}:
13
14rustPlatform.buildRustPackage {
15 pname = "hackgregator";
16 version = "0.5.0-unstable-2023-12-05";
17
18 src = fetchFromGitLab {
19 owner = "gunibert";
20 repo = "hackgregator";
21 rev = "594bdcdc3919c7216d611ddbbc77ab4d0c1f4f2b";
22 hash = "sha256-RE0x4YWquWAcQzxGk9zdNjEp1pijrBtjV1EMBu9c5cs=";
23 };
24
25 cargoHash = "sha256-XI0dpW0BQoTgw7rCNTA3Imo5tU1eMqLvIHyqQD3sC6Q=";
26
27 nativeBuildInputs = [
28 pkg-config
29 wrapGAppsHook4
30 ];
31
32 buildInputs = [
33 libadwaita
34 openssl
35 webkitgtk_6_0
36 sqlite
37 glib-networking
38 ];
39
40 # 'error[E0432]: unresolved import' when compiling checks
41 doCheck = false;
42
43 postInstall = ''
44 rm $out/bin/xtask
45 mkdir -p $out/share
46 pushd hackgregator/data
47 cp -r icons $out/share/icons
48 install -Dm644 de.gunibert.Hackgregator.desktop -t $out/share/applications
49 install -Dm644 de.gunibert.Hackgregator.appdata.xml -t $out/share/appdata
50 popd
51 '';
52
53 meta = {
54 description = "Comfortable GTK reader application for news.ycombinator.com";
55 homepage = "https://gitlab.com/gunibert/hackgregator";
56 license = with lib.licenses; [
57 gpl3Plus
58 # and
59 cc0
60 ];
61 mainProgram = "hackgregator";
62 maintainers = with lib.maintainers; [ aleksana ];
63 platforms = lib.platforms.unix;
64 };
65}