mirror of
https://github.com/NixOS/nixpkgs.git
synced 2025-02-02 02:03:21 +00:00
linuxPackages.nvidiaPackages.beta: fix icds
This commit is contained in:
parent
0384602eac
commit
21bc7a6efd
@ -112,16 +112,17 @@ installPhase() {
|
|||||||
|
|
||||||
# EGL
|
# EGL
|
||||||
if [ "$useGLVND" = "1" ]; then
|
if [ "$useGLVND" = "1" ]; then
|
||||||
sed -E "s#(libEGL_nvidia)#$i/lib/\\1#" 10_nvidia.json > 10_nvidia.json.fixed
|
mkdir -p "$i/share/egl/egl_external_platform.d"
|
||||||
sed -E "s#(libnvidia-egl-wayland)#$i/lib/\\1#" 10_nvidia_wayland.json > 10_nvidia_wayland.json.fixed
|
for icdname in $(find . -name '*_nvidia*.json')
|
||||||
|
do
|
||||||
|
cat "$icdname" | jq ".ICD.library_path |= \"$i/lib/\(.)\"" | tee "$i/share/egl/egl_external_platform.d/$icdname"
|
||||||
|
done
|
||||||
|
|
||||||
install -Dm644 10_nvidia.json.fixed $i/share/glvnd/egl_vendor.d/10_nvidia.json
|
# glvnd icd
|
||||||
install -Dm644 10_nvidia_wayland.json.fixed $i/share/egl/egl_external_platform.d/10_nvidia_wayland.json
|
mkdir -p "$i/share/glvnd/egl_vendor.d"
|
||||||
|
mv "$i/share/egl/egl_external_platform.d/10_nvidia.json" "$i/share/glvnd/egl_vendor.d/10_nvidia.json"
|
||||||
if [[ -f "15_nvidia_gbm.json" ]]; then
|
|
||||||
sed -E "s#(libnvidia-egl-gbm)#$i/lib/\\1#" 15_nvidia_gbm.json > 15_nvidia_gbm.json.fixed
|
|
||||||
install -Dm644 15_nvidia_gbm.json.fixed $i/share/egl/egl_external_platform.d/15_nvidia_gbm.json
|
|
||||||
|
|
||||||
|
if [[ -f "$i/share/egl/egl_external_platform.d/15_nvidia_gbm.json" ]]; then
|
||||||
mkdir -p $i/lib/gbm
|
mkdir -p $i/lib/gbm
|
||||||
ln -s $i/lib/libnvidia-allocator.so $i/lib/gbm/nvidia-drm_gbm.so
|
ln -s $i/lib/libnvidia-allocator.so $i/lib/gbm/nvidia-drm_gbm.so
|
||||||
fi
|
fi
|
||||||
|
@ -41,6 +41,7 @@
|
|||||||
, nukeReferences
|
, nukeReferences
|
||||||
, which
|
, which
|
||||||
, libarchive
|
, libarchive
|
||||||
|
, jq
|
||||||
, # Whether to build the libraries only (i.e. not the kernel module or
|
, # Whether to build the libraries only (i.e. not the kernel module or
|
||||||
# nvidia-settings). Used to support 32-bit binaries on 64-bit
|
# nvidia-settings). Used to support 32-bit binaries on 64-bit
|
||||||
# Linux.
|
# Linux.
|
||||||
@ -175,7 +176,7 @@ let
|
|||||||
libPath = libPathFor pkgs;
|
libPath = libPathFor pkgs;
|
||||||
libPath32 = optionalString i686bundled (libPathFor pkgsi686Linux);
|
libPath32 = optionalString i686bundled (libPathFor pkgsi686Linux);
|
||||||
|
|
||||||
nativeBuildInputs = [ perl nukeReferences which libarchive ]
|
nativeBuildInputs = [ perl nukeReferences which libarchive jq ]
|
||||||
++ optionals (!libsOnly) kernel.moduleBuildDependencies;
|
++ optionals (!libsOnly) kernel.moduleBuildDependencies;
|
||||||
|
|
||||||
disallowedReferences = optionals (!libsOnly) [ kernel.dev ];
|
disallowedReferences = optionals (!libsOnly) [ kernel.dev ];
|
||||||
|
Loading…
Reference in New Issue
Block a user