Merge pull request #268619 from tweag/lib-descriptions
[NixPkgs.git] / pkgs / games / steam-tui / default.nix
blob63deb3b969ce043f9acc5738fef7b0f943fff990
1 { lib
2 , rustPlatform
3 , steamcmd
4 , fetchFromGitHub
5 , steam-run
6 , runtimeShell
7 , withWine ? false
8 , wine
9 }:
11 rustPlatform.buildRustPackage rec {
12   pname = "steam-tui";
13   version = "0.1.0";
15   src = fetchFromGitHub {
16     owner = "dmadisetti";
17     repo = pname;
18     rev = version;
19     sha256 = "sha256-UTXYlPecv0MVonr9zZwfwopfC/Fdch/ZSCxqgUsem40=";
20   };
22   cargoSha256 = "sha256-VYBzwDLSV4N4qt2dNgIS399T2HIbPTdQ2rDIeheLlfo=";
24   buildInputs = [ steamcmd ]
25     ++ lib.optional withWine wine;
27   preFixup = ''
28     mv $out/bin/steam-tui $out/bin/.steam-tui-unwrapped
29     cat > $out/bin/steam-tui <<EOF
30     #!${runtimeShell}
31     export PATH=${steamcmd}/bin:\$PATH
32     exec ${steam-run}/bin/steam-run $out/bin/.steam-tui-unwrapped '\$@'
33     EOF
34     chmod +x $out/bin/steam-tui
35   '';
37   meta = with lib; {
38     description = "Rust TUI client for steamcmd";
39     homepage = "https://github.com/dmadisetti/steam-tui";
40     license = licenses.mit;
41     maintainers = with maintainers; [ lom ];
42     # steam only supports that platform
43     platforms = [ "x86_64-linux" ];
44   };