1{
2 lib,
3 fetchFromGitHub,
4 mkDerivation,
5 pkg-config,
6 qtbase,
7 qttools,
8 qmake,
9 qtmultimedia,
10 qtx11extras,
11 alsa-lib,
12 libv4l,
13 libXrandr,
14 ffmpeg,
15}:
16
17mkDerivation rec {
18
19 pname = "vokoscreen";
20 version = "2.5.8-beta";
21
22 src = fetchFromGitHub {
23 owner = "vkohaupt";
24 repo = "vokoscreen";
25 rev = version;
26 sha256 = "1a85vbsi53mhzva49smqwcs61c51wv3ic410nvb9is9nlsbifwan";
27 };
28
29 nativeBuildInputs = [
30 pkg-config
31 qmake
32 ];
33 buildInputs = [
34 alsa-lib
35 libv4l
36 qtbase
37 qtmultimedia
38 qttools
39 qtx11extras
40 libXrandr
41 ];
42
43 patches = [
44 ./ffmpeg-out-of-box.patch
45 ];
46
47 # Workaround build failure on -fno-common toolchains:
48 # ld: alsa_device.o:(.bss+0x8): multiple definition of `rc'; QvkAlsaDevice.o:(.bss+0x8): first defined here
49 env.NIX_CFLAGS_COMPILE = "-fcommon";
50
51 preConfigure = ''
52 sed -i 's/lrelease-qt5/lrelease/g' vokoscreen.pro
53 '';
54
55 postConfigure = ''
56 substituteInPlace settings/QvkSettings.cpp --subst-var-by ffmpeg ${ffmpeg}
57 '';
58
59 meta = with lib; {
60 description = "Simple GUI screencast recorder, using ffmpeg";
61 homepage = "https://linuxecke.volkoh.de/vokoscreen/vokoscreen.html";
62 longDescription = ''
63 vokoscreen is an easy to use screencast creator to record
64 educational videos, live recordings of browser, installation,
65 videoconferences, etc.
66 '';
67 license = licenses.gpl2Plus;
68 maintainers = [ maintainers.league ];
69 platforms = platforms.linux;
70 mainProgram = "vokoscreen";
71 };
72}