<commit_before>args: with args;
stdenv.mkDerivation {
  name = "blender-2.45";

  src = fetchurl {
    url = http://download.blender.org/source/blender-2.45.tar.gz;
    sha256 = "1bi7j1fcvrpb96sjpcbm4sldf359sgskfhv7a8pgcxj0bnhp47wj";
  };

  phases="unpackPhase buildPhase";

  inherit scons SDL freetype openal python openexr mesa;

  buildInputs = [python scons
         gettext libjpeg libpng zlib freetype /* fmod smpeg */ freealut openal x11 mesa inputproto libtiff libXi ];

  # patch SConstruct so that we can pass on additional include.  Either blender
  # or openEXR is broken. I think OpenEXR should use include "" isntead of <> to
  # include files beeing in the same directory
  buildPhase = "
    sed -i -e \"s=##### END SETUP ##########=env['CPPFLAGS'].append(os.getenv('CPPFLAGS').split(':'))\\n##### END SETUP ##########=\" SConstruct\n"
    + " CPPFLAGS=-I$openexr/include/OpenEXR"
    + " scons PREFIX=\$out/nix-support"
    + " BF_SDL=\$SDL"
    + " BF_SDL_LIBPATH=\$SDL/lib"
    + " BF_FREETYPE=\$freetype"
    + " BF_OPENAL=\$openal"
    + " BF_PYTHON=\$python"
    + " BF_OPENEXR_INC=\$openexr/include"
    + " BF_OPENEXR_LIBPATH=\$openexr/lib"
    + " BF_INSTALLDIR=\$out/nix-support/dontLinkThatMuch \n"<commit_msg>blender compiles with physics engine now<commit_after>args: with args;
stdenv.mkDerivation {
  name = "blender-2.45";

  src = fetchurl {
    url = http://download.blender.org/source/blender-2.45.tar.gz;
    sha256 = "1bi7j1fcvrpb96sjpcbm4sldf359sgskfhv7a8pgcxj0bnhp47wj";
  };

  phases="unpackPhase buildPhase";

  inherit scons SDL freetype openal python openexr mesa;

  buildInputs = [python scons
         gettext libjpeg libpng zlib freetype /* fmod smpeg */ freealut openal x11 mesa inputproto libtiff libXi ];

  # patch SConstruct so that we can pass on additional include.  Either blender
  # or openEXR is broken. I think OpenEXR should use include "" isntead of <> to
  # include files beeing in the same directory
  buildPhase = "
cat >> user-config.py << EOF
WITH_BF_OPENAL = 'true'
WITH_BF_GAMEENGINE='true'
WITH_BF_BULLET = 'true'
WITH_BF_INTERNATIONAL = 'true'
WITH_BF_OPENEXR = 'true'
EOF

    sed -i -e \"s=##### END SETUP ##########=env['CPPFLAGS'].append(os.getenv('CPPFLAGS').split(':'))\\n##### END SETUP ##########=\" SConstruct\n"
    + " CPPFLAGS=-I$openexr/include/OpenEXR"
    + " scons PREFIX=\$out/nix-support"
    + " BF_SDL=\$SDL"
    + " BF_SDL_LIBPATH=\$SDL/lib"
    + " BF_FREETYPE=\$freetype"
    + " BF_OPENAL=\$openal"
    + " BF_PYTHON=\$python"
    + " BF_OPENEXR_INC=\$openexr/include"
    + " BF_OPENEXR_LIBPATH=\$openexr/lib"
    + " BF_INSTALLDIR=\$out/nix-support/dontLinkThatMuch \n"
{'fraction_non_alphanumeric': 0.15024353690520795, 'fraction_numerical': 0.018733608092918696, 'mean_word_length': 3.7508896797153026, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 2, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '662559', 'n_tokens_mistral': 1097, 'n_tokens_neox': 1011, 'n_words': 205}