add overlays, pkgs
This commit is contained in:
51
utils/pkgs/linux-enable-ir-emitter/default.nix
Normal file
51
utils/pkgs/linux-enable-ir-emitter/default.nix
Normal file
@@ -0,0 +1,51 @@
|
||||
{ stdenv
|
||||
, lib
|
||||
, makeWrapper
|
||||
, fetchFromGitHub
|
||||
, fetchurl
|
||||
, meson
|
||||
, ninja
|
||||
, pkg-config
|
||||
, python3
|
||||
, opencv
|
||||
, usbutils
|
||||
}:
|
||||
stdenv.mkDerivation rec {
|
||||
pname = "linux-enable-ir-emitter";
|
||||
version = "4.5.0";
|
||||
|
||||
src = fetchFromGitHub {
|
||||
owner = "EmixamPP";
|
||||
repo = pname;
|
||||
rev = version;
|
||||
hash = "sha256-Dv1ukn2TkXfBk1vc+6Uq7tw8WwCAfIcKl13BoOifz+Q=";
|
||||
};
|
||||
|
||||
patches = [
|
||||
# Prevent `linux-enable-ir-emitter configure` from trying to enable systemd service, NixOS manages those declaratively.
|
||||
./remove-boot-set.patch
|
||||
];
|
||||
|
||||
nativeBuildInputs = [
|
||||
makeWrapper
|
||||
meson
|
||||
ninja
|
||||
pkg-config
|
||||
];
|
||||
buildInputs = [
|
||||
python3
|
||||
opencv
|
||||
];
|
||||
|
||||
postInstall = ''
|
||||
wrapProgram $out/bin/${pname} --prefix PATH : ${lib.makeBinPath [usbutils]}
|
||||
'';
|
||||
|
||||
meta = {
|
||||
description = "Provides support for infrared cameras that are not directly enabled out-of-the box";
|
||||
homepage = "https://github.com/EmixamPP/linux-enable-ir-emitter";
|
||||
license = lib.licenses.mit;
|
||||
maintainers = with lib.maintainers; [ fufexan ];
|
||||
platforms = lib.platforms.linux;
|
||||
};
|
||||
}
|
||||
11
utils/pkgs/linux-enable-ir-emitter/remove-boot-set.patch
Normal file
11
utils/pkgs/linux-enable-ir-emitter/remove-boot-set.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
diff --git a/sources/command/configure.py b/sources/command/configure.py
|
||||
index 2cd20d2..84ffb73 100644
|
||||
--- a/sources/command/configure.py
|
||||
+++ b/sources/command/configure.py
|
||||
@@ -25,6 +25,5 @@ def configure(device: str, emitters: int, neg_answer_limit: int) -> NoReturn:
|
||||
logging.info("Do not hesitate to visit the GitHub ! https://github.com/EmixamPP/linux-enable-ir-emitter/wiki")
|
||||
else:
|
||||
logging.info("The driver has been successfully generated.")
|
||||
- boot("enable")
|
||||
|
||||
exit(exit_code)
|
||||
Reference in New Issue
Block a user