umu-launcher: use steam.buildRuntimeEnv
This commit is contained in:
parent
bcc93336cb
commit
3f94560d86
@ -1,5 +1,4 @@
|
|||||||
{
|
{
|
||||||
buildFHSEnv,
|
|
||||||
lib,
|
lib,
|
||||||
steam,
|
steam,
|
||||||
umu-launcher-unwrapped,
|
umu-launcher-unwrapped,
|
||||||
@ -7,27 +6,17 @@
|
|||||||
extraLibraries ? pkgs: [ ],
|
extraLibraries ? pkgs: [ ],
|
||||||
extraProfile ? "", # string to append to shell profile
|
extraProfile ? "", # string to append to shell profile
|
||||||
extraEnv ? { }, # Environment variables to include in shell profile
|
extraEnv ? { }, # Environment variables to include in shell profile
|
||||||
withMultiArch ? true, # Many Wine games need 32-bit libraries.
|
|
||||||
}:
|
}:
|
||||||
let
|
steam.buildRuntimeEnv {
|
||||||
# Steam is not a dependency, but we re-use some of its implementation
|
|
||||||
steam' = steam.override {
|
|
||||||
inherit extraEnv extraProfile;
|
|
||||||
};
|
|
||||||
in
|
|
||||||
buildFHSEnv {
|
|
||||||
pname = "umu-launcher";
|
pname = "umu-launcher";
|
||||||
inherit (umu-launcher-unwrapped) version meta;
|
inherit (umu-launcher-unwrapped) version meta;
|
||||||
|
|
||||||
targetPkgs =
|
extraPkgs = pkgs: [ umu-launcher-unwrapped ] ++ extraPkgs pkgs;
|
||||||
pkgs:
|
inherit
|
||||||
[
|
extraLibraries
|
||||||
# Use umu-launcher-unwrapped from the package args, to support overriding
|
extraProfile
|
||||||
umu-launcher-unwrapped
|
extraEnv
|
||||||
]
|
;
|
||||||
++ extraPkgs pkgs;
|
|
||||||
multiPkgs = extraLibraries;
|
|
||||||
multiArch = withMultiArch;
|
|
||||||
|
|
||||||
executableName = umu-launcher-unwrapped.meta.mainProgram;
|
executableName = umu-launcher-unwrapped.meta.mainProgram;
|
||||||
runScript = lib.getExe umu-launcher-unwrapped;
|
runScript = lib.getExe umu-launcher-unwrapped;
|
||||||
@ -41,10 +30,4 @@ buildFHSEnv {
|
|||||||
ln -s ${umu-launcher-unwrapped}/lib $out/lib
|
ln -s ${umu-launcher-unwrapped}/lib $out/lib
|
||||||
ln -s ${umu-launcher-unwrapped}/share $out/share
|
ln -s ${umu-launcher-unwrapped}/share $out/share
|
||||||
'';
|
'';
|
||||||
|
|
||||||
# For umu & proton, we need roughly the same environment as Steam.
|
|
||||||
# For simplicity, we use Steam's `profile` implementation.
|
|
||||||
# See https://github.com/NixOS/nixpkgs/pull/381047
|
|
||||||
# And https://github.com/NixOS/nixpkgs/issues/297662#issuecomment-2647656699
|
|
||||||
inherit (steam'.args) profile;
|
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user