[Nix-dev] hardware.enableAllFirmware doesn't work
James Cook
james.cook at utoronto.ca
Tue Feb 14 05:56:37 CET 2012
Quoting Arie Middelkoop <amiddelk at gmail.com>:
>> I am guessing the way to fix this is to set meta.priority on one of
>> the two packages, but I don't understand the situation well enough to
>> know if that will break anything.
>
> Hmm, I already gave it a lower priority than the default. At least, I
> gave it priority number "10", which is called a low priority package by
> the Nixpkgs manual.
>
>> For now, I've worked around the problem by commenting out a few of the
>> lines in
>> pkgs/os-specific/linux/firmware/firmware-linux-nonfree/default.nix.
>> (If it's useful, I found that commenting out linux-nonfree, bnx2,
>> iwlwifi and qlogic did the trick. It works for me because I only need
>> the ralink firmware.)
>
> linux-nonfree is apparently some Debian meta-package and can indeed be
> commented out. The others do add firmware...
>
> The problem seems to be that the Debian packages also include firmware
> that is already shipped with the kernel. The default nixos kernel
> configuration includes that firmware, and thus causes a collision. I
> guess that the best solution would be if the firmware shipped with the
> kernel would be prioritized over the firmware in the linux-nonfree
> package. However, setting the priority is apparently not enough?
>
> (I cannot reproduce the problem, because my kernel config says 'N' to
> the inclusion of firmware so I don't have this collision)
>
> Arie
This fixed it for me:
BEGIN
james angel-nixos /etc/nixos/nixos $ svn diff
Index: modules/services/hardware/udev.nix
===================================================================
--- modules/services/hardware/udev.nix (revision 32266)
+++ modules/services/hardware/udev.nix (working copy)
@@ -191,6 +191,7 @@
firmware to function).
'';
apply = list: pkgs.buildEnv {
+ ignoreCollisions = true;
name = "firmware";
paths = list;
pathsToLink = [ "/" ];
END
It seems that pkgs.buildEnv ignores priorities; maybe priorities are a
built-in feature in nix-env and not implemented elsewhere?
Even with the above change, I think you get ugly warnings about the
collisions.
James
More information about the nix-dev
mailing list