   import Mix.Nerves.Utils
 
   @doc """
-  Builds an artifact locally.
+  Builds an artifact locally.
   """
   @spec artifact(Nerves.Package.t, Nerves.Package.t, term) :: :ok
   def artifact(pkg, toolchain, opts) do

defmodule Nerves.Package.Providers.Local do
  @moduledoc """
  Builds an artifact locally.

  This provider will only function on certain Linux host configurations
  """

    build(type, pkg, toolchain, opts)
  end

  def clean(pkg) do
    dest = Artifact.dir(pkg, Nerves.Env.toolchain)
    File.rm_rf(dest)
    File.mkdir_p!(dest)
  end

  defp build(:linux, pkg, toolchain, _opts) do
    System.delete_env("BINDIR")
    dest = Artifact.dir(pkg, toolchain)

    script = Path.join(Nerves.Env.package(:nerves_system_br).path, "create-build.sh")
    platform_config = pkg.config[:platform_config][:defconfig]
