···307307 shortName = "Flying Circus employees";
308308 };
309309310310+ formatter = {
311311+ members = [
312312+ piegames
313313+ infinisil
314314+ das_j
315315+ tomberek
316316+ _0x4A6F
317317+ # Not in the maintainer list
318318+ # Sereja313
319319+ ];
320320+ scope = "Tentative Nix formatter team to be established in https://github.com/NixOS/rfcs/pull/166";
321321+ shortName = "Nix formatter team";
322322+ };
323323+310324 freedesktop = {
311325 members = [ jtojnar ];
312326 scope = "Maintain Freedesktop.org packages for graphical desktop.";
+10
nixos/doc/manual/release-notes/rl-2405.section.md
···61616262- [TuxClocker](https://github.com/Lurkki14/tuxclocker), a hardware control and monitoring program. Available as [programs.tuxclocker](#opt-programs.tuxclocker.enable).
63636464+- [RustDesk](https://rustdesk.com), a full-featured open source remote control alternative for self-hosting and security with minimal configuration. Alternative to TeamViewer.
6565+6466## Backward Incompatibilities {#sec-release-24.05-incompatibilities}
65676668<!-- To avoid merge conflicts, consider adding your item at an arbitrary place in the list instead. -->
···183185 More information about the configuration syntax change is available in the [upstream repository](https://github.com/prometheus/snmp_exporter/blob/b75fc6b839ee3f3ccbee68bee55f1ae99555084a/auth-split-migration.md).
184186185187- [watchdogd](https://troglobit.com/projects/watchdogd/), a system and process supervisor using watchdog timers. Available as [services.watchdogd](#opt-services.watchdogd.enable).
188188+189189+- The `jdt-language-server` package now uses upstream's provided python wrapper instead of our own custom wrapper. This results in the following breaking and notable changes:
190190+191191+ - The main binary for the package is now named `jdtls` instead of `jdt-language-server`, equivalent to what most editors expect the binary to be named.
192192+193193+ - JVM arguments should now be provided with the `--jvm-arg` flag instead of setting `JAVA_OPTS`.
194194+195195+ - The `-data` path is no longer required to run the package, and will be set to point to a folder in `$TMP` if missing.
186196187197## Other Notable Changes {#sec-release-24.05-notable-changes}
188198
···11+#!/usr/bin/env nix-shell
22+#!nix-shell -i bash -p cabal2nix curl jq
33+#
44+# This script will update the nixfmt-rfc-style derivation to the latest version using
55+# cabal2nix.
66+77+set -eo pipefail
88+99+# This is the directory of this update.sh script.
1010+script_dir="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
1111+1212+derivation_file="${script_dir}/generated-package.nix"
1313+date_file="${script_dir}/date.txt"
1414+1515+# This is the latest version of nixfmt-rfc-style branch on GitHub.
1616+new_version=$(curl --silent https://api.github.com/repos/piegamesde/nixfmt/git/refs/heads/rfc101-style | jq '.object.sha' --raw-output)
1717+new_date=$(curl --silent https://api.github.com/repos/piegamesde/nixfmt/git/commits/"$new_version" | jq '.committer.date' --raw-output)
1818+1919+echo "Updating nixfmt-rfc-style to version $new_date."
2020+echo "Running cabal2nix and outputting to ${derivation_file}..."
2121+2222+cat > "$derivation_file" << EOF
2323+# This file has been autogenerate with cabal2nix.
2424+# Update via ./update.sh
2525+EOF
2626+2727+cabal2nix --jailbreak \
2828+ "https://github.com/piegamesde/nixfmt/archive/${new_version}.tar.gz" \
2929+ >> "$derivation_file"
3030+3131+date --date="$new_date" -I > "$date_file"
3232+3333+echo "Finished."
···256256 sha256 = "sha256-b7u9GiIAd2xpOrM0MfILHNb6Nt7070lNRIadn2l3DfQ=";
257257 })];
258258 }) super.ConfigFile;
259259-259259+}
260260+# super.ghc is required to break infinite recursion as Nix is strict in the attrNames
261261+// lib.optionalAttrs (pkgs.stdenv.hostPlatform.isAarch64 && lib.versionOlder super.ghc.version "9.6.4") {
260262 # The NCG backend for aarch64 generates invalid jumps in some situations,
261263 # the workaround on 9.6 is to revert to the LLVM backend (which is used
262264 # for these sorts of situations even on 9.2 and 9.4).
···11{ lib
22, stdenv
33, fetchurl
44-, makeWrapper
44+, python3
55, jdk
66}:
7788-stdenv.mkDerivation rec {
88+let
99+ timestamp = "202401111522";
1010+in
1111+stdenv.mkDerivation (finalAttrs: {
912 pname = "jdt-language-server";
1010- version = "1.26.0";
1111- timestamp = "202307271613";
1313+ version = "1.31.0";
12141315 src = fetchurl {
1414- url = "https://download.eclipse.org/jdtls/milestones/${version}/jdt-language-server-${version}-${timestamp}.tar.gz";
1515- sha256 = "sha256-ul/l7jsqg5UofiSu8gzm4Xg0z46HcRfmyqysamiKbFM=";
1616+ url = "https://download.eclipse.org/jdtls/milestones/${finalAttrs.version}/jdt-language-server-${finalAttrs.version}-${timestamp}.tar.gz";
1717+ hash = "sha256-bCX2LQt00d2SqxmvuvvlBB6wbCuFPqtX9/Qv5v6wH3w=";
1618 };
17191820 sourceRoot = ".";
19212022 buildInputs = [
2121- jdk
2323+ # Used for the included wrapper
2424+ python3
2225 ];
23262424- nativeBuildInputs = [
2525- makeWrapper
2626- ];
2727+ postPatch = ''
2828+ # We store the plugins, config, and features folder in different locations
2929+ # than in the original package. In addition, hard-code the path to the jdk
3030+ # in the wrapper, instead of searching for it in PATH at runtime.
3131+ substituteInPlace bin/jdtls.py \
3232+ --replace "jdtls_base_path = Path(__file__).parent.parent" "jdtls_base_path = Path(\"$out/share/java/jdtls/\")" \
3333+ --replace "java_executable = get_java_executable(known_args.validate_java_version)" "java_executable = '${lib.getExe jdk}'"
3434+ '';
27352836 installPhase =
2937 let
3030- # The application ships with config directories for linux and mac
3838+ # The application ships with different config directories for each platform.
3939+ # Note the application come with ARM variants as well, although the
4040+ # current included wrapper doesn't use them.
3141 configDir = if stdenv.isDarwin then "config_mac" else "config_linux";
3242 in
3333- ''
3434- # Copy jars
3535- install -D -t $out/share/java/plugins/ plugins/*.jar
3636-3737- # Copy config directories for linux and mac
3838- install -Dm 444 -t $out/share/config ${configDir}/*
3939-4040- # Get latest version of launcher jar
4141- # e.g. org.eclipse.equinox.launcher_1.5.800.v20200727-1323.jar
4242- launcher="$(ls $out/share/java/plugins/org.eclipse.equinox.launcher_* | sort -V | tail -n1)"
4343-4444- # The wrapper script will create a directory in the user's cache, copy in the config
4545- # files since this dir can't be read-only, and by default use this as the runtime dir.
4646- #
4747- # The following options are required as per the upstream documentation:
4848- #
4949- # -Declipse.application=org.eclipse.jdt.ls.core.id1
5050- # -Dosgi.bundles.defaultStartLevel=4
5151- # -Declipse.product=org.eclipse.jdt.ls.core.product
5252- # --add-modules=ALL-SYSTEM
5353- # --add-opens java.base/java.util=ALL-UNNAMED
5454- # --add-opens java.base/java.lang=ALL-UNNAMED
5555- #
5656- # The following options configure the server to run without writing logs to the nix store:
5757- #
5858- # -Dosgi.sharedConfiguration.area.readOnly=true
5959- # -Dosgi.checkConfiguration=true
6060- # -Dosgi.configuration.cascaded=true
6161- # -Dosgi.sharedConfiguration.area=$out/share/config
6262- #
6363- # Other options which the caller may change:
6464- #
6565- # -Dlog.level:
6666- # Log level.
6767- # This can be overidden by setting JAVA_OPTS.
6868- #
6969- # The caller must specify the following:
7070- #
7171- # -data:
7272- # The application stores runtime data here. We set this to <cache-dir>/$PWD
7373- # so that projects don't collide with each other.
7474- # This can be overidden by specifying -configuration to the wrapper.
7575- #
7676- # Java options, such as -Xms and Xmx can be specified by setting JAVA_OPTS.
7777- #
7878- makeWrapper ${jdk}/bin/java $out/bin/jdt-language-server \
7979- --add-flags "-Declipse.application=org.eclipse.jdt.ls.core.id1" \
8080- --add-flags "-Dosgi.bundles.defaultStartLevel=4" \
8181- --add-flags "-Declipse.product=org.eclipse.jdt.ls.core.product" \
8282- --add-flags "-Dosgi.sharedConfiguration.area=$out/share/config" \
8383- --add-flags "-Dosgi.sharedConfiguration.area.readOnly=true" \
8484- --add-flags "-Dosgi.checkConfiguration=true" \
8585- --add-flags "-Dosgi.configuration.cascaded=true" \
8686- --add-flags "-Dlog.level=ALL" \
8787- --add-flags "\$JAVA_OPTS" \
8888- --add-flags "-jar $launcher" \
8989- --add-flags "--add-modules=ALL-SYSTEM" \
9090- --add-flags "--add-opens java.base/java.util=ALL-UNNAMED" \
9191- --add-flags "--add-opens java.base/java.lang=ALL-UNNAMED"
4343+ ''
4444+ install -Dm444 -t $out/share/java/jdtls/plugins/ plugins/*
4545+ install -Dm444 -t $out/share/java/jdtls/features/ features/*
4646+ install -Dm444 -t $out/share/java/jdtls/${configDir} ${configDir}/*
4747+ install -Dm555 -t $out/bin bin/jdtls
4848+ install -Dm444 -t $out/bin bin/jdtls.py
9249 '';
93509494- meta = with lib; {
5151+ meta = {
9552 homepage = "https://github.com/eclipse/eclipse.jdt.ls";
9653 description = "Java language server";
9797- sourceProvenance = with sourceTypes; [ binaryBytecode ];
9898- license = licenses.epl20;
9999- maintainers = with maintainers; [ matt-snider ];
100100- platforms = platforms.all;
5454+ sourceProvenance = with lib.sourceTypes; [ binaryBytecode ];
5555+ license = lib.licenses.epl20;
5656+ maintainers = with lib.maintainers; [ matt-snider ];
5757+ platforms = lib.platforms.all;
5858+ mainProgram = "jdtls";
10159 };
102102-}
6060+})