mirror of
https://github.com/ilyakooo0/nixpkgs.git
synced 2024-12-26 04:43:09 +03:00
steam-run: refactor, remove unneeded files and dependencies
This commit is contained in:
parent
1ab408e1da
commit
ff0995707d
@ -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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user