Merge pull request #238934 from raboof/codeql-fix-java-path

codeql: fix passing in nix JDK
This commit is contained in:
Arnout Engelen 2023-06-29 12:32:41 +02:00 committed by GitHub
commit d02209e8cf
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -34,8 +34,13 @@ stdenv.mkDerivation rec {
ln -sf $out/codeql/tools/linux64/lib64trace.so $out/codeql/tools/linux64/libtrace.so
sed -i 's%\$CODEQL_DIST/tools/\$CODEQL_PLATFORM/java-aarch64%\${jdk17}%g' $out/codeql/codeql
sed -i 's%\$CODEQL_DIST/tools/\$CODEQL_PLATFORM/java%\${jdk17}%g' $out/codeql/codeql
# many of the codeql extractors use CODEQL_DIST + CODEQL_PLATFORM to
# resolve java home, so to be able to create databases, we want to make
# sure that they point somewhere sane/usable since we can not autopatch
# the codeql packaged java dist, but we DO want to patch the extractors
# as well as the builders which are ELF binaries for the most part
rm -rf $out/codeql/tools/linux64/java
ln -s ${jdk17} $out/codeql/tools/linux64/java
ln -s $out/codeql/codeql $out/bin/
'';