steamcmd: Add needed binaries to PATH

This commit is contained in:
Silvan Mosberger 2019-03-29 21:39:24 +01:00
parent 07b42ccf2d
commit a7b01d29ba
No known key found for this signature in database
GPG key ID: 9424360B4B85C9E7
2 changed files with 5 additions and 2 deletions

View file

@ -1,4 +1,4 @@
{ stdenv, fetchurl, steam-run, bash
{ stdenv, fetchurl, steam-run, bash, coreutils
, steamRoot ? "~/.local/share/Steam"
}:
@ -29,8 +29,8 @@ stdenv.mkDerivation rec {
mkdir -p $out/bin
substitute ${./steamcmd.sh} $out/bin/steamcmd \
--subst-var shell \
--subst-var out \
--subst-var-by coreutils ${coreutils} \
--subst-var-by steamRoot "${steamRoot}" \
--subst-var-by steamRun ${steam-run}
chmod 0755 $out/bin/steamcmd

View file

@ -3,6 +3,9 @@
# Always run steamcmd in the user's Steam root.
STEAMROOT=@steamRoot@
# Add coreutils to PATH for mkdir, ln and cp used below
PATH=$PATH${PATH:+:}@coreutils@/bin
# Create a facsimile Steam root if it doesn't exist.
if [ ! -e "$STEAMROOT" ]; then
mkdir -p "$STEAMROOT"/{appcache,config,logs,Steamapps/common}