@@ -1,46 +1,41 @@
1−{ stdenv, fetchurl, python3Packages, gst_all_1, makeWrapper, gobjectIntrospection
2−, gtk3, libwnck3, keybinder, intltool, libcanberra-gtk2 }:
1+{ stdenv, fetchurl, substituteAll, python3, gst_all_1, wrapGAppsHook, gobjectIntrospection
2+, gtk3, libwnck3, keybinder3, intltool, libcanberra-gtk3, libappindicator-gtk3, libpulseaudio }:
33
4−
5−python3Packages.buildPythonApplication rec {
4+python3.pkgs.buildPythonApplication rec {
65 name = "kazam-${version}";
7− version = "1.4.3";
6+ version = "1.4.5";
87 namePrefix = "";
98
109 src = fetchurl {
1110 url = "https://launchpad.net/kazam/stable/${version}/+download/kazam-${version}.tar.gz";
12− sha256 = "00bcn0yj9xrv87sf6xd3wpilsjgjpsj15zzpjh351ffpjnr0ica8";
11+ sha256 = "1qygnrvm6aqixbyivhssp70hs0llxwk7lh3j7idxa2jbkk06hj4f";
1312 };
1413
15− # TODO: keybinder, appindicator3
16− buildInputs = with python3Packages;
17− [ pygobject3 pyxdg pycairo gst_all_1.gstreamer gst_all_1.gst-plugins-base
18− gst_all_1.gst-plugins-good gobjectIntrospection gtk3 libwnck3 distutils_extra
19− intltool dbus-python ];
20−
21− # TODO: figure out why PYTHONPATH is not passed automatically for those programs
22− pythonPath = with python3Packages;
23− [ pygobject3 pyxdg pycairo dbus-python ];
24−
25− patches = [ ./datadir.patch ./bug_1190693.patch ];
26− prePatch = ''
27− rm setup.cfg
28− substituteInPlace kazam/backend/grabber.py --replace "/usr/bin/canberra-gtk-play" "${libcanberra-gtk2}/bin/canberra-gtk-play"
29− '';
14+ nativeBuildInputs = [ gobjectIntrospection python3.pkgs.distutils_extra intltool wrapGAppsHook ];
15+ buildInputs = [
16+ gst_all_1.gstreamer gst_all_1.gst-plugins-base gst_all_1.gst-plugins-good gtk3 libwnck3
17+ keybinder3 libappindicator-gtk3
18+ ];
19+
20+ propagatedBuildInputs = with python3.pkgs; [ pygobject3 pyxdg pycairo dbus-python ];
21+
22+ patches = [
23+ # Fix paths
24+ (substituteAll {
25+ src = ./fix-paths.patch;
26+ libcanberra = libcanberra-gtk3;
27+ inherit libpulseaudio;
28+ })
29+ # Fix compability with Python 3.4
30+ (fetchurl {
31+ url = https://sources.debian.org/data/main/k/kazam/1.4.5-2/debian/patches/configparser_api_changes.patch;
32+ sha256 = "0yvmipnh98s7y07cp1f113l0qqfw65k13an96byq707z3ymv1c2h";
33+ })
34+ ];
3035
3136 # no tests
3237 doCheck = false;
3338
34− preFixup = ''
35− wrapProgram $out/bin/kazam \
36− --prefix GI_TYPELIB_PATH : "$GI_TYPELIB_PATH" \
37− --prefix LD_LIBRARY_PATH ":" "${stdenv.lib.makeLibraryPath [ gtk3 gst_all_1.gstreamer keybinder ]}" \
38− --prefix GST_PLUGIN_SYSTEM_PATH : "$GST_PLUGIN_SYSTEM_PATH" \
39− --prefix XDG_DATA_DIRS : "${gtk3.out}/share" \
40− --set GST_REGISTRY "/tmp/kazam.gstreamer.registry";
41− '';
42−
43−
4439 meta = with stdenv.lib; {
4540 description = "A screencasting program created with design in mind";
4641 homepage = https://code.launchpad.net/kazam;