Current section
Files
Jump to
Current section
Files
mix.exs
defmodule NervesToolchainArmv5NervesLinuxMusleabi.MixProject do
use Mix.Project
@app :nerves_toolchain_armv5_nerves_linux_musleabi
@version Path.join(__DIR__, "VERSION")
|> File.read!()
|> String.trim()
@description "Nerves Toolchain - armv5-nerves-linux-musleabi"
@source_url "https://github.com/nerves-project/toolchains"
def project do
[
app: @app,
version: @version,
elixir: "~> 1.13",
description: @description,
package: package(),
source_url: @source_url,
compilers: compilers(Mix.env()),
nerves_package: nerves_package(),
deps: deps(),
docs: docs()
]
end
# Removing Nerves.Toolchain.CTNG had the side effect of introducing a
# circular dependency between Nerves bootstram and compiling the platform.
# Since we no longer support compiling the toolchain via the Nerves tooling,
# use the environment to see whether this is the root project or not.
defp compilers(:prod), do: [:nerves_package | Mix.compilers()]
defp compilers(_), do: Mix.compilers()
def application do
[]
end
def cli do
[preferred_envs: %{docs: :docs, "hex.publish": :docs, "hex.build": :docs}]
end
defp nerves_package do
[
type: :toolchain,
platform: NervesToolchainArmv5NervesLinuxMusleabi,
target_tuple: :armv5_nerves_linux_musleabi,
artifact_sites: [
{:github_releases, "nerves-project/toolchains"}
],
checksum: checksum_files()
]
end
defp deps do
[
{:ex_doc, "~> 0.22", only: :docs, runtime: false},
{:nerves, "~> 1.13", runtime: false}
]
end
defp package do
[
files: package_files(),
licenses: [
"GPL-3.0-or-later",
"GPL-2.0-only",
"MIT",
"LGPL-3.0-or-later",
"Zlib"
],
links: %{
"Github" => "https://github.com/nerves-project/toolchains/tree/main/#{@app}"
}
]
end
defp docs do
[
extras: ["README.md"],
main: "readme"
]
end
defp package_files do
[
"README.md",
"LICENSE",
"lib",
"mix.exs",
"scripts",
"VERSION"
] ++ checksum_files()
end
# These files contribute to the short checksum that gets included in the
# artifact name to reduce mix ups caused by configs changing without
# rebuilding. Include anything that meaningfully contributes to the toolchain.
# Docs and Elixir don't normally contributed to the crosstool-ng builds.
defp checksum_files do
[
"defconfig",
"build.sh",
"patches",
"defaults"
]
end
end