gradle deps via nix

This commit is contained in:
Gregor Lohaus
2026-05-27 15:59:10 +02:00
parent ea13af63a6
commit 5552974e99
2 changed files with 22 additions and 2 deletions

13
flake.lock generated
View File

@@ -83,6 +83,18 @@
"url": "https://gitea.gregorlohaus.com/gregor/jlibghostty.git" "url": "https://gitea.gregorlohaus.com/gregor/jlibghostty.git"
} }
}, },
"jtoml-all": {
"flake": false,
"locked": {
"narHash": "sha256-KWrUaDVmnWzdkQxjgPFFNl8DOEvkCqWW3OmXU2sZHKw=",
"type": "file",
"url": "https://repo.maven.apache.org/maven2/io/github/wasabithumb/jtoml-all/1.5.2/jtoml-all-1.5.2.jar"
},
"original": {
"type": "file",
"url": "https://repo.maven.apache.org/maven2/io/github/wasabithumb/jtoml-all/1.5.2/jtoml-all-1.5.2.jar"
}
},
"nixpkgs": { "nixpkgs": {
"locked": { "locked": {
"lastModified": 1779560665, "lastModified": 1779560665,
@@ -118,6 +130,7 @@
"root": { "root": {
"inputs": { "inputs": {
"jlibghostty": "jlibghostty", "jlibghostty": "jlibghostty",
"jtoml-all": "jtoml-all",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"
} }
}, },

View File

@@ -37,6 +37,13 @@
mkdir -p build/classes build/native-image mkdir -p build/classes build/native-image
find src/main/java -name '*.java' | sort > build/sources.txt find src/main/java -name '*.java' | sort > build/sources.txt
javafx_lib="$(find ${openjfx} -type f -name 'javafx.graphics.jar' -printf '%h\n' | head -n1)"
if [ -z "$javafx_lib" ]; then
echo "Could not find javafx.graphics.jar under ${openjfx}" >&2
find ${openjfx} -maxdepth 4 -type f | sort >&2
exit 1
fi
jlib_classpath="$( jlib_classpath="$(
find ${jlib}/maven -type f -name '*.jar' \ find ${jlib}/maven -type f -name '*.jar' \
! -name '*-sources.jar' \ ! -name '*-sources.jar' \
@@ -48,7 +55,7 @@
javac \ javac \
--release 25 \ --release 25 \
--module-path ${openjfx}/lib \ --module-path "$javafx_lib" \
--add-modules javafx.controls,javafx.graphics \ --add-modules javafx.controls,javafx.graphics \
-cp "${jtoml-all}:$jlib_classpath" \ -cp "${jtoml-all}:$jlib_classpath" \
-d build/classes \ -d build/classes \
@@ -61,7 +68,7 @@
native-image \ native-image \
--no-fallback \ --no-fallback \
--enable-url-protocols=file \ --enable-url-protocols=file \
--module-path ${openjfx}/lib \ --module-path "$javafx_lib" \
--add-modules javafx.controls,javafx.graphics \ --add-modules javafx.controls,javafx.graphics \
-cp "$app_classpath" \ -cp "$app_classpath" \
-H:Name=jprototerm \ -H:Name=jprototerm \