go rework
This commit includes: * a new go package that uses gccgo to bootstrap the go toolchain * env support added to Executable * a new Go fetch strategy that uses `go get` to fetch a package and all of its deps * A platinum searcher package that leverages the new go package and fetch strategy
This commit is contained in:
@@ -1,19 +1,20 @@
|
||||
from spack import *
|
||||
import os
|
||||
import shutil
|
||||
|
||||
|
||||
class ThePlatinumSearcher(Package):
|
||||
"""Fast parallel recursive grep alternative"""
|
||||
# FIXME: add a proper url for your package's homepage here.
|
||||
homepage = "https://github.com/monochromegane/the_platinum_searcher"
|
||||
url = "https://github.com/monochromegane/the_platinum_searcher/archive/v1.7.7.tar.gz"
|
||||
url = "https://github.com/monochromegane/the_platinum_searcher"
|
||||
|
||||
version('1.7.7', '08d7265e101bc1427d5d4b9903aa1166')
|
||||
package = 'github.com/monochromegane/the_platinum_searcher/...'
|
||||
|
||||
depends_on("go")
|
||||
version('head', go=package)
|
||||
|
||||
extends("go")
|
||||
|
||||
def install(self, spec, prefix):
|
||||
env = which('env')
|
||||
env()
|
||||
# Fetch all dependencies
|
||||
go('get', './...')
|
||||
# Build pt
|
||||
go('build')
|
||||
go('install', self.package)
|
||||
shutil.copytree('bin', os.path.join(prefix, 'bin'))
|
||||
|
Reference in New Issue
Block a user