Unverified Commit c5160551 authored by Gaétan Lepage's avatar Gaétan Lepage Committed by GitHub
Browse files

beammp-launcher: init at 2.7.0 (#439559)

parents 1f085c5f 65f42173
Loading
Loading
Loading
Loading
+69 −0
Original line number Diff line number Diff line
{
  stdenv,
  fetchFromGitHub,
  lib,
  copyDesktopItems,
  installShellFiles,
  makeDesktopItem,

  cmake,
  curl,
  httplib,
  nlohmann_json,
  openssl,
}:

stdenv.mkDerivation (finalAttrs: {
  pname = "beammp-launcher";
  version = "2.7.0";

  src = fetchFromGitHub {
    owner = "BeamMP";
    repo = "BeamMP-Launcher";
    tag = "v${finalAttrs.version}";
    hash = "sha256-+qdDGOLds2j00BRijFAZ8DMrnjvigs+z+w9+wbitJno=";
  };

  strictDeps = true;

  nativeBuildInputs = [
    copyDesktopItems
    installShellFiles

    cmake
  ];

  buildInputs = [
    curl
    httplib
    nlohmann_json
    openssl
  ];

  desktopItems = [
    (makeDesktopItem {
      categories = [ "Game" ];
      comment = "Launcher for the BeamMP mod for BeamNG.drive";
      desktopName = "BeamMP-Launcher";
      exec = "BeamMP-Launcher";
      name = "BeamMP-Launcher";
      terminal = true;
    })
  ];

  installPhase = ''
    runHook preInstall
    installBin "BeamMP-Launcher"
    copyDesktopItems
    runHook postInstall
  '';

  meta = {
    description = "Launcher for the BeamMP mod for BeamNG.drive";
    homepage = "https://github.com/BeamMP/BeamMP-Launcher";
    license = lib.licenses.agpl3Only;
    mainProgram = "BeamMP-Launcher";
    maintainers = [ lib.maintainers.Andy3153 ];
    platforms = lib.platforms.linux;
  };
})