1{
2 lib,
3 stdenv,
4 fetchurl,
5 autoPatchelfHook,
6 wrapQtAppsHook,
7 hidapi,
8 readline,
9 qtsvg,
10 qtxmlpatterns,
11}:
12
13stdenv.mkDerivation {
14 pname = "flirc";
15 version = "3.27.15";
16
17 src = fetchurl {
18 url = "https://web.archive.org/web/20240626115121/http://apt.flirc.tv/arch/x86_64/flirc.latest.x86_64.tar.gz";
19 hash = "sha256-8bUsOsp5obJJdZU9QHfJnZKNAXJwi0nrHkSeDTE1Xa4=";
20 };
21
22 nativeBuildInputs = [
23 autoPatchelfHook
24 wrapQtAppsHook
25 ];
26
27 buildInputs = [
28 hidapi
29 readline
30 qtsvg
31 qtxmlpatterns
32 ];
33
34 dontConfigure = true;
35 dontBuild = true;
36
37 # udev rules don't appear in the official package
38 # https://flirc.gitbooks.io/flirc-instructions/content/linux.html
39 installPhase = ''
40 install -D -t $out/bin/ Flirc flirc_util
41 install -D ${./99-flirc.rules} $out/lib/udev/rules.d/99-flirc.rules
42 '';
43
44 meta = with lib; {
45 homepage = "https://flirc.tv/more/flirc-usb";
46 description = "Use any Remote with your Media Center";
47 maintainers = with maintainers; [ aanderse ];
48 sourceProvenance = with sourceTypes; [ binaryNativeCode ];
49 license = licenses.unfree;
50 mainProgram = "Flirc";
51 platforms = [ "x86_64-linux" ];
52 };
53}