nixpkgs/pkgs/by-name/at/atlauncher/package.nix

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

60 lines
1.9 KiB
Nix
Raw Normal View History

{ copyDesktopItems, fetchurl, jre, lib, makeDesktopItem, makeWrapper, stdenv, udev, xorg }:
2023-06-11 20:44:18 +00:00
stdenv.mkDerivation (finalAttrs: {
pname = "atlauncher";
2024-03-16 22:01:23 +00:00
version = "3.4.35.9";
2023-06-11 20:44:18 +00:00
src = fetchurl {
url = "https://github.com/ATLauncher/ATLauncher/releases/download/v${finalAttrs.version}/ATLauncher-${finalAttrs.version}.jar";
2024-03-16 22:01:23 +00:00
hash = "sha256-Y2MGhzq4IbtjEG+CER+FWU8CY+hn5ehjMOcP02zIsR4=";
2023-06-11 20:44:18 +00:00
};
2023-09-25 17:47:20 +00:00
env.ICON = fetchurl {
url = "https://atlauncher.com/assets/images/logo.svg";
hash = "sha256-XoqpsgLmkpa2SdjZvPkgg6BUJulIBIeu6mBsJJCixfo=";
};
2023-06-11 20:44:18 +00:00
dontUnpack = true;
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/atlauncher \
--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/atlauncher.svg
runHook postInstall
'';
2023-06-11 20:44:18 +00:00
desktopItems = [
(makeDesktopItem {
2024-02-02 13:49:16 +00:00
categories = [ "Game" ];
desktopName = "ATLauncher";
exec = "atlauncher";
icon = "atlauncher";
2024-02-02 13:49:16 +00:00
name = "atlauncher";
2023-06-11 20:44:18 +00:00
})
];
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";
2024-02-02 13:49:16 +00:00
homepage = "https://atlauncher.com";
2023-06-11 20:44:18 +00:00
license = licenses.gpl3;
2024-02-02 13:49:16 +00:00
mainProgram = "atlauncher";
2023-06-11 20:44:18 +00:00
maintainers = [ maintainers.getpsyched ];
platforms = platforms.all;
2024-01-03 18:33:54 +00:00
sourceProvenance = [ sourceTypes.binaryBytecode ];
2023-06-11 20:44:18 +00:00
};
})