<commit_before>{ stdenv, fetchurl, cmake, bash, unzip, glibc, openssl, gcc, mesa, freetype, xlibs, alsaLib }:

stdenv.mkDerivation rec {
  name = "pharo-vm-core-i386-2014.06.25";
  system = "x86_32-linux";
  src = fetchurl {
    url = http://files.pharo.org/vm/src/vm-unix-sources/pharo-vm-2014.06.25.tar.bz2;
    md5 = "4d80d8169c2f2f0355c43ee90bbad23f";
  };

  sources10Zip = fetchurl {
    url = http://files.pharo.org/sources/PharoV10.sources.zip;
    md5 = "3476222a0345a6f8f8b6093b5e3b30fb";
  };

  sources20Zip = fetchurl {
    url = http://files.pharo.org/sources/PharoV20.sources.zip;
    md5 = "a145b0733f9d68d9ce6a76270b6b9ec8";
  };

  sources30Zip = fetchurl {
    url = http://files.pharo.org/sources/PharoV30.sources.zip;
    md5 = "bb0a66b8968ef7d0da97ec86331f68c8";
  };

  # Building
  preConfigure = ''
    cd build/
  '';
  resources = ./resources;
  installPhase = ''
    echo Current directory $(pwd)
    echo Creating prefix "$prefix"
    mkdir -p "$prefix/lib/pharo-vm"

    cd ../../results

    mv vm-display-null vm-display-null.so
    mv vm-display-X11 vm-display-X11.so
    mv vm-sound-null vm-sound-null.so
    mv vm-sound-ALSA vm-sound-ALSA.so
    mv pharo pharo-vm

    cp * "$prefix/lib/pharo-vm"

    cp -R "$resources"/* "$prefix/"

    mkdir $prefix/bin

    chmod u+w $prefix/bin
    cat > $prefix/bin/pharo-vm-x <<EOF
    #!${bash}/bin/bash

    # disable parameter expansion to forward all arguments unprocessed to the VM
    set -f

    exec $prefix/lib/pharo-vm/pharo-vm "\$@"
    EOF

    cat > $prefix/bin/pharo-vm-nox <<EOF
    #!${bash}/bin/bash

    # disable parameter expansion to forward all arguments unprocessed to the VM
    set -f

    exec $prefix/lib/pharo-vm/pharo-vm -vm-display-null "\$@"
    EOF

    chmod +x $prefix/bin/pharo-vm-x $prefix/bin/pharo-vm-nox<commit_msg>Move the slash to workaround bug Emacs nix-mode<commit_after>{ stdenv, fetchurl, cmake, bash, unzip, glibc, openssl, gcc, mesa, freetype, xlibs, alsaLib }:

stdenv.mkDerivation rec {
  name = "pharo-vm-core-i386-2014.06.25";
  system = "x86_32-linux";
  src = fetchurl {
    url = http://files.pharo.org/vm/src/vm-unix-sources/pharo-vm-2014.06.25.tar.bz2;
    md5 = "4d80d8169c2f2f0355c43ee90bbad23f";
  };

  sources10Zip = fetchurl {
    url = http://files.pharo.org/sources/PharoV10.sources.zip;
    md5 = "3476222a0345a6f8f8b6093b5e3b30fb";
  };

  sources20Zip = fetchurl {
    url = http://files.pharo.org/sources/PharoV20.sources.zip;
    md5 = "a145b0733f9d68d9ce6a76270b6b9ec8";
  };

  sources30Zip = fetchurl {
    url = http://files.pharo.org/sources/PharoV30.sources.zip;
    md5 = "bb0a66b8968ef7d0da97ec86331f68c8";
  };

  # Building
  preConfigure = ''
    cd build/
  '';
  resources = ./resources;
  installPhase = ''
    echo Current directory $(pwd)
    echo Creating prefix "$prefix"
    mkdir -p "$prefix/lib/pharo-vm"

    cd ../../results

    mv vm-display-null vm-display-null.so
    mv vm-display-X11 vm-display-X11.so
    mv vm-sound-null vm-sound-null.so
    mv vm-sound-ALSA vm-sound-ALSA.so
    mv pharo pharo-vm

    cp * "$prefix/lib/pharo-vm"

    cp -R "$resources/"* "$prefix/"

    mkdir $prefix/bin

    chmod u+w $prefix/bin
    cat > $prefix/bin/pharo-vm-x <<EOF
    #!${bash}/bin/bash

    # disable parameter expansion to forward all arguments unprocessed to the VM
    set -f

    exec $prefix/lib/pharo-vm/pharo-vm "\$@"
    EOF

    cat > $prefix/bin/pharo-vm-nox <<EOF
    #!${bash}/bin/bash

    # disable parameter expansion to forward all arguments unprocessed to the VM
    set -f

    exec $prefix/lib/pharo-vm/pharo-vm -vm-display-null "\$@"
    EOF

    chmod +x $prefix/bin/pharo-vm-x $prefix/bin/pharo-vm-nox
{'fraction_non_alphanumeric': 0.14374661613427178, 'fraction_numerical': 0.06713589604764483, 'mean_word_length': 2.774259448416752, 'pattern_counts': {'":': 0, '<': 11, '<?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': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6944239', 'n_tokens_mistral': 1654, 'n_tokens_neox': 1457, 'n_words': 274}