From 5a04b35bd33dddec96625e996f9241980ca46f26 Mon Sep 17 00:00:00 2001 From: Colin Arnott Date: Tue, 8 Nov 2022 07:23:51 +0000 Subject: [PATCH] steamtinkerlaunch: init at 11.11 Fixes #186826 --- .../tools/games/steamtinkerlaunch/default.nix | 62 +++++++++++++++++++ pkgs/top-level/all-packages.nix | 2 + 2 files changed, 64 insertions(+) create mode 100644 pkgs/tools/games/steamtinkerlaunch/default.nix diff --git a/pkgs/tools/games/steamtinkerlaunch/default.nix b/pkgs/tools/games/steamtinkerlaunch/default.nix new file mode 100644 index 000000000000..3098bd2912e6 --- /dev/null +++ b/pkgs/tools/games/steamtinkerlaunch/default.nix @@ -0,0 +1,62 @@ +{ bash +, gawk +, git +, gnugrep +, fetchFromGitHub +, installShellFiles +, lib +, makeWrapper +, stdenv +, unixtools +, unzip +, wget +, xdotool +, xorg +, yad +}: + +stdenv.mkDerivation rec { + pname = "steamtinkerlaunch"; + version = "11.11"; + + src = fetchFromGitHub { + owner = "sonic2kk"; + repo = pname; + rev = "v${version}"; + hash = "sha256-rWENtgV6spokzkhnmrrzsAQ19dROJ50ofEulU5Jx5IE="; + }; + + # hardcode PROGCMD because #150841 + postPatch = '' + substituteInPlace steamtinkerlaunch --replace 'PROGCMD="''${0##*/}"' 'PROGCMD="steamtinkerlaunch"' + ''; + + nativeBuildInputs = [ makeWrapper ]; + + installFlags = [ "PREFIX=\${out}" ]; + + postInstall = '' + wrapProgram $out/bin/steamtinkerlaunch --prefix PATH : ${lib.makeBinPath [ + bash + gawk + git + gnugrep + unixtools.xxd + unzip + wget + xdotool + xorg.xprop + xorg.xrandr + xorg.xwininfo + yad + ]} + ''; + + meta = with lib; { + description = "Linux wrapper tool for use with the Steam client for custom launch options and 3rd party programs"; + homepage = "https://github.com/sonic2kk/steamtinkerlaunch"; + license = licenses.gpl3; + maintainers = with maintainers; [ urandom ]; + platforms = lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index ed7f7bd924b5..ceb85072550e 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -1434,6 +1434,8 @@ with pkgs; spectre-cli = callPackage ../tools/security/spectre-cli { }; + steamtinkerlaunch = callPackage ../tools/games/steamtinkerlaunch {}; + sx-go = callPackage ../tools/security/sx-go { }; systeroid = callPackage ../tools/system/systeroid { };