From e578231cb88890520d241f15df9f825d9bb958ab Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 16 May 2023 21:30:54 +0300 Subject: [PATCH 1/3] steam-fhsenv: allow building without Steam I promise this will make sense. --- pkgs/games/steam/fhsenv.nix | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/pkgs/games/steam/fhsenv.nix b/pkgs/games/steam/fhsenv.nix index a64aaacb0e7e..7fe40b68ecee 100644 --- a/pkgs/games/steam/fhsenv.nix +++ b/pkgs/games/steam/fhsenv.nix @@ -62,7 +62,7 @@ in buildFHSEnv rec { name = "steam"; targetPkgs = pkgs: with pkgs; [ - steamPackages.steam + steam # License agreement gnome.zenity ] ++ commonTargetPkgs pkgs; @@ -207,10 +207,10 @@ in buildFHSEnv rec { libpsl nghttp2.lib rtmpdump - ] ++ steamPackages.steam-runtime-wrapped.overridePkgs + ] ++ steam-runtime-wrapped.overridePkgs ++ extraLibraries pkgs; - extraInstallCommands = '' + extraInstallCommands = lib.optionalString (steam != null) '' mkdir -p $out/share/applications ln -s ${steam}/share/icons $out/share ln -s ${steam}/share/pixmaps $out/share @@ -262,9 +262,15 @@ in buildFHSEnv rec { exec steam ${extraArgs} "$@" ''; - meta = steam.meta // lib.optionalAttrs (!withGameSpecificLibraries) { - description = steam.meta.description + " (without game specific libraries)"; - }; + meta = + if steam != null + then + steam.meta // lib.optionalAttrs (!withGameSpecificLibraries) { + description = steam.meta.description + " (without game specific libraries)"; + } + else { + description = "Steam dependencies (dummy package, do not use)"; + }; # allows for some gui applications to share IPC # this fixes certain issues where they don't render correctly @@ -298,7 +304,7 @@ in buildFHSEnv rec { exec -- "$run" "$@" ''; - meta = steam.meta // { + meta = (steam.meta or {}) // { description = "Run commands in the same FHS environment that is used for Steam"; name = "steam-run"; }; From 48db1ea01da9cc602bc10e982dd9a659188f6633 Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 16 May 2023 21:31:19 +0300 Subject: [PATCH 2/3] steamPackages: expose steam-fhsenv-without-steam This is not unfree and thus can be built by Hydra. --- pkgs/games/steam/default.nix | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/pkgs/games/steam/default.nix b/pkgs/games/steam/default.nix index a304f18f5bf6..370f22268a9a 100644 --- a/pkgs/games/steam/default.nix +++ b/pkgs/games/steam/default.nix @@ -25,6 +25,11 @@ let inherit buildFHSEnv; }; steam-fhsenv-small = steam-fhsenv.override { withGameSpecificLibraries = false; }; + + # This has to exist so Hydra tries to build all of Steam's dependencies. + # FIXME: Maybe we should expose it as something more generic? + steam-fhsenv-without-steam = steam-fhsenv.override { steam = null; }; + steamcmd = callPackage ./steamcmd.nix { }; }; keep = self: { }; From 1ec761c9d99018e7ec9b200789483c3fb18c0526 Mon Sep 17 00:00:00 2001 From: K900 Date: Tue, 16 May 2023 21:31:51 +0300 Subject: [PATCH 3/3] all-packages.nix: recurse into Steam Now that we can actually build something useful out of it on Hydra --- pkgs/top-level/all-packages.nix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index dea38435f0a3..f67d5a794ea3 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -36893,7 +36893,7 @@ with pkgs; stockfish = callPackage ../games/stockfish { }; - steamPackages = dontRecurseIntoAttrs (callPackage ../games/steam { }); + steamPackages = recurseIntoAttrs (callPackage ../games/steam { }); steam = steamPackages.steam-fhsenv; steam-small = steamPackages.steam-fhsenv-small;