1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
|
{
copyDesktopItems,
fetchurl,
jre,
lib,
makeDesktopItem,
makeWrapper,
stdenvNoCC,
gamemodeSupport ? stdenvNoCC.isLinux,
textToSpeechSupport ? stdenvNoCC.isLinux,
additionalLibs ? [ ],
# dependencies
flite,
gamemode,
libglvnd,
libpulseaudio,
udev,
xorg,
}:
stdenvNoCC.mkDerivation (finalAttrs: {
pname = "atlauncher";
version = "3.4.36.9";
src = fetchurl {
url = "https://github.com/ATLauncher/ATLauncher/releases/download/v${finalAttrs.version}/ATLauncher-${finalAttrs.version}.jar";
hash = "sha256-2kO7CRkA3RlWcNqv2d5sJIaLPupUU0ox2wc3T16i7e8=";
};
env.ICON = fetchurl {
url = "https://atlauncher.com/assets/images/logo.svg";
hash = "sha256-XoqpsgLmkpa2SdjZvPkgg6BUJulIBIeu6mBsJJCixfo=";
};
dontUnpack = true;
nativeBuildInputs = [
copyDesktopItems
makeWrapper
];
installPhase =
let
runtimeLibraries =
[
libglvnd
libpulseaudio
udev
xorg.libX11
xorg.libXcursor
xorg.libXxf86vm
]
++ lib.optional gamemodeSupport gamemode.lib
++ lib.optional textToSpeechSupport flite
++ additionalLibs;
in
''
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 runtimeLibraries}" \
--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
'';
desktopItems = [
(makeDesktopItem {
categories = [ "Game" ];
desktopName = "ATLauncher";
exec = "atlauncher";
icon = "atlauncher";
name = "atlauncher";
})
];
meta = {
changelog = "https://github.com/ATLauncher/ATLauncher/blob/v${finalAttrs.version}/CHANGELOG.md";
description = "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 = lib.licenses.gpl3;
mainProgram = "atlauncher";
maintainers = with lib.maintainers; [ getpsyched ];
platforms = lib.platforms.all;
sourceProvenance = [ lib.sourceTypes.binaryBytecode ];
};
})
|