|
| 1 | +class PixiPack < Formula |
| 2 | + desc "Pack and unpack conda environments created with pixi" |
| 3 | + homepage "https://github.com/quantco/pixi-pack" |
| 4 | + url "https://github.com/quantco/pixi-pack/archive/refs/tags/v0.3.1.tar.gz" |
| 5 | + sha256 "d0c6eb4d20747a5ea47093dc06e80e15a46ec3fd9c3c1e93ee035480e3b0a75a" |
| 6 | + license "BSD-3-Clause" |
| 7 | + head "https://github.com/quantco/pixi-pack.git", branch: "main" |
| 8 | + |
| 9 | + bottle do |
| 10 | + sha256 cellar: :any_skip_relocation, arm64_sequoia: "c92b366fcc6817e56e3e59ef867cd001aef2d2778399a8ed8fe1b92b3d75c26a" |
| 11 | + sha256 cellar: :any_skip_relocation, arm64_sonoma: "3aac9b6f567d34050e684c236dfffb8e9b073c7bfa764d6ba603997f6cb11d73" |
| 12 | + sha256 cellar: :any_skip_relocation, arm64_ventura: "2243e0179886c73fa74939ee0a16982d6595806dfd3a0208696a04a8c871b305" |
| 13 | + sha256 cellar: :any_skip_relocation, sonoma: "ea582b6d7cd63c5ae192b6e969858d122fb2d534be58ebe53f7d78ac65396b1e" |
| 14 | + sha256 cellar: :any_skip_relocation, ventura: "4581a3e8a26d8230ff5ae74889d3579df25f5591785dd5a54cef11113e747947" |
| 15 | + sha256 cellar: :any_skip_relocation, x86_64_linux: "8a73baa4e8a18e3d24c190fe3462a3eee06970ec109b1d1cca1931a381e067b1" |
| 16 | + end |
| 17 | + |
| 18 | + depends_on "cmake" => :build |
| 19 | + depends_on "pkgconf" => :build |
| 20 | + depends_on "rust" => :build |
| 21 | + |
| 22 | + uses_from_macos "bzip2" |
| 23 | + |
| 24 | + on_linux do |
| 25 | + depends_on "openssl@3" |
| 26 | + end |
| 27 | + |
| 28 | + def install |
| 29 | + system "cargo", "install", *std_cargo_args |
| 30 | + end |
| 31 | + |
| 32 | + test do |
| 33 | + assert_equal "pixi-pack #{version}", shell_output("#{bin}/pixi-pack --version").strip |
| 34 | + |
| 35 | + (testpath/"pixi.lock").write <<~YAML |
| 36 | + version: 6 |
| 37 | + environments: |
| 38 | + default: |
| 39 | + channels: |
| 40 | + - url: https://conda.anaconda.org/conda-forge/ |
| 41 | + packages: |
| 42 | + linux-64: |
| 43 | + - conda: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda |
| 44 | + packages: |
| 45 | + - conda: https://conda.anaconda.org/conda-forge/linux-64/ca-certificates-2024.8.30-hbcca054_0.conda |
| 46 | + sha256: afee721baa6d988e27fef1832f68d6f32ac8cc99cdf6015732224c2841a09cea |
| 47 | + md5: c27d1c142233b5bc9ca570c6e2e0c244 |
| 48 | + arch: x86_64 |
| 49 | + platform: linux |
| 50 | + license: ISC |
| 51 | + size: 159003 |
| 52 | + timestamp: 1725018903918 |
| 53 | + YAML |
| 54 | + system bin/"pixi-pack", "pack", "--platform", "linux-64" |
| 55 | + assert_path_exists testpath/"environment.tar" |
| 56 | + end |
| 57 | +end |
0 commit comments