commit
fc98560b99
5 changed files with 71 additions and 0 deletions
12
nixos/modules/hardware/flirc.nix
Normal file
12
nixos/modules/hardware/flirc.nix
Normal 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 ];
|
||||
};
|
||||
}
|
|
@ -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
|
||||
|
|
11
pkgs/applications/video/flirc/99-flirc.rules
Normal file
11
pkgs/applications/video/flirc/99-flirc.rules
Normal 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"
|
45
pkgs/applications/video/flirc/default.nix
Normal file
45
pkgs/applications/video/flirc/default.nix
Normal 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" ];
|
||||
};
|
||||
}
|
|
@ -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 { };
|
||||
|
|
Loading…
Reference in a new issue