nixpkgs/pkgs/games/atlauncher/default.nix

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

59 lines
1.8 KiB
Nix
Raw Normal View History

{ copyDesktopItems, fetchurl, jre, lib, makeDesktopItem, makeWrapper, stdenv, udev, xorg }:
2023-06-11 22:44:18 +02:00
stdenv.mkDerivation (finalAttrs: {
pname = "atlauncher";
2023-10-11 07:51:53 +02:00
version = "3.4.34.2";
2023-06-11 22:44:18 +02:00
src = fetchurl {
url = "https://github.com/ATLauncher/ATLauncher/releases/download/v${finalAttrs.version}/ATLauncher-${finalAttrs.version}.jar";
2023-10-11 07:51:53 +02:00
hash = "sha256-l9OoHunK0xfY6xbNpjs9lfsVd3USM1GHgutTMMVq8S8=";
2023-06-11 22:44:18 +02:00
};
2023-09-25 19:47:20 +02:00
env.ICON = fetchurl {
url = "https://atlauncher.com/assets/images/logo.svg";
hash = "sha256-XoqpsgLmkpa2SdjZvPkgg6BUJulIBIeu6mBsJJCixfo=";
};
2023-06-11 22:44:18 +02:00
dontUnpack = true;
buildInputs = [ ];
nativeBuildInputs = [ copyDesktopItems makeWrapper ];
installPhase = ''
runHook preInstall
mkdir -p $out/bin $out/share/java
cp $src $out/share/java/ATLauncher.jar
makeWrapper ${jre}/bin/java $out/bin/${finalAttrs.pname} \
--prefix LD_LIBRARY_PATH : "${lib.makeLibraryPath [ xorg.libXxf86vm udev ]}" \
--add-flags "-jar $out/share/java/ATLauncher.jar" \
--add-flags "--working-dir \"\''${XDG_DATA_HOME:-\$HOME/.local/share}/ATLauncher\"" \
--add-flags "--no-launcher-update"
mkdir -p $out/share/icons/hicolor/scalable/apps
cp $ICON $out/share/icons/hicolor/scalable/apps/${finalAttrs.pname}.svg
runHook postInstall
'';
2023-06-11 22:44:18 +02:00
desktopItems = [
(makeDesktopItem {
name = finalAttrs.pname;
exec = finalAttrs.pname;
2023-09-25 19:47:20 +02:00
icon = finalAttrs.pname;
2023-06-11 22:44:18 +02:00
desktopName = "ATLauncher";
categories = [ "Game" ];
})
];
meta = with lib; {
description = "A simple and easy to use Minecraft launcher which contains many different modpacks for you to choose from and play";
downloadPage = "https://atlauncher.com/downloads";
homepage = "https://atlauncher.com/";
license = licenses.gpl3;
maintainers = [ maintainers.getpsyched ];
platforms = platforms.all;
};
})