<commit_before>{ lib, buildFHSUserEnv, config }:

buildFHSUserEnv {
  name = "steam";

  targetPkgs = pkgs:
    [ pkgs.steam-original
      pkgs.corefonts
      pkgs.curl
      pkgs.dbus
      pkgs.dpkg
      pkgs.mono
      pkgs.python
      pkgs.gnome2.zenity
      pkgs.xdg_utils
      pkgs.xlibs.xrandr
      pkgs.which
    ]
    ++ lib.optional (config.steam.java or false) pkgs.jdk
    ++ lib.optional (config.steam.primus or false) pkgs.primus
    ;

  multiPkgs = pkgs:
    [ pkgs.cairo
      pkgs.glib
      pkgs.gtk
      pkgs.gdk_pixbuf
      pkgs.pango

      pkgs.freetype
      pkgs.xlibs.libICE
      pkgs.xlibs.libSM
      pkgs.xlibs.libX11
      pkgs.xlibs.libXau
      pkgs.xlibs.libxcb
      pkgs.xlibs.libXcursor
      pkgs.xlibs.libXdamage
      pkgs.xlibs.libXdmcp
      pkgs.xlibs.libXext
      pkgs.xlibs.libXfixes
      pkgs.xlibs.libXi
      pkgs.xlibs.libXinerama
      pkgs.xlibs.libXrandr
      pkgs.xlibs.libXrender
      pkgs.xlibs.libXScrnSaver
      pkgs.xlibs.libXtst
      pkgs.xlibs.libXxf86vm

      pkgs.ffmpeg
      pkgs.libpng12
      pkgs.mesa
      pkgs.SDL
      pkgs.SDL2

      pkgs.libgcrypt
      pkgs.zlib

      pkgs.alsaLib
      pkgs.libvorbis
      pkgs.openal
      pkgs.libpulseaudio

      pkgs.gst_all_1.gst-plugins-ugly # "Audiosurf 2" needs this
    ];

  extraBuildCommandsMulti = ''
    cd usr/lib
    ln -sf ../lib64/steam steam
  '';

  profile = ''
    # Ugly workaround for https://github.com/ValveSoftware/steam-for-linux/issues/3504
    export LD_PRELOAD=/lib32/libpulse.so:/lib64/libpulse.so:/lib32/libasound.so:/lib64/libasound.so:$LD_PRELOAD
    # Another one for https://github.com/ValveSoftware/steam-for-linux/issues/3801
    export LD_PRELOAD=/lib32/libstdc++.so:/lib64/libstdc++.so:$LD_PRELOAD
  '';

  runScript = "steam";
}<commit_msg>steam: added libdrm to chrootenv.<commit_after>{ lib, buildFHSUserEnv, config }:

buildFHSUserEnv {
  name = "steam";

  targetPkgs = pkgs:
    [ pkgs.steam-original
      pkgs.corefonts
      pkgs.curl
      pkgs.dbus
      pkgs.dpkg
      pkgs.mono
      pkgs.python
      pkgs.gnome2.zenity
      pkgs.xdg_utils
      pkgs.xlibs.xrandr
      pkgs.which
    ]
    ++ lib.optional (config.steam.java or false) pkgs.jdk
    ++ lib.optional (config.steam.primus or false) pkgs.primus
    ;

  multiPkgs = pkgs:
    [ pkgs.cairo
      pkgs.glib
      pkgs.gtk
      pkgs.gdk_pixbuf
      pkgs.pango

      pkgs.freetype
      pkgs.xlibs.libICE
      pkgs.xlibs.libSM
      pkgs.xlibs.libX11
      pkgs.xlibs.libXau
      pkgs.xlibs.libxcb
      pkgs.xlibs.libXcursor
      pkgs.xlibs.libXdamage
      pkgs.xlibs.libXdmcp
      pkgs.xlibs.libXext
      pkgs.xlibs.libXfixes
      pkgs.xlibs.libXi
      pkgs.xlibs.libXinerama
      pkgs.xlibs.libXrandr
      pkgs.xlibs.libXrender
      pkgs.xlibs.libXScrnSaver
      pkgs.xlibs.libXtst
      pkgs.xlibs.libXxf86vm

      pkgs.ffmpeg
      pkgs.libpng12
      pkgs.mesa
      pkgs.SDL
      pkgs.SDL2
      pkgs.libdrm

      pkgs.libgcrypt
      pkgs.zlib

      pkgs.alsaLib
      pkgs.libvorbis
      pkgs.openal
      pkgs.libpulseaudio

      pkgs.gst_all_1.gst-plugins-ugly # "Audiosurf 2" needs this
    ];

  extraBuildCommandsMulti = ''
    cd usr/lib
    ln -sf ../lib64/steam steam
  '';

  profile = ''
    # Ugly workaround for https://github.com/ValveSoftware/steam-for-linux/issues/3504
    export LD_PRELOAD=/lib32/libpulse.so:/lib64/libpulse.so:/lib32/libasound.so:/lib64/libasound.so:$LD_PRELOAD
    # Another one for https://github.com/ValveSoftware/steam-for-linux/issues/3801
    export LD_PRELOAD=/lib32/libstdc++.so:/lib64/libstdc++.so:$LD_PRELOAD
  '';

  runScript = "steam";
}
{'fraction_non_alphanumeric': 0.10355191256830601, 'fraction_numerical': 0.017486338797814208, 'mean_word_length': 2.1344178082191783, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 4, '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': '4127165', 'n_tokens_mistral': 1710, 'n_tokens_neox': 1475, 'n_words': 191}