git.iko.soy/typeable/nixpkgs
on master help sign in
kazam: 1.4.3 → 1.4.5
commit8416cd0326c3c8845cc9796223e9ab802290002f authorJan Tojnar <jtojnar@gmail.com> dateSun 15 Apr 2018, 13:39 (9 years ago) parentfe21f16
4 files changed+48−56
pkgs/applications/video/kazam/bug_1190693.patch−14 pkgs/applications/video/kazam/datadir.patch−11 pkgs/applications/video/kazam/default.nix+26−31 pkgs/applications/video/kazam/fix-paths.patch+22
pkgs/applications/video/kazam/bug_1190693.patchdeleted−14
@@ -1,14 +0,0 @@
1−=== modified file 'kazam/frontend/indicator.py'
2−--- a/kazam/frontend/indicator.py 2013-01-26 01:53:53 +0000
3−+++ b/kazam/frontend/indicator.py 2013-06-13 18:18:37 +0000
4−@@ -291,3 +291,9 @@
5− def start_recording(self):
6− logger.debug("Recording started.")
7− self.indicator.set_from_icon_name("kazam-recording")
8−+
9−+ def hide_it(self):
10−+ self.indicator.set_visible(False)
11−+
12−+ def show_it(self):
13−+ self.indicator.set_visible(True)
14−
pkgs/applications/video/kazam/datadir.patchdeleted−11
@@ -1,11 +0,0 @@
1−--- a/bin/kazam 2014-02-03 23:11:38.465614061 +0100
2−+++ b/bin/kazam-1 2014-02-03 23:12:28.447058700 +0100
3−@@ -68,7 +68,7 @@
4− # when base install path is not /usr
5− curpath = os.path.abspath(__file__)
6− curpath = os.path.realpath(curpath)
7−- datadir = curpath.split('bin/')[0] + "share/kazam/"
8−+ datadir = os.path.realpath(os.path.join(curpath, "./../../", "share/kazam/"))
9−
10− try:
11− import platform
pkgs/applications/video/kazam/default.nix+26−31
@@ -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;
pkgs/applications/video/kazam/fix-paths.patchnew file+22
@@ -0,0 +1,22 @@
1+--- a/kazam/backend/grabber.py
2++++ b/kazam/backend/grabber.py
3+@@ -72,7 +72,7 @@
4+ #
5+ if prefs.shutter_sound and (not self.god):
6+ soundfile = os.path.join(prefs.datadir, 'sounds', prefs.sound_files[prefs.shutter_type])
7+- subprocess.call(['/usr/bin/canberra-gtk-play', '-f', soundfile])
8++ subprocess.call(['@libcanberra@/bin/canberra-gtk-play', '-f', soundfile])
9+
10+ if self.xid:
11+ if prefs.capture_borders_pic:
12+--- a/kazam/pulseaudio/ctypes_pulseaudio.py
13++++ b/kazam/pulseaudio/ctypes_pulseaudio.py
14+@@ -20,7 +20,7 @@
15+ # MA 02110-1301, USA.
16+
17+ from ctypes import *
18+-PA = CDLL('libpulse.so.0')
19++PA = CDLL('@libpulseaudio@/lib/libpulse.so.0')
20+
21+ #
22+ # Pulse Audio constants and defines