summaryrefslogtreecommitdiff
path: root/var
diff options
context:
space:
mode:
authorHans Fangohr <fangohr@users.noreply.github.com>2021-12-09 18:44:18 +0100
committerGitHub <noreply@github.com>2021-12-09 09:44:18 -0800
commit262d5e67916e7bf8b5d34e8b907e1c5a0932a439 (patch)
tree4cc4937ad10f8095eef0eec98dbae4641389292e /var
parent361a2ccdf66bbdef5370a06666af235d032b6a68 (diff)
downloadspack-262d5e67916e7bf8b5d34e8b907e1c5a0932a439.tar.gz
spack-262d5e67916e7bf8b5d34e8b907e1c5a0932a439.tar.bz2
spack-262d5e67916e7bf8b5d34e8b907e1c5a0932a439.tar.xz
spack-262d5e67916e7bf8b5d34e8b907e1c5a0932a439.zip
New package: dust (#27845)
Diffstat (limited to 'var')
-rw-r--r--var/spack/repos/builtin/packages/dust/package.py51
1 files changed, 51 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/dust/package.py b/var/spack/repos/builtin/packages/dust/package.py
new file mode 100644
index 0000000000..6835d1917e
--- /dev/null
+++ b/var/spack/repos/builtin/packages/dust/package.py
@@ -0,0 +1,51 @@
+# Copyright 2013-2021 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 Dust(Package):
+ """du + rust = dust. Like du but more intuitive."""
+
+ homepage = "https://github.com/bootandy/dust"
+ url = "https://github.com/bootandy/dust/archive/v0.7.5.tar.gz"
+
+ maintainers = ["fangohr"]
+
+ version(
+ "0.7.5",
+ sha256="f892aaf7a0a7852e12d01b2ced6c2484fb6dc5fe7562abdf0c44a2d08aa52618",
+ )
+
+ depends_on("rust")
+
+ sanity_check_is_file = [join_path("bin", "dust")]
+
+ def install(self, spec, prefix):
+ cargo = which("cargo")
+ cargo("install", "--root", prefix, "--path", ".")
+
+ @run_after("install")
+ def check_install(self):
+ print("Attempt to call 'dust' with '--version'")
+ dust = Executable(join_path(self.spec["dust"].prefix.bin, "dust"))
+ output = dust(
+ "--version",
+ output=str.split,
+ )
+ print("stdout received fromm dust is '{}".format(output))
+ assert "Dust " in output
+
+ def test(self):
+ """Run this smoke test when requested explicitly"""
+
+ dustpath = join_path(self.spec["dust"].prefix.bin, "dust")
+ options = ["--version"]
+ purpose = "Check dust can execute (with option '--version')"
+ expected = ["Dust "]
+
+ self.run_test(
+ dustpath, options=options, expected=expected, status=[0], purpose=purpose
+ )