diff options
Diffstat (limited to 'var')
-rw-r--r-- | var/spack/repos/builtin/packages/smee-client/package.py | 42 | ||||
-rw-r--r-- | var/spack/repos/builtin/packages/typescript/package.py | 25 |
2 files changed, 67 insertions, 0 deletions
diff --git a/var/spack/repos/builtin/packages/smee-client/package.py b/var/spack/repos/builtin/packages/smee-client/package.py new file mode 100644 index 0000000000..efb0809dda --- /dev/null +++ b/var/spack/repos/builtin/packages/smee-client/package.py @@ -0,0 +1,42 @@ +# Copyright 2013-2023 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 * +from spack.util.executable import ProcessError + + +class SmeeClient(Package): + """ + Client and CLI for smee.io, a service that delivers webhooks to your + local development environment. + """ + + homepage = "https://smee.io" + url = "https://github.com/probot/smee-client/archive/refs/tags/v1.2.5.tar.gz" + + maintainers("alecbcs") + + license("ISC") + + version("1.2.3", sha256="b9afff843fc7a3c2b5d6659acf45357b5db7a739243b99f6d18a9b110981a328") + + depends_on("node-js", type=("build", "link", "run")) + depends_on("npm", type="build") + depends_on("typescript", type="build") + + phases = ["build", "install"] + + def build(self, spec, prefix): + npm = which("npm", required=True) + + # Allow tsc to fail with typing "errors" which don't affect results + output = npm("run", "build", output=str, error=str, fail_on_error=False) + if npm.returncode not in (0, 2): + raise ProcessError(output) + + def install(self, spec, prefix): + npm = which("npm", required=True) + npm("install", "--global", f"--prefix={prefix}") diff --git a/var/spack/repos/builtin/packages/typescript/package.py b/var/spack/repos/builtin/packages/typescript/package.py new file mode 100644 index 0000000000..9a0e0a69e4 --- /dev/null +++ b/var/spack/repos/builtin/packages/typescript/package.py @@ -0,0 +1,25 @@ +# Copyright 2013-2023 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 Typescript(Package): + """TypeScript is a superset of JavaScript that compiles to clean JavaScript output.""" + + homepage = "https://www.typescriptlang.org" + url = "https://github.com/microsoft/TypeScript/archive/refs/tags/v5.3.2.tar.gz" + + license("Apache-2.0") + + version("5.3.2", sha256="c5a12507006e7d2b8020dec9589191ce070fd88203f2c80aca00d641cee7866f") + + depends_on("node-js", type=("build", "link", "run")) + depends_on("npm", type="build") + + def install(self, spec, prefix): + npm = which("npm", required=True) + npm("install", "--global", f"--prefix={prefix}") |