about summary refs log tree commit diff
path: root/pkgs/games/steam
diff options
context:
space:
mode:
authorProfpatsch <mail@profpatsch.de>2021-02-05 11:44:45 +0100
committerProfpatsch <mail@profpatsch.de>2021-02-05 12:27:24 +0100
commitd2793017cad11d290dad64f5122b2d2668e2d467 (patch)
treea694f2a70c590fab56221301bbfae69c36d21455 /pkgs/games/steam
parentf0b9d862a5e54fa7f9159636ce5a90ef3360231f (diff)
treewide: stdenv.lib -> pkgs.lib
Upstream is deprecating `stdenv.lib`, so let’s do the same.
Diffstat (limited to 'pkgs/games/steam')
-rw-r--r--pkgs/games/steam/fetchsteam/default.nix10
-rw-r--r--pkgs/games/steam/starbound.nix14
2 files changed, 12 insertions, 12 deletions
diff --git a/pkgs/games/steam/fetchsteam/default.nix b/pkgs/games/steam/fetchsteam/default.nix
index 646e0a14..0dc609de 100644
--- a/pkgs/games/steam/fetchsteam/default.nix
+++ b/pkgs/games/steam/fetchsteam/default.nix
@@ -1,4 +1,4 @@
-{ stdenv, runCommand, writeText, fetchFromGitHub, buildDotnetPackage
+{ stdenv, lib, runCommand, writeText, fetchFromGitHub, buildDotnetPackage
 , username, password
 }:
 
@@ -65,18 +65,18 @@ let
     # without that nasty wrapper.
     makeWrapperArgs = let
       mkMono = name: path: "${path}/lib/dotnet/${name}";
-      paths = stdenv.lib.mapAttrsToList mkMono {
+      paths = lib.mapAttrsToList mkMono {
         inherit SteamKit2 protobuf-net;
       };
-      monoPath = stdenv.lib.concatStringsSep ":" paths;
+      monoPath = lib.concatStringsSep ":" paths;
     in [ "--prefix MONO_PATH : \"${monoPath}\"" ];
   };
 
   fileListFile = let
-    content = stdenv.lib.concatStringsSep "\n" fileList;
+    content = lib.concatStringsSep "\n" fileList;
   in writeText "steam-file-list-${name}.txt" content;
 
-in with stdenv.lib; runCommand "${name}-src" {
+in with lib; runCommand "${name}-src" {
   buildInputs = [ DepotDownloader ];
   inherit username password appId depotId manifestId;
   preferLocalBuild = true;
diff --git a/pkgs/games/steam/starbound.nix b/pkgs/games/steam/starbound.nix
index b18e2e33..0df0a0e9 100644
--- a/pkgs/games/steam/starbound.nix
+++ b/pkgs/games/steam/starbound.nix
@@ -1,4 +1,4 @@
-{ stdenv, fetchSteam, fetchurl, writeText, SDL, libGL, jq, makeDesktopItem
+{ stdenv, lib, fetchSteam, fetchurl, writeText, SDL, libGL, jq, makeDesktopItem
 , flavor ? "stable"
 }:
 
@@ -8,12 +8,12 @@ let
       name = f name;
       inherit value;
     };
-  in stdenv.lib.mapAttrs' rename;
+  in lib.mapAttrs' rename;
 
   darwinize = renameAttrs (bin: "Starbound.app/Contents/MacOS/${bin}");
   winize = renameAttrs (bin: "${bin}.exe");
 
-  mkOsBinaryDeps = with stdenv.lib;
+  mkOsBinaryDeps = with lib;
     if stdenv.system == "x86_64-darwin" then darwinize
     else if elem stdenv.system [ "i686-cygwin" "x86_64-cygwin" ] then winize
     else id;
@@ -87,7 +87,7 @@ let
 
     hasBootconfigArg = attrs.hasBootconfigArg or false;
 
-    bootconfigArgs = with stdenv.lib; let
+    bootconfigArgs = with lib; let
       mkArg = opt: val: "-${opt} \"${val}\"";
     in " " + (concatStringsSep " " (mapAttrsToList mkArg {
       bootconfig = "$XDG_DATA_HOME/${settingsDir}/sbboot.config";
@@ -159,7 +159,7 @@ let
     chmod +x "patched/$(basename "${bin}")"
     patchelf \
       --set-interpreter "$(cat $NIX_CC/nix-support/dynamic-linker)" \
-      --set-rpath "${stdenv.lib.makeLibraryPath (attrs.deps or [])}" \
+      --set-rpath "${lib.makeLibraryPath (attrs.deps or [])}" \
       "patched/$(basename "${bin}")"
     if ldd "patched/$(basename "${bin}")" | grep -F 'not found'; then
       exit 1;
@@ -174,7 +174,7 @@ in stdenv.mkDerivation {
 
   inherit binpath upstream;
 
-  buildPhase = with stdenv.lib;
+  buildPhase = with lib;
     concatStrings (mapAttrsToList patchBinary binaryDeps);
 
   doCheck = true;
@@ -198,7 +198,7 @@ in stdenv.mkDerivation {
     sed -e 's,//.*,,' "${upstream}/${binpath}/sbboot.config" \
       | "${jq}/bin/jq" -s '.[0] * .[1]' - "${staticBootOverrides}" \
       > "$out/etc/sbboot.config"
-    ${stdenv.lib.concatStrings (stdenv.lib.mapAttrsToList mkProg binaryDeps)}
+    ${lib.concatStrings (lib.mapAttrsToList mkProg binaryDeps)}
     install -m 0644 -vD "${desktopItem}/share/applications/starbound.desktop" \
       "$out/share/applications/starbound.desktop"
   '';