1
0
Fork 1
mirror of https://github.com/NixOS/nixpkgs.git synced 2024-11-25 23:20:55 +00:00

Change firmware handling

This way should work with both old udev and new one.

svn path=/nixos/trunk/; revision=21308
This commit is contained in:
Yury G. Kudryashov 2010-04-25 18:26:56 +00:00
parent a30637aba5
commit a5718503e5
2 changed files with 9 additions and 2 deletions

View file

@ -134,7 +134,7 @@ in
hardware.firmware = mkOption {
default = [];
example = ["/root/my-firmware"];
example = [/root/my-firmware];
merge = mergeListOption;
description = ''
List of directories containing firmware files. Such files
@ -142,6 +142,11 @@ in
(i.e., when it has detected specific hardware that requires
firmware to function).
'';
apply = list: pkgs.buildEnv {
name = "firmware";
paths = list;
pathsToLink = [ "/" ];
};
};
};
@ -157,7 +162,8 @@ in
# As a fallback, allow firmware to be placed in
# /root/test-firmware (primarily for testing).
hardware.firmware = [ "/root/test-firmware" ];
hardware.firmware = pkgs.lib.optional
(builtins.pathExists /root/test-firmware) /root/test-firmware;
jobs.udev =
{ startOn = "startup";

View file

@ -79,6 +79,7 @@ let
ln -s ${config.system.build.etc}/etc $out/etc
ln -s ${config.system.path} $out/sw
ln -s ${config.system.build.upstart} $out/upstart
ln -s ${config.hardware.firmware} $out/firmware
echo "$kernelParams" > $out/kernel-params
echo "$configurationName" > $out/configuration-name