treewide: enable doPostInstall for libusb1 packages that expose udev rules

`libusb1` propagates the `udevCheckHook`.
Packages which depend on `libusb1` and expose udev
rules should enable the `doPostInstall` flag.
This commit is contained in:
Grimmauld 2025-05-23 12:07:11 +02:00
parent b135222dc7
commit 65012b363e
No known key found for this signature in database
72 changed files with 150 additions and 1 deletions

View File

@ -175,6 +175,8 @@ stdenv.mkDerivation rec {
# https://github.com/NixOS/nixpkgs/issues/224569
enableParallelInstalling = false;
doInstallCheck = true;
passthru.tests = {
inherit (nixosTests) sane;
};

View File

@ -37,6 +37,8 @@ mkDerivation rec {
qtwebsockets
];
doInstallCheck = true;
preConfigure = "mkdir -p build && cd build";
qmakeFlags = [ "../Moolticute.pro" ];

View File

@ -49,7 +49,11 @@ mkDerivation rec {
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
$out/bin/openambit --version
runHook postInstallCheck
'';
postInstall = ''

View File

@ -46,6 +46,8 @@ stdenv.mkDerivation rec {
wxGTK32
];
doInstallCheck = true;
postInstall = ''
install -Dm444 -t $out/lib/udev/rules.d ../udev-rules/64-limesuite.rules
install -Dm444 -t $out/share/limesuite bin/Release/lms7suite_mcu/*

View File

@ -62,6 +62,8 @@ stdenv.mkDerivation rec {
cp ${src}/dist/99-qdmr.rules $out/etc/udev/rules.d/
'';
doInstallCheck = true;
meta = {
description = "GUI application and command line tool for programming DMR radios";
homepage = "https://dm3mat.darc.de/qdmr/";

View File

@ -28,6 +28,8 @@ let
"-DWITH_RPC=ON"
];
doInstallCheck = true;
postPatch = ''
substituteInPlace CMakeLists.txt \
--replace '/etc/udev/rules.d' "$out/etc/udev/rules.d" \

View File

@ -52,6 +52,8 @@ stdenv.mkDerivation (finalAttrs: {
python3
] ++ lib.optional stdenv.hostPlatform.isLinux qtwayland;
doInstallCheck = true;
meta = {
description = "GUI program for supporting various instruments from DreamSourceLab, including logic analyzer, oscilloscope, etc";
mainProgram = "DSView";

View File

@ -41,6 +41,8 @@ mkDerivation rec {
sed -i 's#/usr/share#share#g' CMakeLists.txt
'';
doInstallCheck = true;
meta = with lib; {
description = "Free software for Hantek and compatible (Voltcraft/Darkwire/Protek/Acetech) USB digital signal oscilloscopes";
mainProgram = "OpenHantek";

View File

@ -26,6 +26,8 @@ stdenv.mkDerivation rec {
cmake
pkg-config
];
doInstallCheck = true;
buildInputs = [ libusb1 ];
cmakeFlags = lib.optionals stdenv.hostPlatform.isLinux [ "-DINSTALL_UDEV_RULES=ON" ];

View File

@ -33,6 +33,8 @@ stdenv.mkDerivation {
--replace 'MODE="0666"' 'MODE="0660", GROUP="plugdev", TAG+="uaccess"'
'';
doInstallCheck = true;
postInstall = ''
install -D udev/90-cc-debugger.rules $out/lib/udev/rules.d/90-cc-debugger.rules
'';

View File

@ -53,6 +53,8 @@ stdenv.mkDerivation rec {
zlib
];
doInstallCheck = true;
postInstall = ''
install -Dm 0444 -t $out/lib/udev/rules.d ../src/92_pcscd_ccid.rules
substituteInPlace $out/lib/udev/rules.d/92_pcscd_ccid.rules \
@ -68,11 +70,15 @@ stdenv.mkDerivation rec {
};
installCheckPhase = ''
runHook preInstallCheck
[ -f $out/etc/reader.conf.d/libccidtwin ]
[ -f $out/lib/udev/rules.d/92_pcscd_ccid.rules ]
[ -f $out/pcsc/drivers/ifd-ccid.bundle/Contents/Info.plist ]
[ -f $out/pcsc/drivers/ifd-ccid.bundle/Contents/Linux/libccid.so ]
[ -f $out/pcsc/drivers/serial/libccidtwin.so ]
runHook preInstallCheck
'';
meta = with lib; {

View File

@ -34,6 +34,8 @@ stdenv.mkDerivation (finalAttrs: {
EOF
'';
doInstallCheck = true;
postInstall = ''
install -Dm644 -t $out/lib/udev/rules.d 95-{3,}dscapture.rules
install -Dm444 -t $out/share/applications Cute{3,}DSCapture.desktop

View File

@ -39,6 +39,7 @@ stdenv.mkDerivation rec {
];
enableParallelBuilding = true;
doInstallCheck = true;
meta = with lib; {
homepage = "http://www.ddcutil.com/";

View File

@ -27,6 +27,7 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [ libusb1 ];
nativeBuildInputs = [ pkg-config ];
doInstallCheck = true;
udevRules = pkgs.writeText "dediprog.rules" ''
ACTION=="add", SUBSYSTEM=="usb", ATTRS{idVendor}=="0483", ATTRS{idProduct}=="dada", MODE="660", GROUP="plugdev"
'';

View File

@ -32,6 +32,7 @@ stdenv.mkDerivation rec {
systemd
];
doInstallCheck = true;
preConfigure = ''
substituteInPlace Makefile \
--replace /usr/local/bin/dmrconfig $out/bin/dmrconfig

View File

@ -142,6 +142,8 @@ stdenv.mkDerivation (finalAttrs: {
--replace-fail 'if(LIBUSB_FOUND AND NOT APPLE)' 'if(LIBUSB_FOUND)'
'';
doInstallCheck = true;
postInstall =
''
mv $out/bin/dolphin-emu $out/bin/dolphin-emu-primehack

View File

@ -156,6 +156,8 @@ stdenv.mkDerivation (finalAttrs: {
"--set QT_QPA_PLATFORM xcb"
];
doInstallCheck = true;
postInstall =
lib.optionalString stdenv.hostPlatform.isLinux ''
install -D $src/Data/51-usb-device.rules $out/etc/udev/rules.d/51-usb-device.rules

View File

@ -24,6 +24,8 @@ rustPlatform.buildRustPackage rec {
buildInputs = [ libusb1 ];
doInstallCheck = true;
postInstall = ''
mkdir -p $out/etc/udev/rules.d
cp drivers/*.rules $out/etc/udev/rules.d

View File

@ -51,6 +51,7 @@ stdenv.mkDerivation (finalAttrs: {
];
strictDeps = true;
doInstallCheck = true;
meta = {
description = "Manager daemon for the Quectel EG25 mobile broadband modem found on the Pine64 PinePhone and PinePhone Pro";

View File

@ -30,6 +30,8 @@ stdenv.mkDerivation {
"makedpfw"
];
doInstallCheck = true;
installPhase = ''
runHook preInstall
install -Dm755 em100 $out/bin/em100

View File

@ -114,6 +114,8 @@ stdenv.mkDerivation {
"-DNO_GUI=ON"
];
doInstallCheck = true;
postInstall =
''
# But when we put all the libraries in lib/${system}-gnu, then SANE can't find the

View File

@ -58,6 +58,8 @@ stdenv.mkDerivation (finalAttrs: {
install -Dm644 ../util/50-flashprog.rules "$out/lib/udev/rules.d/50-flashprog.rules"
'';
doInstallCheck = true;
passthru.updateScript = gitUpdater {
rev-prefix = "v";
allowedVersions = "^[0-9\\.]+$";

View File

@ -63,6 +63,7 @@ stdenv.mkDerivation (finalAttrs: {
];
doCheck = !stdenv.hostPlatform.isDarwin;
doInstallCheck = true;
postInstall = ''
install -Dm644 $NIX_BUILD_TOP/$sourceRoot/util/flashrom_udev.rules $out/lib/udev/rules.d/flashrom.rules

View File

@ -121,6 +121,8 @@ stdenv.mkDerivation rec {
mkdir -p "$out/lib/udev/rules.d"
'';
doInstallCheck = true;
installTargets = [
"install"
"udev-install"

View File

@ -38,6 +38,8 @@ stdenv.mkDerivation rec {
cd host
'';
doInstallCheck = true;
postPatch = ''
substituteInPlace host/cmake/modules/FindFFTW.cmake \
--replace "find_library (FFTW_LIBRARIES NAMES fftw3)" "find_library (FFTW_LIBRARIES NAMES fftw3f)"

View File

@ -60,6 +60,8 @@ stdenv.mkDerivation (finalAttrs: {
}"
'';
doInstallCheck = true;
meta = {
changelog = "https://github.com/bigbigmdm/IMSProg/releases/tag/v${finalAttrs.version}";
description = "A free I2C EEPROM programmer tool for CH341A device";

View File

@ -18,6 +18,8 @@ stdenv.mkDerivation rec {
buildInputs = [ libusb1 ];
doInstallCheck = true;
postPatch = ''
substituteInPlace Makefile \
--replace " -o root -g root" "" \

View File

@ -40,6 +40,8 @@ buildGoModule rec {
vendorHash = null;
doInstallCheck = true;
postInstall = ''
# to accomodate the makefile
cp $out/bin/ipp-usb .

View File

@ -54,6 +54,8 @@ stdenv.mkDerivation rec {
sed -i 's/$(hostname)/hostname/' host/utilities/bladeRF-cli/src/cmd/doc/generate.bash
'';
doInstallCheck = true;
cmakeFlags =
[
"-DBUILD_DOCUMENTATION=ON"

View File

@ -61,6 +61,8 @@ stdenv.mkDerivation {
flatbuffers_23_5_26
];
doInstallCheck = true;
nativeBuildInputs = [ xxd ];
NIX_CXXSTDLIB_COMPILE = "-std=c++17";

View File

@ -43,6 +43,8 @@ stdenv.mkDerivation {
strictDeps = true;
doInstallCheck = true;
nativeBuildInputs =
[
cmake

View File

@ -45,6 +45,8 @@ stdenv.mkDerivation rec {
gd
];
doInstallCheck = true;
# These are mentioned in the Requires line of libgphoto's pkg-config file.
propagatedBuildInputs = [ libexif ];

View File

@ -36,6 +36,8 @@ stdenv.mkDerivation rec {
libimobiledevice-glue
];
doInstallCheck = true;
preAutoreconf = ''
export RELEASE_VERSION=${version}
'';

View File

@ -29,6 +29,8 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [ libusb1 ];
doInstallCheck = true;
postPatch = ''
substituteInPlace contrib/60-libjaylink.rules \
--replace-fail 'GROUP="plugdev"' 'GROUP="jlink"'

View File

@ -58,6 +58,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
doInstallCheck = true;
meta = with lib; {
homepage = "https://github.com/libmtp/libmtp";
description = "Implementation of Microsoft's Media Transfer Protocol";

View File

@ -37,6 +37,8 @@ stdenv.mkDerivation (finalAttrs: {
propagatedBuildInputs = [ hidapi ];
doInstallCheck = true;
meta = with lib; {
description = "Communicate with Nitrokey devices in a clean and easy manner";
homepage = "https://github.com/Nitrokey/libnitrokey";

View File

@ -40,6 +40,8 @@ stdenv.mkDerivation rec {
"--enable-libusb10"
];
doInstallCheck = true;
postInstall = ''
mkdir -p $out/etc/udev/rules.d
cat > $out/etc/udev/rules.d/69-libsane.rules << EOF

View File

@ -27,6 +27,8 @@ stdenv.mkDerivation rec {
buildInputs = [ libusb1 ];
doInstallCheck = true;
meta = with lib; {
description = "Library to talk to uldaq devices";
longDescription = ''

View File

@ -37,6 +37,8 @@ stdenv.mkDerivation rec {
installFlags = [ "PREFIX=$(out)" ];
doInstallCheck = true;
postInstall = ''
install -Dm644 "${stellaris-udev-rules}" "$out/etc/udev/rules.d/61.stellpad.rules"
'';

View File

@ -29,6 +29,8 @@ stdenv.mkDerivation rec {
"CFLAGS=-O2"
];
doInstallCheck = true;
meta = with lib; {
homepage = "https://gitlab.com/DavidGriffith/minipro";
description = "Open source program for controlling the MiniPRO TL866xx series of chip programmers";

View File

@ -25,6 +25,8 @@ stdenv.mkDerivation (finalAttrs: {
buildInputs = [ libusb1 ];
doInstallCheck = true;
# Uses proper nix directories rather than the ones specified in the makefile
installPhase = ''
runHook preInstall

View File

@ -72,6 +72,8 @@ stdenv.mkDerivation rec {
makeWrapper
];
doInstallCheck = true;
configureFlags = [
"--with-all"
"--with-ssl"

View File

@ -37,6 +37,8 @@ stdenv.mkDerivation rec {
zstd
];
doInstallCheck = true;
preConfigure = "echo ${version} > .tarball-version";
postInstall = ''

View File

@ -37,6 +37,8 @@ stdenv.mkDerivation rec {
ncurses
];
doInstallCheck = true;
meta = with lib; {
description = "Kernel driver and development library to control serial CBM devices";
longDescription = ''

View File

@ -61,6 +61,8 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
doInstallCheck = true;
env.NIX_CFLAGS_COMPILE = toString (
lib.optionals stdenv.cc.isGNU [
"-Wno-error=cpp"

View File

@ -52,7 +52,11 @@ stdenv.mkDerivation (finalAttrs: {
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
HOME=$TMPDIR $out/bin/openrgb --help > /dev/null
runHook postInstallCheck
'';
passthru.withPlugins =

View File

@ -56,6 +56,8 @@ stdenv.mkDerivation (final: {
runHook postInstall
'';
doInstallCheck = true;
desktopItems = [
(makeDesktopItem {
name = "openterfaceQT";

View File

@ -40,6 +40,8 @@ stdenv.mkDerivation rec {
SDL2
];
doInstallCheck = true;
installFlags = [
"INSTALL_ROOT=$(out)/"
];

View File

@ -38,6 +38,8 @@ stdenv.mkDerivation {
buildInputs = [ libusb1 ];
doInstallCheck = true;
meta = {
homepage = "https://gitlab.com/pine64-org/quartz-bsp/rkdeveloptool/";
description = "Tool from Rockchip to communicate with Rockusb devices (pine64 fork)";

View File

@ -142,6 +142,8 @@ stdenv.mkDerivation {
qtwayland
];
doInstallCheck = true;
preFixup = ''
qtWrapperArgs+=("''${gappsWrapperArgs[@]}")
'';

View File

@ -41,6 +41,8 @@ stdenv.mkDerivation (finalAttrs: {
(lib.cmakeBool "INSTALL_UDEV_RULES" stdenv.hostPlatform.isLinux)
];
doInstallCheck = true;
meta = {
description = "Turns your Realtek RTL2832 based DVB dongle into a FM radio stereo receiver";
homepage = "https://github.com/AlbrechtL/rtl_fm_streamer";

View File

@ -14,6 +14,7 @@
libXfixes,
libusb1,
udev,
udevCheckHook,
gtk-layer-shell,
}:
@ -31,6 +32,7 @@ python3Packages.buildPythonApplication rec {
nativeBuildInputs = [
wrapGAppsHook3
gobject-introspection
udevCheckHook
];
buildInputs = [
@ -89,6 +91,8 @@ python3Packages.buildPythonApplication rec {
)
'';
doInstallCheck = true;
meta = {
homepage = "https://github.com/C0rn3j/sc-controller";
# donations: https://www.patreon.com/kozec

View File

@ -56,6 +56,8 @@ stdenv.mkDerivation rec {
wrapGAppsHook3
];
doInstallCheck = true;
cmakeFlags = [
"-DSTLINK_MODPROBED_DIR=${placeholder "out"}/etc/modprobe.d"
"-DSTLINK_UDEV_RULES_DIR=${placeholder "out"}/lib/udev/rules.d"

View File

@ -129,6 +129,8 @@ stdenv.mkDerivation rec {
dontWrapQtApps = true;
doInstallCheck = true;
preFixup = ''
gappsWrapperArgs+=("''${qtWrapperArgs[@]}")
'';

View File

@ -41,6 +41,8 @@ stdenv.mkDerivation rec {
"-DUDEV_RULES_GROUP=${udevGroup}"
];
doInstallCheck = true;
meta = with lib; {
description = "Open source wireless development platform suitable for Bluetooth experimentation";
homepage = "https://github.com/greatscottgadgets/ubertooth";

View File

@ -178,6 +178,8 @@ stdenv.mkDerivation (finalAttrs: {
# many tests fails on darwin, according to ofborg
doCheck = !stdenv.hostPlatform.isDarwin;
doInstallCheck = true;
# Build only the host software
preConfigure = "cd host";
patches = [

View File

@ -162,6 +162,7 @@ stdenv.mkDerivation (finalAttrs: {
];
doCheck = true;
doInstallCheck = true;
postPatch = ''
patchShebangs src/linux/integration-test.py

View File

@ -38,6 +38,8 @@ stdenv.mkDerivation rec {
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"
];
doInstallCheck = true;
meta = with lib; {
homepage = "https://github.com/libimobiledevice/usbmuxd";
description = "Socket daemon to multiplex connections from and to iOS devices";

View File

@ -72,6 +72,8 @@ clangStdenv.mkDerivation rec {
libusb1
];
doInstallCheck = true;
configureFlags = [
"--with-udevrulesdir=${placeholder "out"}/lib/udev/rules.d"
"--with-systemdsystemunitdir=${placeholder "out"}/lib/systemd/system"

View File

@ -61,6 +61,8 @@ stdenv.mkDerivation (finalAttrs: {
cat <($out/bin/uuu -udev) > $out/lib/udev/rules.d/70-uuu.rules
'';
doInstallCheck = true;
meta = with lib; {
description = "Freescale/NXP I.MX Chip image deploy tools";
homepage = "https://github.com/nxp-imx/mfgtools";

View File

@ -29,6 +29,8 @@ stdenv.mkDerivation rec {
"install-rules"
];
doInstallCheck = true;
meta = {
description = "Firmware programmer for WCH microcontrollers over USB";
mainProgram = "wch-isp";

View File

@ -26,6 +26,8 @@ stdenv.mkDerivation (finalAttrs: {
"PREFIX=/"
];
doInstallCheck = true;
meta = {
description = "Tooling for working with the FEL mode on Allwinner SoCs";
homepage = "https://github.com/xboot/xfel";

View File

@ -48,6 +48,8 @@ stdenv.mkDerivation rec {
doCheck = true;
doInstallCheck = true;
postInstall = ''
# Don't use 70-yubikey.rules because it depends on ConsoleKit
install -D -t $out/lib/udev/rules.d 69-yubikey.rules

View File

@ -59,6 +59,8 @@ stdenv.mkDerivation rec {
++ lib.optional avahiSupport avahi
++ lib.optional stdenv.hostPlatform.isLinux libaio;
doInstallCheck = true;
cmakeFlags =
[
"-DUDEV_RULES_INSTALL_DIR=${placeholder "out"}/lib/udev/rules.d"

View File

@ -244,6 +244,7 @@ stdenv.mkDerivation (finalAttrs: {
FONTCONFIG_FILE = makeFontsConf { fontDirectories = [ ]; };
doCheck = true;
doInstallCheck = true;
postUnpack = ''
patchShebangs ${finalAttrs.src.name}/doc/*.py

View File

@ -16,6 +16,7 @@
gsl,
fftw,
gtest,
udevCheckHook,
indi-full,
}:
@ -32,6 +33,7 @@ stdenv.mkDerivation (finalAttrs: {
nativeBuildInputs = [
cmake
udevCheckHook
];
buildInputs = [
@ -60,6 +62,7 @@ stdenv.mkDerivation (finalAttrs: {
checkInputs = [ gtest ];
doCheck = true;
doInstallCheck = true;
# Socket address collisions between tests
enableParallelChecking = false;

View File

@ -37,6 +37,7 @@
limesuite,
pkg-config,
zeromq,
udevCheckHook,
}:
let
@ -86,6 +87,7 @@ let
cmake
ninja
pkg-config
udevCheckHook
] ++ nativeBuildInputs;
checkInputs = [ gtest ];
@ -103,6 +105,8 @@ let
${postInstall}
'';
doInstallCheck = true;
meta =
with lib;
{

View File

@ -65,10 +65,14 @@ stdenv.mkDerivation {
doInstallCheck = true;
installCheckPhase = ''
runHook preInstallCheck
# assert that c++ bindings are included
# note that this is only true for modern (>0.5) versions; the 0.3 series does not have these
[[ -f $out/include/libsigrokcxx/libsigrokcxx.hpp ]] \
|| { echo 'C++ bindings were not generated; check configure output'; false; }
runHook postInstallCheck
'';
meta = with lib; {

View File

@ -112,7 +112,7 @@ stdenv.mkDerivation rec {
enableParallelBuilding = true;
doInstallCheck = false;
doInstallCheck = true;
postInstall = lib.optionalString withNetworkScan ''
ln -s ${utsushi-networkscan}/libexec/utsushi/networkscan $out/libexec/utsushi

View File

@ -41,6 +41,8 @@ mkDerivation rec {
substituteInPlace libpit/CMakeLists.txt --replace "-std=gnu++11" ""
'';
doInstallCheck = true;
installPhase =
lib.optionalString (stdenv.hostPlatform.isDarwin && enableGUI) ''
mkdir -p $out/Applications

View File

@ -95,6 +95,8 @@ mkDerivation {
cp installer-assets/udev/42-flipperzero.rules $out/etc/udev/rules.d/
'';
doInstallCheck = true;
passthru.updateScript = nix-update-script { };
meta = with lib; {

View File

@ -119,6 +119,7 @@ stdenv.mkDerivation rec {
];
doCheck = true;
doInstallCheck = true;
postInstall = ''
buildPythonPath "$out $pythonPath"