forked from pls-rs/pls
-
Notifications
You must be signed in to change notification settings - Fork 0
/
pls.template
32 lines (26 loc) · 870 Bytes
/
pls.template
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
# Autogenerated, do not edit. All changes will be undone.
# Source: https://github.com/pls-rs/pls/blob/main/pkg/brew/pls.template
class Pls < Formula
desc "Prettier and powerful ls for the pros"
homepage "https://pls.cli.rs/"
version "{{ VERSION }}"
license "GPL-3.0-or-later"
if OS.mac?
url "{{ MAC_URL }}"
sha256 "{{ MAC_SHA }}"
elsif OS.linux?
url "{{ LINUX_URL }}"
sha256 "{{ LINUX_SHA }}"
end
depends_on "libgit2"
def install
bin.install "pls"
end
test do
linkage_with_libgit2 = (bin/"pls").dynamically_linked_libraries.any? do |dll|
next false unless dll.start_with?(HOMEBREW_PREFIX.to_s)
File.realpath(dll) == (Formula["libgit2"].opt_lib/shared_library("libgit2")).realpath.to_s
end
assert linkage_with_libgit2, "No linkage with libgit2! Cargo is likely using a vendored version."
end
end