mirror of
https://github.com/ethauvin/sdkman-for-fish.git
synced 2025-04-25 05:17:11 -07:00
issue #29: Local Homebrew formula for fish 2
This commit is contained in:
parent
7faecfd154
commit
0d42de6d9c
2 changed files with 61 additions and 1 deletions
|
@ -21,7 +21,7 @@ matrix:
|
|||
addons:
|
||||
homebrew:
|
||||
packages:
|
||||
- 'https://raw.githubusercontent.com/Homebrew/homebrew-core/799fef191cd2beac06930e1d1a8e7f308bd0f4b1/Formula/fish.rb' # 2.7.1
|
||||
- 'test/Homebrew-Formula-fish-2.7.1.rb'
|
||||
update: true # TODO: build should be green without, but isn't
|
||||
- os: osx
|
||||
env: FISH=3
|
||||
|
|
60
test/Homebrew-Formula-fish-2.7.1.rb
Normal file
60
test/Homebrew-Formula-fish-2.7.1.rb
Normal file
|
@ -0,0 +1,60 @@
|
|||
class HomebrewFormulaFish271 < Formula
|
||||
desc "User-friendly command-line shell for UNIX-like operating systems"
|
||||
homepage "https://fishshell.com"
|
||||
url "https://github.com/fish-shell/fish-shell/releases/download/2.7.1/fish-2.7.1.tar.gz"
|
||||
mirror "https://fishshell.com/files/2.7.1/fish-2.7.1.tar.gz"
|
||||
sha256 "e42bb19c7586356905a58578190be792df960fa81de35effb1ca5a5a981f0c5a"
|
||||
|
||||
bottle do
|
||||
sha256 "affac16a396410a500241266dbbbd8752562c9b800d9e4f2ef8de279c6fdb6aa" => :high_sierra
|
||||
sha256 "335538a7ea7f9613474f7321af0a1d519b61b0fc4be97a1744a7ea7bef7ff7e3" => :sierra
|
||||
sha256 "463cfa8edc0603761f25e0ba4e49524f69a1d856263d370d1de5fb8698dd5ccf" => :el_capitan
|
||||
end
|
||||
|
||||
head do
|
||||
url "https://github.com/fish-shell/fish-shell.git", :shallow => false
|
||||
|
||||
depends_on "autoconf" => :build
|
||||
depends_on "automake" => :build
|
||||
depends_on "doxygen" => :build
|
||||
end
|
||||
|
||||
depends_on "pcre2"
|
||||
|
||||
def install
|
||||
system "autoreconf", "--no-recursive" if build.head?
|
||||
|
||||
# In Homebrew's 'superenv' sed's path will be incompatible, so
|
||||
# the correct path is passed into configure here.
|
||||
args = %W[
|
||||
--prefix=#{prefix}
|
||||
--with-extra-functionsdir=#{HOMEBREW_PREFIX}/share/fish/vendor_functions.d
|
||||
--with-extra-completionsdir=#{HOMEBREW_PREFIX}/share/fish/vendor_completions.d
|
||||
--with-extra-confdir=#{HOMEBREW_PREFIX}/share/fish/vendor_conf.d
|
||||
SED=/usr/bin/sed
|
||||
]
|
||||
system "./configure", *args
|
||||
system "make", "install"
|
||||
end
|
||||
|
||||
def caveats; <<~EOS
|
||||
You will need to add:
|
||||
#{HOMEBREW_PREFIX}/bin/fish
|
||||
to /etc/shells.
|
||||
|
||||
Then run:
|
||||
chsh -s #{HOMEBREW_PREFIX}/bin/fish
|
||||
to make fish your default shell.
|
||||
EOS
|
||||
end
|
||||
|
||||
def post_install
|
||||
(pkgshare/"vendor_functions.d").mkpath
|
||||
(pkgshare/"vendor_completions.d").mkpath
|
||||
(pkgshare/"vendor_conf.d").mkpath
|
||||
end
|
||||
|
||||
test do
|
||||
system "#{bin}/fish", "-c", "echo"
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue