summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/the_platinum_searcher/package.py
blob: 0d2c2918c4f6518ccee970209af36ed0cc873024 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
from spack import *
import os
import shutil


class ThePlatinumSearcher(Package):
    """Fast parallel recursive grep alternative"""
    homepage = "https://github.com/monochromegane/the_platinum_searcher"
    url = "https://github.com/monochromegane/the_platinum_searcher"

    package = 'github.com/monochromegane/the_platinum_searcher/...'

    version('head', go=package)

    extends("go", deptypes='build')

    def install(self, spec, prefix):
        env = os.environ
        env['GOPATH'] = self.stage.source_path + ':' + env['GOPATH']
        go('install', self.package, env=env)
        shutil.copytree('bin', os.path.join(prefix, 'bin'))