Unverified Commit 8784eec7 authored by Hythera's avatar Hythera
Browse files

noriskclient-launcher: init at 0.6.14

parent 8f9744c8
Loading
Loading
Loading
Loading
+2 −3
Original line number Diff line number Diff line
@@ -12,7 +12,6 @@
  openssl,
  pkg-config,
  rustPlatform,
  stdenv,
  webkitgtk_4_1,
  yarnConfigHook,
}:
@@ -41,7 +40,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
    ./java-from-path.patch
  ];

  postPatch = lib.optionalString stdenv.hostPlatform.isLinux ''
  postPatch = ''
    substituteInPlace $cargoDepsCopy/libappindicator-sys-*/src/lib.rs \
      --replace-fail "libayatana-appindicator3.so.1" "${libayatana-appindicator}/lib/libayatana-appindicator3.so.1"
  '';
@@ -81,7 +80,7 @@ rustPlatform.buildRustPackage (finalAttrs: {
  meta = {
    description = "Minecraft Launcher for NoRisk Client";
    homepage = "https://norisk.gg";
    license = lib.licenses.gpl3;
    license = lib.licenses.gpl3Only;
    longDescription = ''
      An easy way to launch the NoRisk Client, create modpacks,
      manage content for Minecraft, and much more - written in tauri.
+101 −0
Original line number Diff line number Diff line
{
  addDriverRunpath,
  alsa-lib,
  flite,
  glib,
  glib-networking,
  gsettings-desktop-schemas,
  jdk17,
  jdk21,
  jdk8,
  jdks ? [
    jdk8
    jdk17
    jdk21
  ],
  lib,
  libGL,
  libjack2,
  libpulseaudio,
  libX11,
  libXcursor,
  libXext,
  libXrandr,
  libXxf86vm,
  noriskclient-launcher-unwrapped,
  pipewire,
  stdenv,
  symlinkJoin,
  udev,
  wrapGAppsHook4,
}:

symlinkJoin {
  pname = "noriskclient-launcher";
  inherit (noriskclient-launcher-unwrapped) version;

  paths = [ noriskclient-launcher-unwrapped ];

  strictDeps = true;

  nativeBuildInputs = [
    glib
    wrapGAppsHook4
  ];

  buildInputs = [
    glib-networking
    gsettings-desktop-schemas
  ];

  runtimeDependencies = lib.optionalString stdenv.hostPlatform.isLinux (
    lib.makeLibraryPath [
      addDriverRunpath.driverLink

      # glfw
      libGL
      libX11
      libXcursor
      libXext
      libXrandr
      libXxf86vm

      # narrator support
      flite

      # openal
      alsa-lib
      libjack2
      libpulseaudio
      pipewire

      # oshi
      udev
    ]
  );

  postBuild = ''
    gappsWrapperArgs+=(
      --prefix PATH : ${lib.makeSearchPath "bin/java" jdks}
      ${lib.optionalString stdenv.hostPlatform.isLinux ''
        --set LD_LIBRARY_PATH $runtimeDependencies
      ''}
    )

    glibPostInstallHook
    gappsWrapperArgsHook
    wrapGAppsHook
  '';

  meta = {
    inherit (noriskclient-launcher-unwrapped.meta)
      description
      homepage
      license
      longDescription
      maintainers
      mainProgram
      platforms
      ;
  };
}