fzf: fix go cache protection to allow delete (#49151)
This commit is contained in:
parent
03fa150185
commit
b06c5c7e81
@ -7,7 +7,7 @@
|
|||||||
from spack.package import *
|
from spack.package import *
|
||||||
|
|
||||||
|
|
||||||
class Fzf(MakefilePackage):
|
class Fzf(GoPackage):
|
||||||
"""A general-purpose command-line fuzzy finder that provides fast, interactive
|
"""A general-purpose command-line fuzzy finder that provides fast, interactive
|
||||||
filtering for files, processes, git commits, and more. It supports fuzzy
|
filtering for files, processes, git commits, and more. It supports fuzzy
|
||||||
search with real-time preview and various input sources."""
|
search with real-time preview and various input sources."""
|
||||||
@ -21,7 +21,6 @@ class Fzf(MakefilePackage):
|
|||||||
license("MIT")
|
license("MIT")
|
||||||
|
|
||||||
sanity_check_is_file = ["bin/fzf"]
|
sanity_check_is_file = ["bin/fzf"]
|
||||||
sanity_check_is_dir = ["share/fzf/shell"]
|
|
||||||
|
|
||||||
# Versions from newest to oldest
|
# Versions from newest to oldest
|
||||||
version("master", branch="master")
|
version("master", branch="master")
|
||||||
@ -64,26 +63,22 @@ def url_for_version(self, version):
|
|||||||
|
|
||||||
def setup_build_environment(self, env):
|
def setup_build_environment(self, env):
|
||||||
"""Set up the build environment for fzf."""
|
"""Set up the build environment for fzf."""
|
||||||
# Point GOPATH at the top of the staging dir for the build step
|
# Setup build env from GoPackage builder
|
||||||
env.prepend_path("GOPATH", self.stage.path)
|
super().setup_build_environment(env)
|
||||||
|
|
||||||
# Set required environment variables for non-git builds
|
# Set required environment variables for non-git builds
|
||||||
env.set("FZF_VERSION", self.spec.version)
|
env.set("FZF_VERSION", self.spec.version)
|
||||||
env.set("FZF_REVISION", "tarball")
|
env.set("FZF_REVISION", "tarball")
|
||||||
|
|
||||||
def install(self, spec, prefix):
|
@run_after("install")
|
||||||
"""Install fzf and its components."""
|
def install_completions(self):
|
||||||
make("install")
|
mkdirp(bash_completion_path(self.prefix))
|
||||||
|
mkdirp(zsh_completion_path(self.prefix))
|
||||||
|
|
||||||
# Install binary
|
install("shell/completion.bash", bash_completion_path(self.prefix) / "fzf.bash")
|
||||||
mkdir(prefix.bin)
|
install("shell/completion.zsh", zsh_completion_path(self.prefix) / "_fzf")
|
||||||
install("bin/fzf", prefix.bin)
|
|
||||||
|
|
||||||
# Install shell integration scripts
|
@run_after("install", when="+vim")
|
||||||
mkdirp(prefix.share.fzf.shell)
|
def install_vim_plugin(self):
|
||||||
install_tree("shell", prefix.share.fzf.shell)
|
mkdirp(self.prefix.share.fzf.plugins)
|
||||||
|
install("plugin/fzf.vim", self.prefix.share.fzf.plugins)
|
||||||
# Install vim plugin if requested
|
|
||||||
if spec.satisfies("+vim"):
|
|
||||||
mkdirp(prefix.share.fzf.plugins)
|
|
||||||
install("plugin/fzf.vim", prefix.share.fzf.plugins)
|
|
||||||
|
Loading…
Reference in New Issue
Block a user