2021-01-11 07:54:33 +00:00
|
|
|
{ lib, stdenv, fetchurl, steam-run, bash, coreutils
|
2018-04-12 22:32:14 +00:00
|
|
|
, steamRoot ? "~/.local/share/Steam"
|
|
|
|
}:
|
|
|
|
|
2019-08-13 21:52:01 +00:00
|
|
|
stdenv.mkDerivation {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "steamcmd";
|
2018-04-12 22:32:14 +00:00
|
|
|
version = "20180104"; # According to steamcmd_linux.tar.gz mtime
|
|
|
|
|
|
|
|
src = fetchurl {
|
2020-04-01 01:11:51 +00:00
|
|
|
url = "https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz";
|
2018-04-12 22:32:14 +00:00
|
|
|
sha256 = "0z0y0zqvhydmfc9y9vg5am0vz7m3gbj4l2dwlrfz936hpx301gyf";
|
|
|
|
};
|
|
|
|
|
|
|
|
# The source tarball does not have a single top-level directory.
|
|
|
|
preUnpack = ''
|
|
|
|
mkdir $name
|
|
|
|
cd $name
|
|
|
|
sourceRoot=.
|
|
|
|
'';
|
|
|
|
|
|
|
|
buildInputs = [ bash steam-run ];
|
|
|
|
|
|
|
|
dontBuild = true;
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
mkdir -p $out/share/steamcmd/linux32
|
|
|
|
install -Dm755 steamcmd.sh $out/share/steamcmd/steamcmd.sh
|
|
|
|
install -Dm755 linux32/* $out/share/steamcmd/linux32
|
|
|
|
|
|
|
|
mkdir -p $out/bin
|
|
|
|
substitute ${./steamcmd.sh} $out/bin/steamcmd \
|
|
|
|
--subst-var out \
|
2019-03-29 20:39:24 +00:00
|
|
|
--subst-var-by coreutils ${coreutils} \
|
2018-04-12 22:32:14 +00:00
|
|
|
--subst-var-by steamRoot "${steamRoot}" \
|
|
|
|
--subst-var-by steamRun ${steam-run}
|
|
|
|
chmod 0755 $out/bin/steamcmd
|
|
|
|
'';
|
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2018-04-12 22:32:14 +00:00
|
|
|
description = "Steam command-line tools";
|
|
|
|
homepage = "https://developer.valvesoftware.com/wiki/SteamCMD";
|
|
|
|
platforms = platforms.linux;
|
|
|
|
license = licenses.unfreeRedistributable;
|
|
|
|
maintainers = with maintainers; [ tadfisher ];
|
|
|
|
};
|
|
|
|
}
|