nixpkgs/pkgs/games/steam-tui/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

61 lines
1.3 KiB
Nix
Raw Normal View History

2024-07-01 17:20:58 +00:00
{
lib,
rustPlatform,
steamcmd,
fetchFromGitHub,
steam-run,
openssl,
pkg-config,
runtimeShell,
withWine ? false,
wine,
2021-05-12 10:21:32 +00:00
}:
rustPlatform.buildRustPackage rec {
pname = "steam-tui";
2024-07-01 17:20:58 +00:00
version = "0.3.0";
2021-05-12 10:21:32 +00:00
src = fetchFromGitHub {
owner = "dmadisetti";
repo = pname;
rev = version;
2024-07-01 17:20:58 +00:00
sha256 = "sha256-3vBIpPIsh+7PjTuNNqp7e/pdciOYnzuGkjb/Eks6QJw=";
2021-05-12 10:21:32 +00:00
};
cargoHash = "sha256-poNPdrMguV79cwo2Eq1dGVUN0E4yG84Q63kU9o+eABo=";
2021-05-12 10:21:32 +00:00
2024-07-01 17:20:58 +00:00
nativeBuildInputs = [
openssl
pkg-config
];
buildInputs = [ steamcmd ] ++ lib.optional withWine wine;
2021-05-12 10:21:32 +00:00
preFixup = ''
mv $out/bin/steam-tui $out/bin/.steam-tui-unwrapped
cat > $out/bin/steam-tui <<EOF
#!${runtimeShell}
export PATH=${steamcmd}/bin:\$PATH
2022-02-22 01:02:54 +00:00
exec ${steam-run}/bin/steam-run $out/bin/.steam-tui-unwrapped '\$@'
2021-05-12 10:21:32 +00:00
EOF
chmod +x $out/bin/steam-tui
'';
2024-07-01 17:20:58 +00:00
checkFlags = [ "--skip=impure" ];
PKG_CONFIG_PATH = "${openssl.dev}/lib/pkgconfig";
2021-05-12 10:21:32 +00:00
meta = with lib; {
description = "Rust TUI client for steamcmd";
homepage = "https://github.com/dmadisetti/steam-tui";
license = licenses.mit;
2024-07-01 17:20:58 +00:00
maintainers = with maintainers; [
lom
dmadisetti
];
2021-05-12 10:21:32 +00:00
# steam only supports that platform
platforms = [ "x86_64-linux" ];
2023-11-23 21:09:35 +00:00
mainProgram = "steam-tui";
2021-05-12 10:21:32 +00:00
};
}