mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-11-29 18:33:00 +00:00
steam: add extraEnv option
This commit is contained in:
parent
4731598712
commit
1f27e0b77a
@ -14,7 +14,12 @@ in {
|
|||||||
defaultText = literalExpression "pkgs.steam";
|
defaultText = literalExpression "pkgs.steam";
|
||||||
example = literalExpression ''
|
example = literalExpression ''
|
||||||
pkgs.steam-small.override {
|
pkgs.steam-small.override {
|
||||||
extraLibraries = with pkgs; [
|
extraEnv = {
|
||||||
|
MANGOHUD = true;
|
||||||
|
OBS_VKCAPTURE = true;
|
||||||
|
RADV_TEX_ANISO = 16;
|
||||||
|
};
|
||||||
|
extraLibraries = p: with p; [
|
||||||
atk
|
atk
|
||||||
];
|
];
|
||||||
}
|
}
|
||||||
|
@ -4,6 +4,7 @@
|
|||||||
, extraLibraries ? pkgs: [ ] # extra packages to add to multiPkgs
|
, extraLibraries ? pkgs: [ ] # extra packages to add to multiPkgs
|
||||||
, extraProfile ? "" # string to append to profile
|
, extraProfile ? "" # string to append to profile
|
||||||
, extraArgs ? "" # arguments to always pass to steam
|
, extraArgs ? "" # arguments to always pass to steam
|
||||||
|
, extraEnv ? { } # Environment variables to pass to Steam
|
||||||
, withGameSpecificLibraries ? true # exclude game specific libraries
|
, withGameSpecificLibraries ? true # exclude game specific libraries
|
||||||
}:
|
}:
|
||||||
|
|
||||||
@ -52,6 +53,8 @@ let
|
|||||||
fi
|
fi
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
envScript = lib.toShellVars extraEnv;
|
||||||
|
|
||||||
in buildFHSUserEnv rec {
|
in buildFHSUserEnv rec {
|
||||||
name = "steam";
|
name = "steam";
|
||||||
|
|
||||||
@ -248,6 +251,9 @@ in buildFHSUserEnv rec {
|
|||||||
|
|
||||||
${exportLDPath}
|
${exportLDPath}
|
||||||
${fixBootstrap}
|
${fixBootstrap}
|
||||||
|
|
||||||
|
set -o allexport # Export the following env vars
|
||||||
|
${envScript}
|
||||||
exec steam ${extraArgs} "$@"
|
exec steam ${extraArgs} "$@"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
@ -281,6 +287,9 @@ in buildFHSUserEnv rec {
|
|||||||
|
|
||||||
${exportLDPath}
|
${exportLDPath}
|
||||||
${fixBootstrap}
|
${fixBootstrap}
|
||||||
|
|
||||||
|
set -o allexport # Export the following env vars
|
||||||
|
${envScript}
|
||||||
exec -- "$run" "$@"
|
exec -- "$run" "$@"
|
||||||
'';
|
'';
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user