-
-
Notifications
You must be signed in to change notification settings - Fork 13.8k
Expand file tree
/
Copy pathmicromamba.rb
More file actions
99 lines (85 loc) 路 3.33 KB
/
Copy pathmicromamba.rb
File metadata and controls
99 lines (85 loc) 路 3.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
class Micromamba < Formula
desc "Fast Cross-Platform Package Manager"
homepage "https://github.com/mamba-org/mamba"
url "https://github.com/mamba-org/mamba/archive/refs/tags/2.6.0.tar.gz"
sha256 "d3a9eeb7e84c6c107ad40f1e665e38c5af97dac822bd766109988ffbedbcc4a3"
license "BSD-3-Clause"
head "https://github.com/mamba-org/mamba.git", branch: "main"
livecheck do
url :stable
strategy :github_latest do |json, regex|
json["name"]&.scan(regex)&.map { |match| match[0] }
end
end
bottle do
sha256 cellar: :any, arm64_tahoe: "aed2f01cea5b8bd8aaaaee509819af323f521adcbf8341b3421fd29b42006a9d"
sha256 cellar: :any, arm64_sequoia: "a4800a5bcaffc226807a3c2aea0eef308a587dbfca717fd50fd90ed4265d98bd"
sha256 cellar: :any, arm64_sonoma: "3f95014e5c0b4c45f30e81fcc86b172031bffcd12f18ac2c56f27202d50a0d0a"
sha256 cellar: :any, sonoma: "4a6100fde7e1c21030e914bea61297f6301ea4c8f1412954c6c2de68b3e69fd2"
sha256 cellar: :any_skip_relocation, arm64_linux: "7a10cf712d4d919ed494bb04bb43179b226c6099866824acab716228b0a3ce85"
sha256 cellar: :any_skip_relocation, x86_64_linux: "5b5e5544fbf781b325bad0342f55df80d38348f6f1c3b5a32274d282e21c9676"
end
depends_on "cli11" => :build
depends_on "cmake" => :build
depends_on "nlohmann-json" => :build
depends_on "pkgconf" => :build
depends_on "spdlog" => :build
depends_on "tl-expected" => :build
depends_on "fmt"
depends_on "libarchive"
depends_on "libsolv"
depends_on "lz4"
depends_on "msgpack"
depends_on "openssl@3"
depends_on "reproc"
depends_on "simdjson"
depends_on "xz"
depends_on "yaml-cpp"
depends_on "zstd"
uses_from_macos "python" => :build
uses_from_macos "bzip2"
uses_from_macos "curl", since: :ventura # uses curl_url_strerror, available since curl 7.80.0
uses_from_macos "krb5"
on_macos do
depends_on "llvm" => :build if DevelopmentTools.clang_build_version <= 1600
end
on_linux do
depends_on "zlib-ng-compat"
end
fails_with :clang do
build 1600
cause "Requires C++23 support for `std::ranges::views::join`"
end
def install
args = %W[
-DBUILD_LIBMAMBA=ON
-DBUILD_LIBMAMBA_SPDLOG=ON
-DBUILD_SHARED=ON
-DBUILD_STATIC=OFF
-DBUILD_MAMBA=ON
-DCMAKE_INSTALL_RPATH=#{rpath}
]
system "cmake", "-S", ".", "-B", "build", *args, *std_cmake_args
system "cmake", "--build", "build"
system "cmake", "--install", "build"
# Upstream chooses names based on static or dynamic linking,
# but as of 2.0 they provide identical interfaces.
bin.install_symlink "mamba" => "micromamba"
end
def caveats
<<~EOS
Please run the following to setup your shell:
#{opt_bin}/mamba shell init --shell <your-shell> --root-prefix ~/mamba
and restart your terminal.
EOS
end
test do
ENV["MAMBA_ROOT_PREFIX"] = testpath.to_s
assert_match version.to_s, shell_output("#{bin}/mamba --version").strip
assert_match version.to_s, shell_output("#{bin}/micromamba --version").strip
# Using 'xtensor' (header-only package) to avoid "broken pipe" codesigning issue
# encountered on macOS 13-arm and 14-arm during CI.
system bin/"mamba", "create", "-n", "test", "xtensor", "-y", "-c", "conda-forge"
assert_path_exists testpath/"envs/test/include/xtensor.hpp"
end
end