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".
This commit is contained in:
Jean-Marie Gaillourdet
2026-02-08 09:37:45 +01:00
parent 193aaac71c
commit 2b15fac9ff
@@ -63,5 +63,6 @@ stdenv.mkDerivation (finalAttrs: {
kashw2
];
platforms = lib.platforms.unix;
mainProgram = "sbt";
};
})