<commit_before>{stdenv, fetchurl, SDL, SDL_mixer, unzip, libvorbis, mesa, gtk, pkgconfig, makeDesktopItem}:

stdenv.mkDerivation rec {
  name = "eduke32";
  src = fetchurl {
    url = http://wiki.eduke32.com/stuff/source_code/eduke32_src_20090131.zip;
    sha256 = "e6b8cc2c7e0c32a6aa5a64359be8b8c494dcae08dda87e1de718c030426ef74d";
  };
  buildInputs = [ unzip SDL SDL_mixer libvorbis mesa gtk pkgconfig ];
  NIX_LDFLAGS = "-lgcc_s";
  desktopItem = makeDesktopItem {
    name = "eduke32";
    exec = "eduke32-wrapper";
    comment = "Duke Nukem 3D port";
    desktopName = "EDuke32";
    genericName = "Duke Nukem 3D port";
    categories = "Application;Game;";
  };
    
  installPhase = ''
    # Install binaries
    ensureDir $out/bin
    cp eduke32 mapster32 $out/bin 
    
    # Make wrapper script
    cat > $out/bin/eduke32-wrapper <<EOF
    #!/bin/sh
    
    if [ -f ~/.eduke32-settings ]
    then
        .  ~/.eduke32-settings
    else
       EDUKE32_DATA_DIR=/var/eduke32
       CON_FILE=\$EDUKE32_DATA_DIR/GAME.CON
       GRP_FILE=\$EDUKE32_DATA_DIR/DUKE3D.GRP
    fi
    
    cd \$EDUKE32_DATA_DIR
    eduke32 /x\$CON_FILE /g\$GRP_FILE    
    EOF
    chmod 755 $out/bin/eduke32-wrapper
    
    # Install desktop item
    ensureDir $out/share/applications
    cp ${desktopItem}/share/applications/* $out/share/applications
  '';
}<commit_msg>Fixed wrapper script to use environment variables from the user profile<commit_after>{stdenv, fetchurl, SDL, SDL_mixer, unzip, libvorbis, mesa, gtk, pkgconfig, makeDesktopItem}:

stdenv.mkDerivation rec {
  name = "eduke32";
  src = fetchurl {
    url = http://wiki.eduke32.com/stuff/source_code/eduke32_src_20090131.zip;
    sha256 = "e6b8cc2c7e0c32a6aa5a64359be8b8c494dcae08dda87e1de718c030426ef74d";
  };
  buildInputs = [ unzip SDL SDL_mixer libvorbis mesa gtk pkgconfig ];
  NIX_LDFLAGS = "-lgcc_s";
  desktopItem = makeDesktopItem {
    name = "eduke32";
    exec = "eduke32-wrapper";
    comment = "Duke Nukem 3D port";
    desktopName = "EDuke32";
    genericName = "Duke Nukem 3D port";
    categories = "Application;Game;";
  };
    
  installPhase = ''
    # Install binaries
    ensureDir $out/bin
    cp eduke32 mapster32 $out/bin 
    
    # Make wrapper script
    cat > $out/bin/eduke32-wrapper <<EOF
    #!/bin/sh
    
    if [ "$EDUKE32_DATA_DIR" = "" ]
    then 
        EDUKE32_DATA_DIR=/var/games/eduke32
    fi
    if [ "$EDUKE32_CON_FILE" = "" ]
    then
        EDUKE32_CON_FILE=\$EDUKE32_DATA_DIR/GAME.CON
    fi
    if [ "$EDUKE32_GRP_FILE" = "" ]
    then
        EDUKE32_GRP_FILE=\$EDUKE32_DATA_DIR/DUKE3D.GRP
    fi
    
    cd \$EDUKE32_DATA_DIR
    eduke32 /x\$EDUKE32_CON_FILE /g\$EDUKE32_GRP_FILE    
    EOF
    chmod 755 $out/bin/eduke32-wrapper
    
    # Install desktop item
    ensureDir $out/share/applications
    cp ${desktopItem}/share/applications/* $out/share/applications
  '';
}
{'fraction_non_alphanumeric': 0.11199722607489598, 'fraction_numerical': 0.06449375866851595, 'mean_word_length': 2.925170068027211, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 5, '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': '4415690', 'n_tokens_mistral': 1254, 'n_tokens_neox': 1120, 'n_words': 201}