aboutsummaryrefslogtreecommitdiff
path: root/pkgs/ahoviewer.nix
blob: 1effbc6966058b081227a647fa82c46f839b0d87 (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
{ pkgs, source }:
pkgs.stdenv.mkDerivation {
  inherit (source) version;

  pname = "ahoviewer";

  src = pkgs.fetchzip {
    inherit (source) url sha256;
  };

  buildInputs = with pkgs; [
    meson
    ninja
    gtkmm3
    gtk3
    libconfig
    libxml2
    curl
    gst_all_1.gstreamer
    gst_all_1.gst-plugins-base
    libpeas
    libsecret
    libzip
    gobject-introspection
    (gst_all_1.gst-plugins-good.override { gtkSupport = true; })
    gst_all_1.gst-plugins-bad
    gst_all_1.gst-plugins-ugly
    gst_all_1.gst-libav
  ];

  nativeBuildInputs = with pkgs; [
    pkg-config
    wrapGAppsHook4
  ];

  configurePhase = "meson setup build --buildtype=release";

  buildPhase = ''
    cd build
    ninja
    cd ..
  '';

  installPhase = ''
    mkdir -p $out/bin
    cp build/src/ahoviewer $out/bin
  '';

  meta = with pkgs.lib; {
    description = "A GTK image viewer, manga reader, and booru browser";
    homepage = "https://github.com/ahodesuka/ahoviewer";
    license = licenses.mit;
    maintainers = [ maintainers.Fuwn ];
    platforms = platforms.linux;
  };
}