summaryrefslogtreecommitdiff
path: root/var/spack/repos/builtin/packages/the_platinum_searcher/package.py
blob: 9c9a66cdefc9894edeafb6111fe0d1672e1c2064 (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")

    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'))