addDriverRunpath: fix for structuredAttrs (#470731)

This commit is contained in:
Wolfgang Walther
2025-12-15 09:06:22 +00:00
committed by GitHub
+13 -13
View File
@@ -1,14 +1,14 @@
{ lib, stdenv }:
{
lib,
stdenv,
makeSetupHook,
}:
makeSetupHook {
name = "add-driver-runpath-hook";
stdenv.mkDerivation {
name = "add-driver-runpath";
# Named "opengl-driver" for legacy reasons, but it is the path to
# hardware drivers installed by NixOS
driverLink = "/run/opengl-driver" + lib.optionalString stdenv.hostPlatform.isi686 "-32";
buildCommand = ''
mkdir -p $out/nix-support
substituteAll ${./setup-hook.sh} $out/nix-support/setup-hook
'';
}
substitutions = {
# Named "opengl-driver" for legacy reasons, but it is the path to
# hardware drivers installed by NixOS
driverLink = "/run/opengl-driver" + lib.optionalString stdenv.hostPlatform.isi686 "-32";
};
} ./setup-hook.sh