1{
2 stdenv,
3 lib,
4 fetchFromGitHub,
5 motif,
6 xorg,
7 withAudioTracking ? false,
8 libpulseaudio,
9 aubio,
10}:
11
12stdenv.mkDerivation {
13 pname = "catclock";
14 version = "0-unstable-2021-11-15";
15
16 src = fetchFromGitHub {
17 owner = "BarkyTheDog";
18 repo = "catclock";
19 rev = "b2f277974b5a80667647303cabf8a89d6d6a4290";
20 sha256 = "0ls02j9waqg155rj6whisqm7ppsdabgkrln92n4rmkgnwv25hdbi";
21 };
22
23 preInstall = ''
24 mkdir -p $out/bin
25 mkdir -p $out/share/man/man1
26 cp xclock.man $out/share/man/man1/xclock.1
27 '';
28
29 makeFlags = [
30 "DESTINATION=$(out)/bin/"
31 "CFLAGS=-Wno-incompatible-pointer-types"
32 ]
33 ++ lib.optional withAudioTracking "WITH_TEMPO_TRACKER=1";
34
35 buildInputs = [
36 motif
37 xorg.libX11
38 xorg.libXext
39 xorg.libXt
40 ]
41 ++ lib.optionals withAudioTracking [
42 libpulseaudio
43 aubio
44 ];
45
46 meta = with lib; {
47 homepage = "http://codefromabove.com/2014/05/catclock/";
48 description = "Analog / Digital / Cat clock for X";
49 license = with licenses; mit;
50 maintainers = with maintainers; [ ramkromberg ];
51 mainProgram = "xclock";
52 platforms = with platforms; linux ++ darwin;
53 };
54}