From f9094a77b59983915549653fb4e19aa752237ab6 Mon Sep 17 00:00:00 2001 From: Eric Kow Date: Sun, 3 Nov 2013 16:35:56 +0000 Subject: [PATCH] darwin x11/opengl: only copy subset of files (close #1165) 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) --- pkgs/os-specific/darwin/native-x11-and-opengl/default.nix | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pkgs/os-specific/darwin/native-x11-and-opengl/default.nix b/pkgs/os-specific/darwin/native-x11-and-opengl/default.nix index cee03741dce6..3844912f6ba3 100644 --- a/pkgs/os-specific/darwin/native-x11-and-opengl/default.nix +++ b/pkgs/os-specific/darwin/native-x11-and-opengl/default.nix @@ -7,6 +7,10 @@ stdenv.mkDerivation rec { builder = writeScript "${name}-builder.sh" '' /bin/mkdir -p $out - /bin/ln -sv /usr/X11/{bin,lib,include,share} $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/ ''; }