summary refs log tree commit diff
path: root/pkgs/applications/video/kazam/default.nix
blob: 9113ff75bfd867f59f77695c7c394d1082b81dbe (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
{ stdenv, fetchurl, python3Packages, gst_all_1, makeWrapper, gobjectIntrospection
, gtk3, libwnck3, keybinder, intltool, libcanberra }:


python3Packages.buildPythonApplication rec {
  name = "kazam-${version}";
  version = "1.4.3";
  namePrefix = "";

  src = fetchurl {
    url = "https://launchpad.net/kazam/stable/${version}/+download/kazam-${version}.tar.gz";
    sha256 = "00bcn0yj9xrv87sf6xd3wpilsjgjpsj15zzpjh351ffpjnr0ica8";
  };

  # TODO: keybinder, appindicator3
  buildInputs = with python3Packages;
    [ pygobject3 pyxdg pycairo gst_all_1.gstreamer gst_all_1.gst-plugins-base
      gst_all_1.gst-plugins-good gobjectIntrospection gtk3 libwnck3 distutils_extra
      intltool dbus-python ];

  # TODO: figure out why PYTHONPATH is not passed automatically for those programs
  pythonPath = with python3Packages;
    [ pygobject3 pyxdg pycairo dbus-python ];

  patches = [ ./datadir.patch ./bug_1190693.patch ];
  prePatch = ''
    rm setup.cfg
    substituteInPlace kazam/backend/grabber.py --replace "/usr/bin/canberra-gtk-play" "${libcanberra}/bin/canberra-gtk-play"
  '';

  # no tests
  doCheck = false;

  preFixup = ''
    wrapProgram $out/bin/kazam \
      --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
      --prefix LD_LIBRARY_PATH ":" "${stdenv.lib.makeLibraryPath [ gtk3 gst_all_1.gstreamer keybinder ]}" \
      --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" \
      --prefix XDG_DATA_DIRS : "${gtk3.out}/share" \
      --set GST_REGISTRY "/tmp/kazam.gstreamer.registry";
  '';


  meta = with stdenv.lib; {
    description = "Cross-platform, Friend-2-Friend and secure decentralised communication platform";
    homepage = https://code.launchpad.net/kazam;
    #license = licenses.bsd2;
    platforms = platforms.linux;
    maintainers = [ maintainers.domenkozar ];
  };
}