anchor.diff:      cp -r README.txt LICENSE.txt doc $out/share/doc/glew
     '';
   
  +  crossAttrs.makeFlags = [
  +    "CC=${stdenv.cross.config}-gcc"
  +    "LD=${stdenv.cross.config}-gcc"
  +    "AR=${stdenv.cross.config}-ar"
  +    "STRIP="
  +  ] ++ optional (stdenv.cross.libc == "libSystem") "SYSTEM=darwin";
  +
     meta = {
       description = "An OpenGL extension loading library for C(++)";
       homepage = http://glew.sourceforge.net/;
  
positive.code: 
    patchPhase = ''
      sed -i 's|lib64|lib|' config/Makefile.linux
    '';
  
  buildPhase = "make all";
  
negative.code: { stdenv, fetchurl, mesa_glu, x11, libXmu, libXi }:
  
  with stdenv.lib;
  
  stdenv.mkDerivation rec {
    name = "glew-1.10.0";
  