3
0
Fork 0
forked from mirrors/nixpkgs

Merge pull request #142433 from aanderse/flirc

flirc: init at 3.24.3
This commit is contained in:
Aaron Andersen 2021-11-02 22:55:41 -04:00 committed by GitHub
commit fc98560b99
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
5 changed files with 71 additions and 0 deletions

View file

@ -0,0 +1,12 @@
{ config, lib, pkgs, ... }:
let
cfg = config.hardware.flirc;
in
{
options.hardware.flirc.enable = lib.mkEnableOption "software to configure a Flirc USB device";
config = lib.mkIf cfg.enable {
environment.systemPackages = [ pkgs.flirc ];
services.udev.packages = [ pkgs.flirc ];
};
}

View file

@ -49,6 +49,7 @@
./hardware/digitalbitbox.nix
./hardware/device-tree.nix
./hardware/gkraken.nix
./hardware/flirc.nix
./hardware/i2c.nix
./hardware/sensor/hddtemp.nix
./hardware/sensor/iio.nix

View file

@ -0,0 +1,11 @@
# Flirc Devices
# Bootloader
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="20a0", ATTR{idProduct}=="0000", MODE="0666"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="20a0", ATTR{idProduct}=="0002", MODE="0666"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="0005", MODE="0666"
# Flirc Application
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="20a0", ATTR{idProduct}=="0001", MODE="0666"
SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_device", ATTR{idVendor}=="20a0", ATTR{idProduct}=="0004", MODE="0666"
SUBSYSTEM=="hidraw", ATTRS{idVendor}=="20a0", ATTRS{idProduct}=="0006", MODE="0666"

View file

@ -0,0 +1,45 @@
{ lib
, mkDerivation
, fetchurl
, autoPatchelfHook
, hidapi
, readline
, qtsvg
, qtxmlpatterns
}:
mkDerivation rec {
pname = "flirc";
version = "3.24.3";
src = fetchurl {
url = "https://web.archive.org/web/20211021211803/http://apt.flirc.tv/arch/x86_64/flirc.latest.x86_64.tar.gz";
sha256 = "0p4pp7j70lbw6m25lmjg6ibc67r6jcy7qs3kki9f86ji1jvrxpga";
};
nativeBuildInputs = [ autoPatchelfHook ];
buildInputs = [
hidapi
readline
qtsvg
qtxmlpatterns
];
dontConfigure = true;
dontBuild = true;
# udev rules don't appear in the official package
# https://flirc.gitbooks.io/flirc-instructions/content/linux.html
installPhase = ''
install -D -t $out/bin/ Flirc flirc_util
install -D ${./99-flirc.rules} $out/lib/udev/rules.d/99-flirc.rules
'';
meta = with lib; {
homepage = "https://flirc.tv/more/flirc-usb";
description = "Use any Remote with your Media Center";
maintainers = with maintainers; [ aanderse ];
license = licenses.unfree;
platforms = [ "x86_64-linux" ];
};
}

View file

@ -1669,6 +1669,8 @@ with pkgs;
flavours = callPackage ../applications/misc/flavours { };
flirc = libsForQt5.callPackage ../applications/video/flirc { };
flood = nodePackages.flood;
font-config-info = callPackage ../tools/misc/font-config-info { };