steam-run: refactor, remove unneeded files and dependencies

This commit is contained in:
Nikolay Amiantov 2016-05-26 14:33:18 +03:00
parent 1ab408e1da
commit ff0995707d

View File

@ -8,14 +8,8 @@
}:
let
self = {
name = "steam";
targetPkgs = pkgs: with pkgs; [
steamPackages.steam
commonTargetPkgs = pkgs: with pkgs; [
steamPackages.steam-fonts
# License agreement
gnome3.zenity
# Errors in output without those
pciutils
python2
@ -26,7 +20,17 @@ let
perl
# Open URLs
xdg_utils
] ++ lib.optional withJava jdk
];
in buildFHSUserEnv rec {
name = "steam";
targetPkgs = pkgs: with pkgs; [
steamPackages.steam
# License agreement
gnome3.zenity
] ++ commonTargetPkgs pkgs
++ lib.optional withJava jdk
++ lib.optional withPrimus (primus.override {
stdenv = overrideInStdenv stdenv [ useOldCXXAbi ];
stdenv_i686 = overrideInStdenv pkgsi686Linux.stdenv [ useOldCXXAbi ];
@ -72,9 +76,12 @@ let
runScript = "steam";
passthru.run = buildFHSUserEnv (self // {
passthru.run = buildFHSUserEnv {
name = "steam-run";
targetPkgs = commonTargetPkgs;
inherit multiPkgs extraBuildCommands;
runScript =
let ldPath = map (x: "/steamrt/${steam-runtime.arch}/" + x) steam-runtime.libs
++ lib.optionals (steam-runtime-i686 != null) (map (x: "/steamrt/${steam-runtime-i686.arch}/" + x) steam-runtime-i686.libs);
@ -89,9 +96,5 @@ let
export LD_LIBRARY_PATH=${lib.concatStringsSep ":" ldPath}:$LD_LIBRARY_PATH
exec "$run" "$@"
'';
passthru = {};
});
};
in buildFHSUserEnv self
}