Packages
nerves_system_x86_64
1.13.2
1.34.0
1.33.5
1.33.4
1.33.3
1.33.2
1.33.1
1.33.0
1.32.0
1.31.3
1.31.2
1.31.1
1.31.0
1.30.1
1.30.0
1.29.1
1.29.0
1.28.1
1.28.0
1.27.1
1.27.0
1.26.0
1.25.1
1.25.0
1.24.1
1.24.0
1.23.2
1.23.1
1.23.0
1.22.2
1.22.1
1.22.0
1.21.2
1.21.1
1.21.0
1.20.3
1.20.2
1.20.1
1.20.0
retired
1.19.0
1.18.4
1.18.3
1.18.2
1.18.1
1.18.0
1.17.3
1.17.2
1.17.1
1.17.0
1.16.2
1.16.1
1.16.0
1.15.1
1.15.0
1.14.0
1.13.4
1.13.3
1.13.2
1.13.1
1.13.0
1.12.2
1.12.1
1.12.0
1.11.2
1.11.1
1.11.0
1.10.2
1.10.1
1.10.0
1.9.2
1.9.1
1.9.0
1.8.2
1.8.1
1.8.0
1.7.2
1.7.1
1.7.0
1.6.3
1.6.2
1.6.1
1.6.0
1.5.1
1.5.0
1.4.0
1.3.0
1.2.1
1.2.0
1.1.1
1.0.0
1.0.0-rc.1
1.0.0-rc.0
0.5.0
0.4.1
0.3.2
0.3.1
0.3.0
0.2.1
0.2.0
Nerves System - x86_64
Current section
Files
Jump to
Current section
Files
nerves_system_x86_64
mix.exs
mix.exs
defmodule NervesSystemX8664.MixProject do
use Mix.Project
@github_organization "nerves-project"
@app :nerves_system_x86_64
@version Path.join(__DIR__, "VERSION")
|> File.read!()
|> String.trim()
def project do
[
app: @app,
version: @version,
elixir: "~> 1.6",
compilers: Mix.compilers() ++ [:nerves_package],
nerves_package: nerves_package(),
description: description(),
package: package(),
deps: deps(),
aliases: [loadconfig: [&bootstrap/1]],
docs: [extras: ["README.md"], main: "readme"]
]
end
def application do
[extra_applications: [:eex]]
end
defp bootstrap(args) do
set_target()
Application.start(:nerves_bootstrap)
Mix.Task.run("loadconfig", args)
end
defp nerves_package do
[
type: :system,
artifact_sites: [
{:github_releases, "#{@github_organization}/#{@app}"}
],
build_runner_opts: build_runner_opts(),
platform: Nerves.System.BR,
platform_config: [
defconfig: "nerves_defconfig"
],
checksum: package_files()
]
end
defp deps do
[
{:nerves, "~> 1.5.4 or ~> 1.6.0 or ~> 1.7.0", runtime: false},
{:nerves_system_br, "1.13.4", runtime: false},
{:nerves_toolchain_x86_64_unknown_linux_musl, "~> 1.3.0", runtime: false},
{:nerves_system_linter, "~> 0.4", only: [:dev, :test], runtime: false},
{:ex_doc, "~> 0.18", only: [:dev, :test], runtime: false}
]
end
defp description do
"""
Nerves System - x86_64
"""
end
defp package do
[
files: package_files(),
licenses: ["Apache 2.0"],
links: %{"GitHub" => "https://github.com/#{@github_organization}/#{@app}"}
]
end
defp package_files do
[
"fwup_include",
"lib",
"priv",
"rootfs_overlay",
"CHANGELOG.md",
"fwup-revert.conf",
"fwup.conf",
"grub.cfg",
"LICENSE",
"linux-5.4.defconfig",
"mix.exs",
"nerves_defconfig",
"post-build.sh",
"post-createfs.sh",
"README.md",
"VERSION"
]
end
defp build_runner_opts() do
if primary_site = System.get_env("BR2_PRIMARY_SITE") do
[make_args: ["BR2_PRIMARY_SITE=#{primary_site}"]]
else
[]
end
end
defp set_target() do
if function_exported?(Mix, :target, 1) do
apply(Mix, :target, [:target])
else
System.put_env("MIX_TARGET", "target")
end
end
end