Unverified Commit b0fbe664 authored by ashuramaruzxc's avatar ashuramaruzxc
Browse files

thcrap-steam-proton-wrapper: init at 0-unstable-2024-04-03

parent 79fdb02a
Loading
Loading
Loading
Loading
+56 −0
Original line number Diff line number Diff line
{
  lib
  , stdenv
  , fetchFromGitHub
  , makeWrapper
  , bash
  , subversion
  , gnome
}:
stdenv.mkDerivation {
  pname = "thcrap-proton";
  version = "0-unstable-2024-04-03";

  src = fetchFromGitHub {
    owner = "tactikauan";
    repo = "thcrap-steam-proton-wrapper";
    rev = "2b636c3f5f1ce1b9b41f731aa9397aa68d2ce66b";
    sha256 = "sha256-J2O8F75NMdsxSaNVr8zLf+vLEJE6CHqWQIIscuuJZ3o=";
  };

  buildInputs = [ subversion ];

  nativeBuildInputs = [ makeWrapper ];

  installPhase = ''
    runHook preInstall

    mkdir -p $out/bin
    cp thcrap_proton $out/bin/thcrap_proton

    runHook postInstall
  '';

  postFixup = ''
    wrapProgram $out/bin/thcrap_proton \
      --prefix PATH : ${
        lib.makeBinPath [
          bash
          subversion
          gnome.zenity
        ]
      }
  '';

  meta = {
    description = "A wrapper script for launching the official Touhou games on Steam with patches through Proton on GNU/Linux";
    homepage = "https://github.com/tactikauan/thcrap-steam-proton-wrapper";
    license = lib.licenses.unlicense;
    maintainers = with lib.maintainers; [ ashuramaruzxc ];
    platforms = [
      "x86_64-linux"
      "aarch64-linux"
    ];
    mainProgram = "thcrap_proton";
  };
}