-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Rui Chen <[email protected]>
- Loading branch information
1 parent
a88aa84
commit 1dde1b4
Showing
1 changed file
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
class PixiPack < Formula | ||
desc "Pack and unpack conda environments created with pixi" | ||
homepage "https://github.com/quantco/pixi-pack" | ||
url "https://github.com/quantco/pixi-pack/archive/refs/tags/v0.3.1.tar.gz" | ||
sha256 "d0c6eb4d20747a5ea47093dc06e80e15a46ec3fd9c3c1e93ee035480e3b0a75a" | ||
license "BSD-3-Clause" | ||
head "https://github.com/quantco/pixi-pack.git", branch: "main" | ||
|
||
depends_on "cmake" => :build | ||
depends_on "pkgconf" => :build | ||
depends_on "rust" => :build | ||
|
||
uses_from_macos "bzip2" | ||
|
||
on_linux do | ||
depends_on "openssl@3" | ||
end | ||
|
||
def install | ||
system "cargo", "install", *std_cargo_args | ||
end | ||
|
||
test do | ||
assert_equal "pixi-pack #{version}", shell_output("#{bin}/pixi-pack --version").strip | ||
|
||
(testpath/"pixi.lock").write <<~YAML | ||
version: 6 | ||
environments: | ||
default: | ||
channels: | ||
- url: https://conda.anaconda.org/conda-forge/ | ||
packages: | ||
linux-64: | ||
- conda: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda | ||
packages: | ||
- conda: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda | ||
sha256: afee721baa6d988e27fef1832f68d6f32ac8cc99cdf6015732224c2841a09cea | ||
md5: c27d1c142233b5bc9ca570c6e2e0c244 | ||
arch: x86_64 | ||
platform: linux | ||
license: ISC | ||
size: 159003 | ||
timestamp: 1725018903918 | ||
YAML | ||
system bin/"pixi-pack", "pack", "--platform", "linux-64" | ||
assert_path_exists testpath/"environment.tar" | ||
end | ||
end |