From 39e440ab5344e0f876ee4d7bcd08002a691362b3 Mon Sep 17 00:00:00 2001 From: Mynacol Date: Sat, 4 Jan 2025 17:05:00 +0000 Subject: [PATCH] pcmciaUtils: Fix udev rule path The pcmciaUtils udev rules failed to apply, as some paths were not replaced correctly. For example, the following udev line is in the source package: SUBSYSTEM=="pcmcia", ENV{MODALIAS}=="?*", \ RUN+="__UDEVHELPERDIR__/pcmcia-check-broken-cis" The Makefile by default replaces the `__UDEVHELPERDIR__` with `${prefix}/lib/udev`, which is the wrong place on NixOS. To quickly set the correct path, just replace this placeholder string directly. With this patch, the udev rules can be applied, as it is done with `hardware.pcmcia.enable`. The files are referenced correctly and pcmcia works fine on real hardware. --- pkgs/by-name/pc/pcmciaUtils/package.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/by-name/pc/pcmciaUtils/package.nix b/pkgs/by-name/pc/pcmciaUtils/package.nix index 5ae0c4d24ab0..d6707a89d39e 100644 --- a/pkgs/by-name/pc/pcmciaUtils/package.nix +++ b/pkgs/by-name/pc/pcmciaUtils/package.nix @@ -35,6 +35,7 @@ stdenv.mkDerivation rec { sed -i " s,/sbin/modprobe,${kmod}&,; s,/lib/udev/,$out/sbin/,; + s,__UDEVHELPERDIR__/,$out/lib/udev/,; " udev/* # fix-color */ sed -i " s,/lib/firmware,$out&,;