about summary refs log tree commit diff
path: root/pkgs/build-support/add-driver-runpath/default.nix
blob: 08547a4453c5f28e87097cb3f8a21bec0321752e (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
{ lib, stdenv }:

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.isi686 "-32";

  buildCommand = ''
    mkdir -p $out/nix-support
    substituteAll ${./setup-hook.sh} $out/nix-support/setup-hook
  '';
}