1{
2 lib,
3 stdenv,
4 fetchFromGitHub,
5 autoreconfHook,
6 makeWrapper,
7 perl,
8 ffmpeg-full,
9 gawk,
10 imagemagick,
11 xdpyinfo,
12 xprop,
13 xrectsel,
14 xwininfo,
15}:
16
17stdenv.mkDerivation rec {
18 pname = "ffcast";
19 version = "2.5.1";
20
21 src = fetchFromGitHub {
22 owner = "ropery";
23 repo = "FFcast";
24 rev = version;
25 sha256 = "sha256-kxqwDGEguFTFHkQzXctXqxslt0+bYnfUdQ8C/8+eTXo=";
26 };
27
28 nativeBuildInputs = [
29 autoreconfHook
30 makeWrapper
31 perl # for pod2man
32 ];
33
34 configureFlags = [ "--disable-xrectsel" ];
35
36 postInstall =
37 let
38 binPath = lib.makeBinPath [
39 ffmpeg-full
40 gawk
41 imagemagick
42 xdpyinfo
43 xprop
44 xrectsel
45 xwininfo
46 ];
47 in
48 ''
49 wrapProgram $out/bin/ffcast --prefix PATH : ${binPath}
50 '';
51
52 meta = {
53 description = "Run commands on rectangular screen regions";
54 homepage = "https://github.com/ropery/FFcast";
55 license = lib.licenses.gpl3Plus;
56 maintainers = with lib.maintainers; [ sikmir ];
57 platforms = lib.platforms.linux;
58 mainProgram = "ffcast";
59 };
60}