<commit_before>{ stdenv, lib, writeScript, buildFHSUserEnv, steam, glxinfo-i686
, steam-runtime-wrapped, steam-runtime-wrapped-i686 ? null
, withJava ? false
, withPrimus ? false
, extraPkgs ? pkgs: [ ] # extra packages to add to targetPkgs
, extraProfile ? "" # string to append to profile
, nativeOnly ? false
, runtimeOnly ? false
}:

let
  commonTargetPkgs = pkgs: with pkgs;
    [
      steamPackages.steam-fonts
      # Errors in output without those
      pciutils
      python2
      # Games' dependencies
      xorg.xrandr
      which
      # Needed by gdialog, including in the steam-runtime
      perl
      # Open URLs
      xdg_utils
      iana-etc
    ] ++ lib.optional withJava jdk
      ++ lib.optional withPrimus primus
      ++ extraPkgs pkgs;

  ldPath = map (x: "/steamrt/${steam-runtime-wrapped.arch}/" + x) steam-runtime-wrapped.libs
           ++ lib.optionals (steam-runtime-wrapped-i686 != null) (map (x: "/steamrt/${steam-runtime-wrapped-i686.arch}/" + x) steam-runtime-wrapped-i686.libs);

  runSh = writeScript "run.sh" ''
    #!${stdenv.shell}
    runtime_paths="${lib.concatStringsSep ":" ldPath}"
    if [ "$1" == "--print-steam-runtime-library-paths" ]; then
      echo "$runtime_paths"
      exit 0
    fi
    export LD_LIBRARY_PATH="$runtime_paths:$LD_LIBRARY_PATH"
    exec "$@"
  '';

in buildFHSUserEnv rec {
  name = "steam";

  targetPkgs = pkgs: with pkgs; [<commit_msg>steam: Add python3 to runtime for steam play / proton<commit_after>{ stdenv, lib, writeScript, buildFHSUserEnv, steam, glxinfo-i686
, steam-runtime-wrapped, steam-runtime-wrapped-i686 ? null
, withJava ? false
, withPrimus ? false
, extraPkgs ? pkgs: [ ] # extra packages to add to targetPkgs
, extraProfile ? "" # string to append to profile
, nativeOnly ? false
, runtimeOnly ? false
}:

let
  commonTargetPkgs = pkgs: with pkgs;
    [
      steamPackages.steam-fonts
      # Errors in output without those
      pciutils
      python2
      # Games' dependencies
      xorg.xrandr
      which
      # Needed by gdialog, including in the steam-runtime
      perl
      # Open URLs
      xdg_utils
      iana-etc
      # Steam Play / Proton
      python3
    ] ++ lib.optional withJava jdk
      ++ lib.optional withPrimus primus
      ++ extraPkgs pkgs;

  ldPath = map (x: "/steamrt/${steam-runtime-wrapped.arch}/" + x) steam-runtime-wrapped.libs
           ++ lib.optionals (steam-runtime-wrapped-i686 != null) (map (x: "/steamrt/${steam-runtime-wrapped-i686.arch}/" + x) steam-runtime-wrapped-i686.libs);

  runSh = writeScript "run.sh" ''
    #!${stdenv.shell}
    runtime_paths="${lib.concatStringsSep ":" ldPath}"
    if [ "$1" == "--print-steam-runtime-library-paths" ]; then
      echo "$runtime_paths"
      exit 0
    fi
    export LD_LIBRARY_PATH="$runtime_paths:$LD_LIBRARY_PATH"
    exec "$@"
  '';

in buildFHSUserEnv rec {
  name = "steam";

  targetPkgs = pkgs: with pkgs; [
{'fraction_non_alphanumeric': 0.12474155754651964, 'fraction_numerical': 0.013094417643004824, 'mean_word_length': 2.89142091152815, 'pattern_counts': {'":': 2, '<': 3, '<?xml version=': 0, '>': 3, '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': '100232', 'n_tokens_mistral': 1048, 'n_tokens_neox': 987, 'n_words': 232}