forked from sweat-tek/JHotDraw
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathshell.nix
More file actions
46 lines (38 loc) · 1.19 KB
/
shell.nix
File metadata and controls
46 lines (38 loc) · 1.19 KB
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
{ pkgs ? import <nixpkgs> {} }:
pkgs.mkShell {
name = "jhotdraw-dev";
buildInputs = with pkgs; [
# Java Development Kit (JDK 21 with full GUI support)
jdk21
# Build tool
maven
# GUI/X11 dependencies for Swing applications
xorg.libX11
xorg.libXext
xorg.libXrender
xorg.libXtst
xorg.libXi
fontconfig
freetype
# Optional: useful dev tools
git
];
# Set JAVA_HOME
JAVA_HOME = "${pkgs.jdk21}";
# Ensure AWT/Swing can find the display
shellHook = ''
export _JAVA_AWT_WM_NONREPARENTING=1
echo "=========================================="
echo "JHotDraw Development Environment"
echo "=========================================="
echo "Java: $(java -version 2>&1 | head -1)"
echo "Maven: $(mvn -version 2>&1 | head -1)"
echo ""
echo "Commands:"
echo " mvn clean compile - Build the project"
echo " mvn test - Run tests"
echo " mvn exec:java -Dexec.mainClass=org.jhotdraw.samples.svg.Main -pl jhotdraw-samples/jhotdraw-samples-misc -q"
echo " - Run SVG sample app"
echo "=========================================="
'';
}