summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/tower-cli/package.py
blob: a10c0b6d2db93360af7210f9902770dc14f9f157 (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
29
30
31
32
33
34
35
36
37
38
# Copyright 2013-2022 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 platform

from spack.package import *


class TowerCli(Package):
    """Tower on the Command Line brings Nextflow Tower concepts
    including Pipelines, Actions and Compute Environments
    to the terminal.
    """

    homepage = "https://github.com/seqeralabs/tower-cli"

    if platform.machine() == "x86_64":
        if platform.system() == "Darwin":
            version(
                "0.6.2",
                sha256="2bcc17687d58d4c888e8d57b7f2f769a2940afb3266dc3c6c48b0af0cb490d91",
                url="https://github.com/seqeralabs/tower-cli/releases/download/v0.6.2/tw-0.6.2-osx-x86_64",
                expand=False,
            )
        elif platform.system() == "Linux":
            version(
                "0.6.2",
                sha256="02c6d141416b046b6e8b6f9723331fe0e39d37faa3561c47c152df4d33b37e50",
                url="https://github.com/seqeralabs/tower-cli/releases/download/v0.6.2/tw-0.6.2-linux-x86_64",
                expand=False,
            )

    def install(self, spec, prefix):
        mkdirp(prefix.bin)
        install(self.stage.archive_file, join_path(prefix.bin, "tw"))
        set_executable(join_path(prefix.bin, "tw"))