|
120 | 120 |
|
121 | 121 | # Copy udev.
|
122 | 122 | copy_bin_and_libs ${udev}/lib/systemd/systemd-udevd
|
| 123 | + copy_bin_and_libs ${udev}/lib/systemd/systemd-sysctl |
123 | 124 | copy_bin_and_libs ${udev}/bin/udevadm
|
124 | 125 | for BIN in ${udev}/lib/udev/*_id; do
|
125 | 126 | copy_bin_and_libs $BIN
|
|
198 | 199 | ''; # */
|
199 | 200 |
|
200 | 201 |
|
| 202 | + linkUnits = pkgs.runCommand "link-units" { |
| 203 | + allowedReferences = [ extraUtils ]; |
| 204 | + preferLocalBuild = true; |
| 205 | + } '' |
| 206 | + mkdir -p $out |
| 207 | + cp -v ${udev}/lib/systemd/network/*.link $out/ |
| 208 | + ''; |
| 209 | + |
201 | 210 | udevRules = pkgs.runCommand "udev-rules" {
|
202 | 211 | allowedReferences = [ extraUtils ];
|
203 | 212 | preferLocalBuild = true;
|
|
206 | 215 |
|
207 | 216 | echo 'ENV{LD_LIBRARY_PATH}="${extraUtils}/lib"' > $out/00-env.rules
|
208 | 217 |
|
209 |
| - cp -v ${udev}/lib/udev/rules.d/60-cdrom_id.rules $out/ |
210 |
| - cp -v ${udev}/lib/udev/rules.d/60-persistent-storage.rules $out/ |
211 |
| - cp -v ${udev}/lib/udev/rules.d/80-drivers.rules $out/ |
| 218 | + cp -v ${udev}/lib/udev/rules.d/*.rules $out/ |
212 | 219 | cp -v ${pkgs.lvm2}/lib/udev/rules.d/*.rules $out/
|
213 | 220 | ${config.boot.initrd.extraUdevRulesCommands}
|
214 | 221 |
|
|
222 | 229 | --replace ${pkgs.lvm2}/sbin ${extraUtils}/bin \
|
223 | 230 | --replace ${pkgs.mdadm}/sbin ${extraUtils}/sbin \
|
224 | 231 | --replace ${pkgs.bash}/bin/sh ${extraUtils}/bin/sh \
|
225 |
| - --replace ${udev}/bin/udevadm ${extraUtils}/bin/udevadm |
| 232 | + --replace ${udev} ${extraUtils} |
226 | 233 | done
|
227 | 234 |
|
228 | 235 | # Work around a bug in QEMU, which doesn't implement the "READ
|
|
257 | 264 | ${pkgs.buildPackages.busybox}/bin/ash -n $target
|
258 | 265 | '';
|
259 | 266 |
|
260 |
| - inherit udevRules extraUtils modulesClosure; |
| 267 | + inherit linkUnits udevRules extraUtils modulesClosure; |
261 | 268 |
|
262 | 269 | inherit (config.boot) resumeDevice;
|
263 | 270 |
|
|
0 commit comments