Homebrew your Scala Native config! An sbt plugin that configures compileOptions
, linkingOptions
, and LD_LIBRARY_PATH
to point to brew-installed libraries.
addSbtPlugin("com.armanbilge" % "sbt-scala-native-config-brew" % "0.3.0")
enablePlugins(ScalaNativeBrewedConfigPlugin)
nativeBrewFormulas += "curl"
The plugin has two additional requirements:
- brew is already installed in your system. Use the
nativeBrew
setting to point it at a non-default location. - The desired formulae have already been installed. The plugin will not install them for you; it only configures Scala Native to use an existing installation.
However, these are only soft requirements: if brew or the requested formulae are not installed, the plugin will log a warning and not update any configuration. So it will not interfere with a user who does not have or want brew.
Future releases may introduce capabilities to automatically install formulae and self-bootstrap without an existing brew installation. Please open an issue if these features are important to you.
An additional plugin integrates with sbt-typelevel-github-actions.
addSbtPlugin("com.armanbilge" % "sbt-scala-native-config-brew-github-actions" % "0.3.0")
ThisBuild / githubWorkflowBuildPreamble ++= nativeBrewInstallWorkflowSteps.value
The core logic is published for Scala 2.12, 2.13, and 3, independently of sbt. This should facilitate the development of a Mill plugin.
com.armanbilge::scala-native-config-brew:0.3.0
The much more ambitious sn-vcpkg project.