mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-25 07:00:43 +00:00
1be6aae4b4
Copy only the pc files related to X11 and OpenGL. This should allow us to build our own version of libraries like cairo without having the native ones be accidentally dynamically linked in to things that depend on them. Before this patch if we `dyldinfo -dylibs libpangocairo` we can see that it was dynamically linked against the OS X (but seemingly built against include files from the nix one, as we would get a runtime complaint about missing symbols)
17 lines
437 B
Nix
17 lines
437 B
Nix
{ stdenv, writeScript }:
|
|
|
|
assert stdenv.isDarwin;
|
|
|
|
stdenv.mkDerivation rec {
|
|
name = "darwin-native-x11-and-opengl";
|
|
|
|
builder = writeScript "${name}-builder.sh" ''
|
|
/bin/mkdir -p $out
|
|
/bin/mkdir $out/lib
|
|
/bin/ln -sv /usr/X11/lib/{*.dylib,X11,xorg} $out/lib
|
|
/bin/mkdir $out/lib/pkgconfig
|
|
/bin/ln -sv /usr/X11/lib/pkgconfig/{x*.pc,gl*.pc} $out/lib/pkgconfig
|
|
/bin/ln -sv /usr/X11/{bin,include,share} $out/
|
|
'';
|
|
}
|