summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJames Taliaferro <44253038+taliaferro@users.noreply.github.com>2024-06-03 19:57:47 +0000
committerGitHub <noreply@github.com>2024-06-03 12:57:47 -0700
commitf478a65635379a783615462c4417f8464cc03a74 (patch)
tree19955d76ebc3e6ace9f79d12122ca5765ec0d7d5
parenteca44600c592f4b8a3545036e6d2a9f79ca41ef0 (diff)
downloadspack-f478a65635379a783615462c4417f8464cc03a74.tar.gz
spack-f478a65635379a783615462c4417f8464cc03a74.tar.bz2
spack-f478a65635379a783615462c4417f8464cc03a74.tar.xz
spack-f478a65635379a783615462c4417f8464cc03a74.zip
nb: new package (#44456)
* new package: nb * only one filter_file, install completions * completions now implicit, merged by the view
-rw-r--r--var/spack/repos/builtin/packages/nb/package.py45
1 files changed, 45 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/nb/package.py b/var/spack/repos/builtin/packages/nb/package.py
new file mode 100644
index 0000000000..528d7d911f
--- /dev/null
+++ b/var/spack/repos/builtin/packages/nb/package.py
@@ -0,0 +1,45 @@
+# Copyright 2013-2024 Lawrence Livermore National Security, LLC and other
+# Spack Project Developers. See the top-level COPYRIGHT file for details.
+#
+# SPDX-License-Identifier: (Apache-2.0 OR MIT)
+
+from spack.package import *
+
+
+class Nb(Package):
+ """
+ nb is a command line and local web note‑taking, bookmarking, archiving,
+ and knowledge base application.
+ """
+
+ homepage = "https://xwmx.github.io/nb/"
+ url = "https://github.com/xwmx/nb/archive/refs/tags/7.12.1.tar.gz"
+
+ maintainers("taliaferro")
+
+ license("AGPL-3.0", checked_by="taliaferro")
+
+ version("7.12.1", sha256="c9b30448751dd726469ed3fde29e618c5747eb4a16ceaaf86d773989a6cf13f3")
+
+ depends_on("git")
+ depends_on("bash")
+
+ def patch(self):
+ filter_file(
+ r"^#!\s?.*bash",
+ "#!{}".format(self.spec["bash"].command.path),
+ "nb",
+ "bin/bookmark",
+ "bin/notes",
+ "etc/nb-completion.bash",
+ )
+
+ def install(self, spec, prefix):
+ mkdirp(prefix.bin)
+ mkdirp(prefix + "/share/bash-completion/completions")
+ install("nb", join_path(prefix, "bin/nb"))
+ install("bin/notes", join_path(prefix, "bin/notes"))
+ install("bin/bookmark", join_path(prefix, "bin/bookmark"))
+ install(
+ "etc/nb-completion.bash", join_path(prefix, "share/bash-completion/completions/nb")
+ )