Skip to content

Commit

Permalink
Remove leftover function, correct doc
Browse files Browse the repository at this point in the history
  • Loading branch information
Noarkhh committed Dec 11, 2023
1 parent af6b204 commit d803621
Showing 1 changed file with 1 addition and 31 deletions.
32 changes: 1 addition & 31 deletions lib/bundlex.ex
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ defmodule Bundlex do
* architecture - e.g. `x86_64` or `arm64`
* vendor - e.g. `pc`
* os - operating system, e.g. `linux` or `darwin20.6.0`
* abi (optional) - application binary interface, e.g. `musl` or `gnu`
* abi - application binary interface, e.g. `musl` or `gnu` (nil if unknown / non-existent)
"""
@type target ::
%{architecture: String.t(), vendor: String.t(), os: String.t(), abi: String.t() | nil}
Expand Down Expand Up @@ -58,34 +58,4 @@ defmodule Bundlex do
def build_path(application \\ MixHelper.get_app!(), native, native_interface) do
Bundlex.Toolchain.output_path(application, native, native_interface)
end

@spec default_os_dep_config(os_dep_name :: atom()) :: Bundlex.Project.os_dep()
def default_os_dep_config(os_dep_name) do
precompiled_package_url_prefix =
"https://github.com/membraneframework-precompiled/precompiled_#{os_dep_name}/releases/latest/download/#{os_dep_name}"

precompiled_package_url =
case Bundlex.get_target() do
%{os: "linux", vendor: "alpine"} ->
nil

%{os: "linux"} ->
"#{precompiled_package_url_prefix}_linux.tar.gz"

%{architecture: "x86_64", os: "darwin" <> _rest_of_os_name} ->
"#{precompiled_package_url_prefix}_macos_intel.tar.gz"

%{architecture: "aarch64", os: "darwin" <> _rest_of_os_name} ->
"#{precompiled_package_url_prefix}_macos_arm.tar.gz"

_other ->
nil
end

if precompiled_package_url != nil do
{os_dep_name, [{:precompiled, precompiled_package_url}, :pkg_config]}
else
{os_dep_name, [:pkg_config]}
end
end
end

0 comments on commit d803621

Please sign in to comment.