2021-05-12 12:21:32 +02:00
|
|
|
{ lib
|
|
|
|
, rustPlatform
|
|
|
|
, steamcmd
|
|
|
|
, fetchFromGitHub
|
2022-02-22 02:02:54 +01:00
|
|
|
, steam-run
|
2021-05-12 12:21:32 +02:00
|
|
|
, runtimeShell
|
|
|
|
, withWine ? false
|
|
|
|
, wine
|
|
|
|
}:
|
|
|
|
|
|
|
|
rustPlatform.buildRustPackage rec {
|
|
|
|
pname = "steam-tui";
|
|
|
|
version = "0.1.0";
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "dmadisetti";
|
|
|
|
repo = pname;
|
|
|
|
rev = version;
|
|
|
|
sha256 = "sha256-UTXYlPecv0MVonr9zZwfwopfC/Fdch/ZSCxqgUsem40=";
|
|
|
|
};
|
|
|
|
|
|
|
|
cargoSha256 = "sha256-VYBzwDLSV4N4qt2dNgIS399T2HIbPTdQ2rDIeheLlfo=";
|
|
|
|
|
2022-02-22 02:02:54 +01:00
|
|
|
buildInputs = [ steamcmd ]
|
2021-05-12 12:21:32 +02:00
|
|
|
++ lib.optional withWine wine;
|
|
|
|
|
|
|
|
preFixup = ''
|
|
|
|
mv $out/bin/steam-tui $out/bin/.steam-tui-unwrapped
|
|
|
|
cat > $out/bin/steam-tui <<EOF
|
|
|
|
#!${runtimeShell}
|
2021-05-12 22:27:28 +02:00
|
|
|
export PATH=${steamcmd}/bin:\$PATH
|
2022-02-22 02:02:54 +01:00
|
|
|
exec ${steam-run}/bin/steam-run $out/bin/.steam-tui-unwrapped '\$@'
|
2021-05-12 12:21:32 +02:00
|
|
|
EOF
|
|
|
|
chmod +x $out/bin/steam-tui
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with lib; {
|
|
|
|
description = "Rust TUI client for steamcmd";
|
|
|
|
homepage = "https://github.com/dmadisetti/steam-tui";
|
|
|
|
license = licenses.mit;
|
2021-12-02 00:19:48 +01:00
|
|
|
maintainers = with maintainers; [ lom ];
|
2021-05-12 12:21:32 +02:00
|
|
|
# steam only supports that platform
|
|
|
|
platforms = [ "x86_64-linux" ];
|
|
|
|
};
|
|
|
|
}
|