k3s: format with nixfmt-rfc-style
[NixPkgs.git] / pkgs / games / steam / default.nix
blob651c204918447dabe67573ecfa2c07b38b1b084b
1 { makeScopeWithSplicing', generateSplicesForMkScope
2 , stdenv, buildFHSEnv, pkgsi686Linux, glxinfo
3 }:
5 let
6   steamPackagesFun = self: let
7     inherit (self) callPackage;
8   in rec {
9     steamArch = if stdenv.hostPlatform.system == "x86_64-linux" then "amd64"
10                 else if stdenv.hostPlatform.system == "i686-linux" then "i386"
11                 else throw "Unsupported platform: ${stdenv.hostPlatform.system}";
13     steam-runtime = callPackage ./runtime.nix { };
14     steam-runtime-wrapped = callPackage ./runtime-wrapped.nix { };
15     steam = callPackage ./steam.nix { };
16     steam-fhsenv = callPackage ./fhsenv.nix {
17       glxinfo-i686 =
18         if self.steamArch == "amd64"
19         then pkgsi686Linux.glxinfo
20         else glxinfo;
21       steam-runtime-wrapped-i686 =
22         if self.steamArch == "amd64"
23         then pkgsi686Linux.steamPackages.steam-runtime-wrapped
24         else null;
25       inherit buildFHSEnv;
26     };
27     steam-fhsenv-small = steam-fhsenv.override { withGameSpecificLibraries = false; };
29     # This has to exist so Hydra tries to build all of Steam's dependencies.
30     # FIXME: Maybe we should expose it as something more generic?
31     steam-fhsenv-without-steam = steam-fhsenv.override { steam = null; };
33     steamcmd = callPackage ./steamcmd.nix { };
34   };
35 in makeScopeWithSplicing' {
36   otherSplices = generateSplicesForMkScope "steamPackages";
37   f = steamPackagesFun;