summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorGeorge Hartzell <hartzell@alerce.com>2020-03-06 16:12:31 -0800
committerGitHub <noreply@github.com>2020-03-06 18:12:31 -0600
commit5965a91880bc755b78ae00c81a9484309287732c (patch)
treeffffaf75cc0f65f5c657b1c9e4a0d3a4273088cc /var
parentce287bccf8718f2ff5a9cb92c5967ebdac12363b (diff)
downloadspack-5965a91880bc755b78ae00c81a9484309287732c.tar.gz
spack-5965a91880bc755b78ae00c81a9484309287732c.tar.bz2
spack-5965a91880bc755b78ae00c81a9484309287732c.tar.xz
spack-5965a91880bc755b78ae00c81a9484309287732c.zip
New package: bat (#15345)
* New package: bat Add package for bat: A cat(1) clone with wings. * Update copyright date * Embiggen comment re build env settings Provide a bit more explanatory text about why setup_build_environment needs to set LLVM_CONFIG_PATH and LIBCLANG_PATH. Co-authored-by: George Hartzell <ghartzell@audentestx.com>
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/bat/package.py29
1 files changed, 29 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/bat/package.py b/var/spack/repos/builtin/packages/bat/package.py
new file mode 100644
index 0000000000..50c3b5349a
--- /dev/null
+++ b/var/spack/repos/builtin/packages/bat/package.py
@@ -0,0 +1,29 @@
+# Copyright 2013-2020 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 import *
+
+
+class Bat(Package):
+ """A cat(1) clone with wings."""
+
+ homepage = "https://github.com/sharkdp/bat"
+ url = "https://github.com/sharkdp/bat/archive/v0.10.0.tar.gz"
+
+ version('0.12.1', sha256='1dd184ddc9e5228ba94d19afc0b8b440bfc1819fef8133fe331e2c0ec9e3f8e2')
+
+ depends_on('rust')
+
+ def install(self, spec, prefix):
+ cargo = which('cargo')
+ cargo('install', '--root', prefix, '--path', '.')
+
+ # cargo seems to need these to be set so that when it's building
+ # onig_sys it can run llvm-config and link against libclang.
+ def setup_build_environment(self, env):
+ env.append_flags('LLVM_CONFIG_PATH',
+ join_path(self.spec['llvm'].prefix.libexec.llvm,
+ 'llvm-config'))
+ env.append_flags('LIBCLANG_PATH', self.spec['llvm'].prefix.lib)