From 71d654e2738c6ef870441d4234632bd30e93c74a Mon Sep 17 00:00:00 2001
From: Chris Marusich <cmmarusich@gmail.com>
Date: Thu, 20 Dec 2018 01:24:59 -0800
Subject: [PATCH] gnu: Add terraform.
This patch is slightly modified from Christopher Baines' original patch to
accommodate some changes that have taken place recently in the Guix source
tree. But it's essentially the same. It is still probably not suitable for
inclusion in Guix just yet.
* gnu/packages/terraform.scm (terraform): New variable.
---
gnu/packages/terraform.scm | 40 ++++++++++++++++++++++++++++++++++++++
1 file changed, 40 insertions(+)
@@ -47,3 +47,43 @@ the inputs and outputs for modules of the Terraform infrastructure management
tool. These can be shown, or written to a file in JSON or Markdown formats.")
(home-page "https://github.com/segmentio/terraform-docs")
(license license:expat)))
+
+(define-public terraform
+ (package
+ (name "terraform")
+ (version "0.11.3")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hashicorp/terraform")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "0637x7jcm62pdnivmh4rggly6dmlvdh3jpsd1z4vba15gbm203nz"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/hashicorp/terraform"
+ #:phases
+ (modify-phases %standard-phases
+ ;; I'm not sure what purpose they serve, but they are readonly, so
+ ;; they break the reset-gzip-timestamps phase.
+ (add-after 'install 'delete-test-fixtures
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; If delete-file-recursively fails, it won't throw an exception.
+ ;; However, if it doesn't do its job, the build will fail, so
+ ;; we'll know one way or another.
+ (delete-file-recursively
+ (string-append
+ (assoc-ref outputs "out")
+ "/src/github.com/hashicorp/terraform/config/module/test-fixtures"))
+ #t)))))
+ (synopsis "Tool for building and changing computing infrastructure")
+ (description
+ "Terraform uses descriptions of infrastructure written in @acronym{HCL,
+Hashicorp Configuration Language} which describe graphs of resources,
+including information about dependencies. From this, Terraform can plan and
+apply changes to the described resources.
+
+Terraform uses plugins that provide intergrations to different providers.")
+ (home-page "https://www.terraform.io/")
+ (license license:mpl2.0)))
--
2.20.0