forked from mirrors/nixpkgs
libGL: use headers from glvnd
The glvnd library contains a copy of the OpenGL headers. By compiling against the glvnd headers we completely avoid a dependency on Mesa (and LLVM). This reduces rebuild time. It also prevents accidents, such as where some packages kept a reference to the mesa.drivers output and thus had all Mesa drivers in their runtime closure.
This commit is contained in:
parent
824aac3428
commit
4bff6d04e4
|
@ -52,7 +52,7 @@ stdenv.mkDerivation {
|
|||
|
||||
mkdir -p $dev/{,lib/pkgconfig,nix-support}
|
||||
echo "$out ${libglvnd} ${libglvnd.dev}" > $dev/nix-support/propagated-build-inputs
|
||||
ln -s ${mesa.dev}/include $dev/include
|
||||
ln -s ${libglvnd.dev}/include $dev/include
|
||||
|
||||
genPkgConfig() {
|
||||
local name="$1"
|
||||
|
@ -61,9 +61,9 @@ stdenv.mkDerivation {
|
|||
cat <<EOF >$dev/lib/pkgconfig/$name.pc
|
||||
Name: $name
|
||||
Description: $lib library
|
||||
Version: ${mesa.version}
|
||||
Version: ${libglvnd.version}
|
||||
Libs: -L${libglvnd.out}/lib -l$lib
|
||||
Cflags: -I${mesa.dev}/include -I${libglvnd.dev}/include
|
||||
Cflags: -I${libglvnd.dev}/include
|
||||
EOF
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue