gradle deps via nix

This commit is contained in:
Gregor Lohaus
2026-05-27 16:02:17 +02:00
parent 791cb5a569
commit 2dbd3a8759
2 changed files with 47 additions and 4 deletions

39
flake.lock generated
View File

@@ -64,6 +64,42 @@
"type": "github" "type": "github"
} }
}, },
"javafx-base": {
"flake": false,
"locked": {
"narHash": "sha256-96fttJUts/rFwKB7u5G8NWkK2NjJ3a6eIKbe1RTWkmM=",
"type": "file",
"url": "https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/25/javafx-base-25-linux.jar"
},
"original": {
"type": "file",
"url": "https://repo.maven.apache.org/maven2/org/openjfx/javafx-base/25/javafx-base-25-linux.jar"
}
},
"javafx-controls": {
"flake": false,
"locked": {
"narHash": "sha256-2Cdc2/hPOjJmQidDjXu9vnlwAuawLn0cg/tLhzFfkUs=",
"type": "file",
"url": "https://repo.maven.apache.org/maven2/org/openjfx/javafx-controls/25/javafx-controls-25-linux.jar"
},
"original": {
"type": "file",
"url": "https://repo.maven.apache.org/maven2/org/openjfx/javafx-controls/25/javafx-controls-25-linux.jar"
}
},
"javafx-graphics": {
"flake": false,
"locked": {
"narHash": "sha256-w01IhRAQzcfTvwkqIQkjrI8ZPXT0VTEeijfzbqp3G0k=",
"type": "file",
"url": "https://repo.maven.apache.org/maven2/org/openjfx/javafx-graphics/25/javafx-graphics-25-linux.jar"
},
"original": {
"type": "file",
"url": "https://repo.maven.apache.org/maven2/org/openjfx/javafx-graphics/25/javafx-graphics-25-linux.jar"
}
},
"jlibghostty": { "jlibghostty": {
"inputs": { "inputs": {
"ghostty": "ghostty", "ghostty": "ghostty",
@@ -129,6 +165,9 @@
}, },
"root": { "root": {
"inputs": { "inputs": {
"javafx-base": "javafx-base",
"javafx-controls": "javafx-controls",
"javafx-graphics": "javafx-graphics",
"jlibghostty": "jlibghostty", "jlibghostty": "jlibghostty",
"jtoml-all": "jtoml-all", "jtoml-all": "jtoml-all",
"nixpkgs": "nixpkgs_2" "nixpkgs": "nixpkgs_2"

View File

@@ -57,10 +57,14 @@
buildPhase = '' buildPhase = ''
runHook preBuild runHook preBuild
mkdir -p build/classes build/native-image mkdir -p build/classes build/native-image build/lib build/javafx-modules
find src/main/java -name '*.java' | sort > build/sources.txt find src/main/java -name '*.java' | sort > build/sources.txt
javafx_module_path="${javafx-base}:${javafx-controls}:${javafx-graphics}" ln -s ${jtoml-all} build/lib/jtoml-all.jar
ln -s ${javafx-base} build/javafx-modules/javafx-base.jar
ln -s ${javafx-controls} build/javafx-modules/javafx-controls.jar
ln -s ${javafx-graphics} build/javafx-modules/javafx-graphics.jar
javafx_module_path="build/javafx-modules"
jlib_classpath="$( jlib_classpath="$(
find ${jlib}/maven -type f -name '*.jar' \ find ${jlib}/maven -type f -name '*.jar' \
@@ -69,13 +73,13 @@
| sort \ | sort \
| paste -sd: - | paste -sd: -
)" )"
app_classpath="build/classes:${jtoml-all}:$jlib_classpath:${javafx-base}:${javafx-controls}:${javafx-graphics}" app_classpath="build/classes:build/lib/jtoml-all.jar:$jlib_classpath:build/javafx-modules/javafx-base.jar:build/javafx-modules/javafx-controls.jar:build/javafx-modules/javafx-graphics.jar"
javac \ javac \
--release 25 \ --release 25 \
--module-path "$javafx_module_path" \ --module-path "$javafx_module_path" \
--add-modules javafx.controls,javafx.graphics \ --add-modules javafx.controls,javafx.graphics \
-cp "${jtoml-all}:$jlib_classpath" \ -cp "build/lib/jtoml-all.jar:$jlib_classpath" \
-d build/classes \ -d build/classes \
@build/sources.txt @build/sources.txt