-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathchess.nix
38 lines (32 loc) · 1.24 KB
/
chess.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
{
jre,
makeWrapper,
maven,
}:
maven.buildMavenPackage rec {
pname = "chess";
version = "0.0.1";
src = ./.;
mvnHash = "sha256-ZAy0LuHxbWqsANCY2ZQLRoXN6yV+VWO6Dok5wZd9CO0=";
nativeBuildInputs = [makeWrapper];
installPhase = ''
mkdir -p $out/bin $out/share
mkdir -p $out/share/controlp5 $out/share/processing
cp -r apps/chess/target/* $out/share
cp -r libs/api/target/* $out/share
cp -r libs/controller/target/* $out/share
cp -r libs/model/target/* $out/share
cp -r libs/view/target/* $out/share
cp -r repository/thm/pis/controlp5/${version}/* $out/share/controlp5
cp -r repository/thm/pis/processing/${version}/* $out/share/processing
classpath="$out/share/${pname}/${pname}-${version}.jar"
classpath="$classpath:$out/share/api/api-${version}.jar"
classpath="$classpath:$out/share/controller/controller-${version}.jar"
classpath="$classpath:$out/share/model/model-${version}.jar"
classpath="$classpath:$out/share/view/view-${version}.jar"
classpath="$classpath:$out/share/controlp5/controlp5-${version}.jar"
classpath="$classpath:$out/share/processing/processing-${version}.jar"
makeWrapper ${jre}/bin/java $out/bin/${pname} \
--add-flags "-cp $classpath chess.Chess"
'';
}