Skip to content

Commit

Permalink
rattler-build 0.4.0 (new formula) (#125)
Browse files Browse the repository at this point in the history
  • Loading branch information
pavelzw authored Oct 28, 2023
1 parent ad030b9 commit fe4caee
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Formula/rattler-build.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
class RattlerBuild < Formula
desc "Universal conda package builder for Windows, macOS and Linux"
homepage "https://github.com/prefix-dev/rattler-build"
url "https://github.com/prefix-dev/rattler-build/archive/refs/tags/v0.4.0.tar.gz"
sha256 "833768fb3fb9049b9b9f945be19ea623e9af4f86e608b25e9aff2e2dc543cbb9"
license "BSD-3-Clause"
head "https://github.com/prefix-dev/rattler-build.git", branch: "main"

depends_on "pkg-config" => :build
depends_on "rust" => :build
depends_on "openssl@3"

uses_from_macos "bzip2"
uses_from_macos "zlib"

def install
system "cargo", "install", *std_cargo_args
end

test do
assert_equal "rattler-build #{version}", shell_output("#{bin}/rattler-build --version").strip
(testpath/"recipe.yaml").write <<~EOS
package:
name: test-package
version: '0.1.0'
build:
noarch: generic
string: buildstring
script:
- mkdir -p $PREFIX/bin
- echo "echo Hello World!" >> $PREFIX/bin/hello
- chmod +x $PREFIX/bin/hello
test:
commands:
- test -d ${PREFIX}/bin/hello
- hello | grep "Hello World!"
EOS
system "#{bin}/rattler-build", "build"
assert_path_exists testpath/"output"/"noarch"/"test-package-0.1.0-buildstring.tar.bz2"
end
end
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ This is a collection of formulae/casks for [Homebrew](https://brew.sh/) that I u
- [Upscayl](https://github.com/upscayl/upscayl): `brew install --no-quarantine pavelzw/pavelzw/upscayl`
- [cythonbuilder](https://github.com/mike-huls/cythonbuilder/): `brew install pavelzw/pavelzw/cythonbuilder`
- [pixi](https://github.com/prefix-dev/pixi): ~`brew install pavelzw/pavelzw/pixi`~ migrated to [homebrew-core](https://formulae.brew.sh/formula/pixi) (https://github.com/Homebrew/homebrew-core/pull/136437) `brew install pixi`
- [rattler-build](https://github.com/prefix-dev/rattler-build): `brew install pavelzw/pavelzw/rattler-build`

0 comments on commit fe4caee

Please sign in to comment.