summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/k8/package.py
blob: 14452606a6a38d16ec328fd254a31c11b2eeb1bc (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# 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)

import os
import sys

from spack.package import *


class K8(Package):
    """K8 is a Javascript shell based on Google's V8 Javascript engine."""

    homepage = "https://github.com/attractivechaos/k8"
    url = "https://github.com/attractivechaos/k8/releases/download/v0.2.4/k8-0.2.4.tar.bz2"

    version("0.2.4", sha256="da8a99c7f1ce7f0cb23ff07ce10510e770686b906d5431442a5439743c0b3c47")

    depends_on("zlib-api", type="run")

    def install(self, spec, prefix):
        if sys.platform == "darwin":
            os.rename("k8-Darwin", "k8")

        if sys.platform != "darwin":
            os.rename("k8-Linux", "k8")
        install_tree(".", prefix.bin)