pass: add master, improve styling (#49081)

This commit is contained in:
Alec Scott 2025-02-17 21:13:34 -08:00 committed by GitHub
parent a0e09139fc
commit 8639779002
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -6,7 +6,11 @@
class Pass(MakefilePackage):
"""A minimal password manager following the UNIX philosphy."""
"""Pass is a simple password manager that follows the Unix philosophy.
It stores passwords in gpg encrypted files organized in a directory hierarchy,
provides commands for adding, editing, generating, and retrieving passwords,
and features integration with git for versioning and synchronization."""
homepage = "https://www.passwordstore.org/"
git = "https://git.zx2c4.com/password-store.git"
@ -15,26 +19,37 @@ class Pass(MakefilePackage):
license("GPL-2.0", checked_by="taliaferro")
# Sanity checks
sanity_check_is_file = ["bin/pass"]
sanity_check_is_dir = ["share/bash-completion/completions"]
# Versions - newest to oldest
version("master", branch="master")
version("1.7.4", tag="1.7.4", commit="1078f2514d579178d5df7042c6a790e9c9b731ad")
# Variants
variant("xclip", default=False, description="install the X11 clipboard provider")
# Required dependencies
depends_on("bash")
depends_on("gnupg")
depends_on("git")
depends_on("tree")
depends_on("util-linux") # for GNU getopt
depends_on("gnupg")
depends_on("libqrencode")
depends_on("openssl") # used for base64 only
depends_on("tree")
depends_on("util-linux") # for GNU getopt
# Optional dependencies
depends_on("xclip", when="+xclip")
def setup_build_environment(self, env):
env.set("PREFIX", prefix)
"""Set required environment variables for build."""
env.set("PREFIX", self.prefix)
env.set("WITH_ALLCOMP", "yes")
def edit(self, spec, prefix):
"""
"""Patch platform-specific dependency paths in script files.
Pass's install process involves slotting in a small script snippet at
the start of the file, defining certain platform-specific behaviors
including the paths where some of its key dependencies are likely to
@ -42,7 +57,6 @@ def edit(self, spec, prefix):
but the paths to the dependencies are wrong (for example, on MacOS
it looks for getopt in /opt/homebrew.) We can hardcode those paths here.
"""
bash_exec = self.spec["bash"].command
gpg_exec = self.spec["gnupg"].prefix.bin.gpg
getopt_exec = self.spec["util-linux"].prefix.bin.getopt