add overlays, pkgs

This commit is contained in:
2023-07-13 13:09:17 +02:00
parent c7aef44265
commit e21a47a2b5
34 changed files with 8812 additions and 2 deletions

View 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;
};
}

View 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)