mirror of
https://github.com/SebastianWendel/nixpkgs.git
synced 2024-09-19 20:09:01 +02:00
nixos/xserver: respect module order
Reimplement the `ModulePath` generation logic by only adding the `/lib/xorg/modules` subpath for each module, in the specified order. In particular, hardware-specific drivers are listed *before* `xorgserver`, which fixes https://github.com/NixOS/nixpkgs/issues/299684. This also keeps the list reproducible, as wanted by https://github.com/NixOS/nixpkgs/pull/230186. I have confirmed that X is able to find `.so` files recursively within the `ModulePath`, so that there is no need to include subdirectories of `/lib/xorg/modules`. Furthermore, I don't expect there to be a need to include directories *outside* of `/lib/xorg/modules`, as the default `ModulePath` on standard distributions is `/usr/lib/xorg/modules`. (see https://www.x.org/releases/current/doc/man/man5/xorg.conf.5.xhtml#heading4)
This commit is contained in:
parent
0da20e2b84
commit
0e347b1a77
|
@ -111,7 +111,7 @@ let
|
|||
}
|
||||
''
|
||||
echo 'Section "Files"' >> $out
|
||||
echo $fontpath >> $out
|
||||
echo "$fontpath" >> $out
|
||||
|
||||
for i in ${toString fontsForXServer}; do
|
||||
if test "''${i:0:''${#NIX_STORE}}" == "$NIX_STORE"; then
|
||||
|
@ -121,11 +121,9 @@ let
|
|||
fi
|
||||
done
|
||||
|
||||
for i in $(find ${toString cfg.modules} -type d | sort); do
|
||||
if test $(echo $i/*.so* | wc -w) -ne 0; then
|
||||
echo " ModulePath \"$i\"" >> $out
|
||||
fi
|
||||
done
|
||||
${concatMapStrings (m: ''
|
||||
echo " ModulePath \"${m}/lib/xorg/modules\"" >> "$out"
|
||||
'') cfg.modules}
|
||||
|
||||
echo '${cfg.filesSection}' >> $out
|
||||
echo 'EndSection' >> $out
|
||||
|
|
Loading…
Reference in a new issue