anchor.diff:  { stdenv, fetchFromGitHub, cmake, boost165, pkgconfig, guile,
   eigen, libpng, python, libGLU, qt4, openexr, openimageio,
  -opencolorio, xercesc, ilmbase, osl, seexpr
  +opencolorio, xercesc, ilmbase, osl, seexpr, makeWrapper
   }:
   
   let boost_static = boost165.override {
  
positive.code: in stdenv.mkDerivation rec {
  
    name = "appleseed-${version}";
    version = "1.9.0-beta";
  
    src = fetchFromGitHub {
      owner  = "appleseedhq";
      repo   = "appleseed";
      rev    = "1.9.0-beta";
      sha256 = "0m7zvfkdjfn48zzaxh2wa1bsaj4l876a05bzgmjlfq5dz3202anr";
    };
    buildInputs = [
      cmake pkgconfig boost_static guile eigen libpng python
      libGLU qt4 openexr openimageio opencolorio xercesc
      osl seexpr
    ];
  
    NIX_CFLAGS_COMPILE = "-I${openexr.dev}/include/OpenEXR -I${ilmbase.dev}/include/OpenEXR -I${openimageio.dev}/include/OpenImageIO";
  
    cmakeFlags = [
        "-DUSE_EXTERNAL_XERCES=ON" "-DUSE_EXTERNAL_OCIO=ON" "-DUSE_EXTERNAL_OIIO=ON"
  
negative.code:   # Work around a bug in the CMake build:
    postInstall = ''
      chmod a+x $out/bin/*
      wrapProgram $out/bin/appleseed.studio --set PYTHONHOME ${python}
    '';
  }
  
  