Switch branches/tags
Nothing to show
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
95 lines (83 sloc) 3.54 KB
require "language/haskell"
class GitAnnex < Formula
include Language::Haskell::Cabal
desc "Manage files with git without checking in file contents"
homepage ""
url ""
sha256 "ad9c32dc2d01bc0b521936156f8ab8247ce8c131f083899d06c30f0391cca188"
head "git://"
bottle do
sha256 "bf4d1c2787b44a8724ae1c5a402b1bab043399cb78c7bc1256a0c5ea5befb180" => :mojave
sha256 "3bb20d613b13cec529f74769de9214d8e9556266be272a0a51f316430c21458c" => :high_sierra
sha256 "3c51fa068af0798623d4e23ee763fe0503d4b880c4822c053b4a7381dec0ac3b" => :sierra
option "with-git-union-merge", "Build the git-union-merge tool"
depends_on "cabal-install" => :build
depends_on "ghc@8.2" => :build
depends_on "pkg-config" => :build
depends_on "gsasl"
depends_on "libmagic"
depends_on "quvi"
depends_on "xdot" => :recommended
def install
# Reported 28 Feb 2018 to aws upstream
# This is already resolved in aws 0.20 but we can't move to 0.20 until
# esqueleto 2.6.0 ships. See
# The network issue has been fixed upstream but needs a new release.
install_cabal_package "--constraint", "http-conduit<2.3",
"--constraint", "network<",
:using => ["alex", "happy", "c2hs"],
:flags => ["s3", "webapp"] do
# this can be made the default behavior again once git-union-merge builds properly when bottling
if build.with? "git-union-merge"
system "make", "git-union-merge", "PREFIX=#{prefix}"
bin.install "git-union-merge"
system "make", "git-union-merge.1", "PREFIX=#{prefix}"
bin.install_symlink "git-annex" => "git-annex-shell"
plist_options :manual => "git annex assistant --autostart"
def plist; <<~EOS
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "">
<plist version="1.0">
test do
# make sure git can find git-annex
ENV.prepend_path "PATH", bin
# We don't want this here or it gets "caught" by git-annex.
rm_r "Library/Python/2.7/lib/python/site-packages/homebrew.pth"
system "git", "init"
system "git", "annex", "init"
(testpath/"Hello.txt").write "Hello!"
assert !File.symlink?("Hello.txt")
assert_match "add Hello.txt ok", shell_output("git annex add .")
system "git", "commit", "-a", "-m", "Initial Commit"
assert File.symlink?("Hello.txt")
# The steps below are necessary to ensure the directory cleanly deletes.
# git-annex guards files in a way that isn't entirely friendly of automatically
# wiping temporary directories in the way `brew test` does at end of execution.
system "git", "rm", "Hello.txt", "-f"
system "git", "commit", "-a", "-m", "Farewell!"
system "git", "annex", "unused"
assert_match "dropunused 1 ok", shell_output("git annex dropunused 1 --force")
system "git", "annex", "uninit"