From 2b15fac9ffef56c2628fb78f53d9ad07a432e7fa Mon Sep 17 00:00:00 2001 From: Jean-Marie Gaillourdet Date: Sun, 8 Feb 2026 09:37:45 +0100 Subject: [PATCH] sbt: meta.mainProgram attribute set to 'sbt' E.g. when applying bubblewrap jails with jail.nix to sbt, to reduce the blast radius of software delivery chain attacks, a warning is emitted by the lib.meta.getExe function. But this does not depend on the external jails.nix project, at all. This happens with every caller of the getExe function on sbt inside nixpkgs as well. evaluation warning: getExe: Package "sbt-1.11.7" does not have the meta.mainProgram attribute. We'll assume that the main program has the same name for now, but this behavior is deprecated, because it leads to surprising errors when the assumption does not hold. If the package has a main program, please set `meta.mainProgram` in its definition to make this warning go away. Otherwise, if the package does not have a main program, or if you don't control its definition, use getExe' to specify the name to the program, such as lib.getExe' foo "bar". --- pkgs/development/tools/build-managers/sbt/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/pkgs/development/tools/build-managers/sbt/default.nix b/pkgs/development/tools/build-managers/sbt/default.nix index 8fa5fbc30eeb..1df2ea37c8a3 100644 --- a/pkgs/development/tools/build-managers/sbt/default.nix +++ b/pkgs/development/tools/build-managers/sbt/default.nix @@ -63,5 +63,6 @@ stdenv.mkDerivation (finalAttrs: { kashw2 ]; platforms = lib.platforms.unix; + mainProgram = "sbt"; }; })