about summary refs log tree commit diff
path: root/pkgs/build-support/add-driver-runpath/default.nix
blob: 56026b1fc908e3e2c66f31a8b16ccd140682fb76 (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.hostPlatform.isi686 "-32";

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