From b135222dc7ab3e97bef0a80cd41c9f19a1222abf Mon Sep 17 00:00:00 2001 From: Grimmauld Date: Thu, 22 May 2025 10:13:27 +0200 Subject: [PATCH] libusb1: propagate udevCheckHook Dependents of `libusb1` specifically deal with hardware devices, often specifically exposing udev rules for those. It makes sense to propagate the `udevCheckHook` here. Dependents still need to enable `doInstallCheck`. It is possible to opt out of `udevCheckHook` by setting `env.dontUdevCheck`. --- pkgs/by-name/li/libusb1/package.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/by-name/li/libusb1/package.nix b/pkgs/by-name/li/libusb1/package.nix index 5a82af646da5..004ac429328a 100644 --- a/pkgs/by-name/li/libusb1/package.nix +++ b/pkgs/by-name/li/libusb1/package.nix @@ -8,6 +8,7 @@ enableUdev ? stdenv.hostPlatform.isLinux && !stdenv.hostPlatform.isStatic && !stdenv.hostPlatform.isAndroid, udev, + udevCheckHook, withExamples ? false, withStatic ? false, withDocs ? stdenv.buildPlatform.canExecute stdenv.hostPlatform, @@ -35,6 +36,10 @@ stdenv.mkDerivation rec { ] ++ lib.optionals withDocs [ doxygen ]; propagatedBuildInputs = lib.optional enableUdev udev; + # Many dependents are dealing with hardware devices, exposing udev rules for them. + # Checking these by propagated hook might improve discoverability + propagatedNativeBuildInputs = lib.optional enableUdev udevCheckHook; + dontDisableStatic = withStatic; # libusb-1.0.rc:11: fatal error: opening dependency file .deps/libusb-1.0.Tpo: No such file or directory