about summary refs log tree commit diff
path: root/pkgs/desktops/gnome/apps/cheese/default.nix
blob: ce5d841c9dd8156a305726ed5cfea8bb95f1e569 (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
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
{ lib
, stdenv
, gettext
, fetchurl
, wrapGAppsHook
, gnome-video-effects
, libcanberra-gtk3
, pkg-config
, gtk3
, glib
, clutter-gtk
, clutter-gst
, gst_all_1
, itstool
, vala
, docbook_xml_dtd_43
, docbook-xsl-nons
, appstream-glib
, libxslt
, gtk-doc
, adwaita-icon-theme
, librsvg
, totem
, gdk-pixbuf
, gnome
, gnome-desktop
, libxml2
, meson
, ninja
, dbus
, pipewire
}:

stdenv.mkDerivation rec {
  pname = "cheese";
  version = "44.1";

  outputs = [ "out" "man" "devdoc" ];

  src = fetchurl {
    url = "mirror://gnome/sources/cheese/${lib.versions.major version}/${pname}-${version}.tar.xz";
    sha256 = "XyGFxMmeVN3yuLr2DIKBmVDlSVLhMuhjmHXz7cv49o4=";
  };

  nativeBuildInputs = [
    appstream-glib
    docbook_xml_dtd_43
    docbook-xsl-nons
    gettext
    gtk-doc
    itstool
    libxml2
    libxslt # for xsltproc
    meson
    ninja
    pkg-config
    vala
    wrapGAppsHook
    glib # for glib-compile-schemas
  ];

  buildInputs = [
    adwaita-icon-theme
    clutter-gst
    clutter-gtk
    dbus
    gdk-pixbuf
    glib
    gnome-desktop
    gnome-video-effects
    gst_all_1.gst-plugins-bad
    gst_all_1.gst-plugins-base
    gst_all_1.gst-plugins-good
    gst_all_1.gstreamer
    gtk3
    libcanberra-gtk3
    librsvg
    pipewire # PipeWire provides a gstreamer plugin for using PipeWire for video
  ];

  preFixup = ''
    gappsWrapperArgs+=(
      # Effects
      --prefix XDG_DATA_DIRS : "${gnome-video-effects}/share"
      # vp8enc preset
      --prefix GST_PRESET_PATH : "${gst_all_1.gst-plugins-good}/share/gstreamer-1.0/presets"
      # Thumbnailers
      --prefix XDG_DATA_DIRS : "${gdk-pixbuf}/share"
      --prefix XDG_DATA_DIRS : "${totem}/share"
    )
  '';

  passthru = {
    updateScript = gnome.updateScript {
      packageName = "cheese";
      attrPath = "gnome.cheese";
    };
  };

  meta = with lib; {
    homepage = "https://wiki.gnome.org/Apps/Cheese";
    description = "Take photos and videos with your webcam, with fun graphical effects";
    mainProgram = "cheese";
    maintainers = teams.gnome.members;
    license = licenses.gpl2Plus;
    platforms = platforms.linux;
  };
}