anchor.diff:      glu
       inputproto
       libx11
  -    xorg.libXi
  +    libxi
       libxrandr
       libxrender
       xorg.libXxf86vm
  
positive.code: , glesSupport ? false
  }:
  
  let
    inherit (lib)
      boolOn;
  in
  stdenv.mkDerivation rec {
    name = "freeglut-3.0.0";
  
    src = fetchurl {
      url = "mirror://sourceforge/freeglut/${name}.tar.gz";
      sha256 = "18knkyczzwbmyg8hr4zh8a1i5ga01np2jzd1rwmsh7mh2n2vwhra";
    };
  
    nativeBuildInputs = [
  
negative.code:   cmakeFlags = [
      "-DFREEGLUT_BUILD_DEMOS=OFF"
      # XXX: Cannot build both libglut and libfreeglut-gles.
      "-DFREEGLUT_GLES=${boolOn glesSupport}"
    ];
  
    meta = with lib; {
  