-
Notifications
You must be signed in to change notification settings - Fork 7
/
shell.nix
132 lines (96 loc) · 2.58 KB
/
shell.nix
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
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
{ pkgs ? import <nixpkgs> {}
}:
let
gdx-setup-tool-jar = pkgs.fetchurl {
url = "https://libgdx.com/assets/downloads/legacy_setup/gdx-setup_latest.jar";
sha256 = "1w79rll5302inmysr2bav2y80117b86npgry23maiv6cnj5xa19l";
};
hiero-jar = pkgs.fetchurl {
url = "https://libgdx-nightlies.s3.eu-central-1.amazonaws.com/libgdx-runnables/runnable-hiero.jar";
sha256 = "1lvr4qa0qjs103nkbl2gyc0d0syza12ghf0qpwqcqqn1v3hiq765";
};
hiero = pkgs.stdenv.mkDerivation {
name = "hiero";
nativeBuildInputs = with pkgs; [
wrapGAppsHook
glib
jdk11
];
src = null;
unpackPhase = ":";
installPhase = ''
mkdir -p $out/bin
cat >$out/bin/hiero <<-'EOF'
#!/usr/bin/env bash
java -jar ${hiero-jar}
EOF
chmod +x $out/bin/hiero
'';
};
gdx-skin-composer-jar = pkgs.fetchurl {
url = "https://github.com/raeleus/skin-composer/releases/download/50/SkinComposer.jar";
sha256 = "1jgcns5k4a3ps0zfps30mp7j9vmqi3wnnwhr9pd4fi56jlbnaw2k";
};
skin-composer = pkgs.stdenv.mkDerivation {
name = "skin-composer";
nativeBuildInputs = with pkgs; [
wrapGAppsHook
glib
jdk11
];
src = null;
unpackPhase = ":";
installPhase = ''
mkdir -p $out/bin
cat >$out/bin/skin-composer <<-'EOF'
#!/usr/bin/env bash
java -jar ${gdx-skin-composer-jar}
EOF
chmod +x $out/bin/skin-composer
'';
};
gdx-texture-packer = pkgs.stdenv.mkDerivation {
name = "gdx-texture-packer";
buildInputs = with pkgs; [
jdk11
unzip
];
setSourceRoot = "sourceRoot=`pwd`";
src = pkgs.fetchurl {
url = "https://github.com/crashinvaders/gdx-texture-packer-gui/releases/download/4.10.2/gdx-texturepacker-4.10.2.zip";
sha256 = "12a3myzzsyild8xg6vpxibp5vhaxfkz7k2p9f2nl9lcgx3ahjy46";
};
installPhase = ''
mkdir -p $out/bin
cp gdx-texturepacker.jar $out/bin
cp launcher_linux.sh $out/bin/gdx-texture-packer.sh
chmod +x $out/bin/gdx-texture-packer.sh
'';
};
in
pkgs.mkShell {
name = "hm-defense-shell";
version = "0.0.1";
nativeBuildInputs = with pkgs; [
xorg.libXxf86vm
openal
jdk11
];
buildInputs = with pkgs; [
gradle
kotlin
jetbrains.idea-community
gdx-texture-packer
hiero
skin-composer
(python3.withPackages (ps: with ps; [
pillow
]))
glib
glib.dev
visualvm
];
LD_LIBRARY_PATH = "${pkgs.xorg.libXxf86vm}/lib:${pkgs.openal}/lib";
GDX_SETUP = "java -jar ${gdx-setup-tool-jar}";
JAVA_HOME = "${pkgs.jdk11}/lib/openjdk";
}