push sheeet
Some checks failed
Periodic Merges (6h) / master → staging-nixos (push) Failing after 12m50s
Periodic Merges (6h) / master → staging-next (push) Failing after 12m54s
Periodic Merges (24h) / merge-base(master,staging) → haskell-updates (push) Failing after 11m54s
Periodic Merges (6h) / staging-next → staging (push) Failing after 12m13s
Periodic Merges (24h) / staging-next-25.05 → staging-25.05 (push) Failing after 13m24s
Periodic Merges (24h) / release-25.05 → staging-next-25.05 (push) Failing after 14m28s

This commit is contained in:
Dark Steveneq
2025-10-09 14:15:47 +02:00
commit 646b892680
49168 changed files with 5897842 additions and 0 deletions

View File

@@ -0,0 +1,35 @@
--- a/daemons/lircd.cpp
+++ b/daemons/lircd.cpp
@@ -110,6 +110,17 @@ int clock_gettime(int clk_id, struct timespec *t){
#endif
#define WHITE_SPACE " \t"
+/* Defines removed in linux-headers-5.18:
+ https://sourceforge.net/p/lirc/git/merge-requests/45/
+ */
+#ifndef LIRC_CAN_SET_REC_FILTER
+# define LIRC_CAN_SET_REC_FILTER 0x08000000
+#endif
+
+#ifndef LIRC_CAN_NOTIFY_DECODE
+# define LIRC_CAN_NOTIFY_DECODE 0x01000000
+#endif
+
static const logchannel_t logchannel = LOG_APP;
/** How long we sleep while waiting for busy write sockets. */
--- a/tools/lirc-lsplugins.cpp
+++ b/tools/lirc-lsplugins.cpp
@@ -21,6 +21,12 @@
#include "config.h"
#include "lirc_private.h"
+/* Defines removed in linux-headers-5.18:
+ https://sourceforge.net/p/lirc/git/merge-requests/45/
+ */
+#ifndef LIRC_CAN_NOTIFY_DECODE
+# define LIRC_CAN_NOTIFY_DECODE 0x01000000
+#endif
#define USAGE \
"\nSynopsis:\n" \

View File

@@ -0,0 +1,125 @@
{
lib,
stdenv,
fetchurl,
fetchpatch,
autoreconfHook,
pkg-config,
help2man,
python3,
linuxHeaders,
alsa-lib,
libxslt,
systemd,
libusb-compat-0_1,
libftdi1,
libICE,
libSM,
libX11,
}:
let
pythonEnv = python3.pythonOnBuildForHost.withPackages (
p: with p; [
pyyaml
setuptools
]
);
in
stdenv.mkDerivation rec {
pname = "lirc";
version = "0.10.2";
src = fetchurl {
url = "mirror://sourceforge/lirc/${pname}-${version}.tar.bz2";
sha256 = "sha256-PUTsgnSIHPJi8WCAVkHwgn/8wgreDYXn5vO5Dg09Iio=";
};
patches = [
# Fix installation of Python bindings
(fetchpatch {
url = "https://sourceforge.net/p/lirc/tickets/339/attachment/0001-Fix-Python-bindings.patch";
sha256 = "088a39x8c1qd81qwvbiqd6crb2lk777wmrs8rdh1ga06lglyvbly";
})
# Add a workaround for linux-headers-5.18 until upstream adapts:
# https://sourceforge.net/p/lirc/git/merge-requests/45/
./linux-headers-5.18.patch
# remove check for `Ubuntu` in /proc/version which will override
# --with-systemdsystemunitdir
# https://sourceforge.net/p/lirc/tickets/385/
./ubuntu.diff
];
postPatch = ''
patchShebangs .
# fix overriding PYTHONPATH
sed -i 's,^PYTHONPATH *= *,PYTHONPATH := $(PYTHONPATH):,' \
Makefile.in
sed -i 's,PYTHONPATH=,PYTHONPATH=$(PYTHONPATH):,' \
doc/Makefile.in
# Pull fix for new pyyaml pending upstream inclusion
# https://sourceforge.net/p/lirc/git/merge-requests/39/
substituteInPlace python-pkg/lirc/database.py --replace 'yaml.load(' 'yaml.safe_load('
# cant import '/build/lirc-0.10.1/python-pkg/lirc/_client.so' while cross-compiling to check the version
substituteInPlace python-pkg/setup.py \
--replace "VERSION='0.0.0'" "VERSION='${version}'"
'';
preConfigure = ''
export PKGCONFIG="$PKG_CONFIG"
'';
strictDeps = true;
nativeBuildInputs = [
autoreconfHook
help2man
libxslt
pythonEnv
pkg-config
];
buildInputs = [
alsa-lib
systemd
libusb-compat-0_1
libftdi1
libICE
libSM
libX11
];
DEVINPUT_HEADER = "${linuxHeaders}/include/linux/input-event-codes.h";
configureFlags = [
"--sysconfdir=/etc"
"--localstatedir=/var"
"--with-systemdsystemunitdir=$(out)/lib/systemd/system"
"--enable-uinput" # explicit activation because build env has no uinput
"--enable-devinput" # explicit activation because build env has no /dev/input
"--with-lockdir=/run/lirc/lock" # /run/lock is not writable for 'lirc' user
"PYTHON=${pythonEnv.interpreter}"
];
installFlags = [
"sysconfdir=$out/etc"
"localstatedir=$TMPDIR"
];
# Upstream ships broken symlinks in docs
dontCheckForBrokenSymlinks = true;
meta = with lib; {
description = "Allows to receive and send infrared signals";
homepage = "https://www.lirc.org/";
license = licenses.gpl2;
platforms = platforms.linux;
maintainers = with maintainers; [ pSub ];
};
}

View File

@@ -0,0 +1,22 @@
diff --git a/configure.ac b/configure.ac
index d28c673..1cd0548 100644
--- a/configure.ac
+++ b/configure.ac
@@ -434,16 +434,7 @@ AC_CHECK_LIB([udev], [udev_device_new_from_device_id], [
LIBS="$LIBS $LIBUDEV_LIBS"
])
-dnl Ubuntu's systemd pkg-config seems broken beyond repair. So:
-kernelversion=`cat /proc/version || echo "non-linux"`
-AS_CASE([$kernelversion],
- [*Ubuntu*],[
- AC_MSG_NOTICE([Hardwiring Ubuntu systemd setup])
- AC_SUBST([systemdsystemunitdir], [/lib/systemd/system])
- AM_CONDITIONAL([WITH_SYSTEMDSYSTEMUNITDIR], [true])
- ],[*],[
- SYSTEMD_SYSTEMUNITDIR
-])
+SYSTEMD_SYSTEMUNITDIR
AC_ARG_WITH(lockdir,
[ --with-lockdir=DIR Old-school device lock files in DIR (/var/lock{/lockdev})],