mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-17 23:36:17 +01:00
makeModulesClosure: fixup firmware extraction
After a recent upgrade of modinfo, its output is now incorrect for builtin modules. This commit filters out the output until a fix is made available upstream
This commit is contained in:
parent
ea6b76dfe1
commit
c029fb02c4
1 changed files with 11 additions and 1 deletions
|
@ -68,7 +68,17 @@ done
|
|||
|
||||
mkdir -p $out/lib/firmware
|
||||
for module in $(cat closure); do
|
||||
for i in $(modinfo -F firmware $module); do
|
||||
# for builtin modules, modinfo will reply with a wrong output looking like:
|
||||
# $ modinfo -F firmware unix
|
||||
# name: unix
|
||||
#
|
||||
# There is a pending attempt to fix this:
|
||||
# https://github.com/NixOS/nixpkgs/pull/96153
|
||||
# https://lore.kernel.org/linux-modules/20200823215433.j5gc5rnsmahpf43v@blumerang/T/#u
|
||||
#
|
||||
# For now, the workaround is just to filter out the extraneous lines out
|
||||
# of its output.
|
||||
for i in $(modinfo -F firmware $module | grep -v '^name:'); do
|
||||
mkdir -p "$out/lib/firmware/$(dirname "$i")"
|
||||
echo "firmware for $module: $i"
|
||||
cp "$firmware/lib/firmware/$i" "$out/lib/firmware/$i" 2>/dev/null || if test -z "$allowMissing"; then exit 1; fi
|
||||
|
|
Loading…
Reference in a new issue