Skip to content

Commit

Permalink
pixi-pack 0.3.1 (new formula)
Browse files Browse the repository at this point in the history
Signed-off-by: Rui Chen <[email protected]>
  • Loading branch information
pavelzw authored and chenrui333 committed Dec 13, 2024
1 parent a88aa84 commit 1dde1b4
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions Formula/p/pixi-pack.rb
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

0 comments on commit 1dde1b4

Please sign in to comment.