unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#30806] [PATCH] Add terraform and terraform-provider-libvirt
@ 2018-03-13 20:25 Christopher Baines
  2018-03-13 20:30 ` [bug#30806] [PATCH 1/2] gnu: Add terraform Christopher Baines
  2021-09-28 19:57 ` [bug#30806] Sharlatan Hellseher
  0 siblings, 2 replies; 4+ messages in thread
From: Christopher Baines @ 2018-03-13 20:25 UTC (permalink / raw)
  To: 30806

[-- Attachment #1: Type: text/plain, Size: 615 bytes --]

Tags: moreinfo

I'll send some patches for adding a Terraform package and the Terraform
libvirt provider. Both of these work, at least in the way I've been
using them, but the packages need more work before they can be
included. I think both packages include quite a few copies of other
libraries which need packaging for Guix.


Christopher Baines (2):
  gnu: Add terraform.
  gnu: Add terraform-provider-libvirt.

 gnu/local.mk               |   1 +
 gnu/packages/terraform.scm | 106 +++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 107 insertions(+)
 create mode 100644 gnu/packages/terraform.scm

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 962 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [bug#30806] [PATCH 1/2] gnu: Add terraform.
  2018-03-13 20:25 [bug#30806] [PATCH] Add terraform and terraform-provider-libvirt Christopher Baines
@ 2018-03-13 20:30 ` Christopher Baines
  2018-03-13 20:30   ` [bug#30806] [PATCH 2/2] gnu: Add terraform-provider-libvirt Christopher Baines
  2021-09-28 19:57 ` [bug#30806] Sharlatan Hellseher
  1 sibling, 1 reply; 4+ messages in thread
From: Christopher Baines @ 2018-03-13 20:30 UTC (permalink / raw)
  To: 30806

* gnu/packages/terraform.scm (New file).
* gnu/local.mk (GNU_SYSTEM_MODULES): Add it.
---
 gnu/local.mk               |  1 +
 gnu/packages/terraform.scm | 60 ++++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 61 insertions(+)
 create mode 100644 gnu/packages/terraform.scm

diff --git a/gnu/local.mk b/gnu/local.mk
index 5a3ae502f..2b5502e8e 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -410,6 +410,7 @@ GNU_SYSTEM_MODULES =				\
   %D%/packages/tcl.scm				\
   %D%/packages/telephony.scm			\
   %D%/packages/terminals.scm			\
+  %D%/packages/terraform.scm			\
   %D%/packages/texinfo.scm			\
   %D%/packages/tex.scm				\
   %D%/packages/textutils.scm			\
diff --git a/gnu/packages/terraform.scm b/gnu/packages/terraform.scm
new file mode 100644
index 000000000..277d19aed
--- /dev/null
+++ b/gnu/packages/terraform.scm
@@ -0,0 +1,60 @@
+;;; GNU Guix --- Functional package management for GNU
+;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
+;;;
+;;; This file is part of GNU Guix.
+;;;
+;;; GNU Guix is free software; you can redistribute it and/or modify it
+;;; under the terms of the GNU General Public License as published by
+;;; the Free Software Foundation; either version 3 of the License, or (at
+;;; your option) any later version.
+;;;
+;;; GNU Guix is distributed in the hope that it will be useful, but
+;;; WITHOUT ANY WARRANTY; without even the implied warranty of
+;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+;;; GNU General Public License for more details.
+;;;
+;;; You should have received a copy of the GNU General Public License
+;;; along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
+
+(define-module (gnu packages terraform)
+  #:use-module ((guix licenses) #:prefix license:)
+  #:use-module (guix packages)
+  #:use-module (guix download)
+  #:use-module (guix git-download)
+  #:use-module (guix build-system go))
+
+(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)
+             (delete-file-recursively
+              (string-append
+               (assoc-ref outputs "out")
+               "/src/github.com/hashicorp/terraform/config/module/test-fixtures")))))))
+    (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.16.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#30806] [PATCH 2/2] gnu: Add terraform-provider-libvirt.
  2018-03-13 20:30 ` [bug#30806] [PATCH 1/2] gnu: Add terraform Christopher Baines
@ 2018-03-13 20:30   ` Christopher Baines
  0 siblings, 0 replies; 4+ messages in thread
From: Christopher Baines @ 2018-03-13 20:30 UTC (permalink / raw)
  To: 30806

* gnu/packages/terraform.scm (terraform-provider-libvirt): New variable.
---
 gnu/packages/terraform.scm | 48 +++++++++++++++++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/terraform.scm b/gnu/packages/terraform.scm
index 277d19aed..e81ada45d 100644
--- a/gnu/packages/terraform.scm
+++ b/gnu/packages/terraform.scm
@@ -21,7 +21,11 @@
   #:use-module (guix packages)
   #:use-module (guix download)
   #:use-module (guix git-download)
-  #:use-module (guix build-system go))
+  #:use-module (guix build-system go)
+  #:use-module (gnu packages golang)
+  #:use-module (gnu packages cdrom)
+  #:use-module (gnu packages pkg-config)
+  #:use-module (gnu packages virtualization))
 
 (define-public terraform
   (package
@@ -58,3 +62,45 @@ 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)))
+
+(define-public terraform-provider-libvirt
+  (package
+    (name "terraform-provider-libvirt")
+    (version "0.3")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/dmacvicar/terraform-provider-libvirt")
+                    (commit (string-append "v" version))))
+              (sha256
+               (base32
+                "004gxy55p5cf39f2zpah0i2zhvs4x6ixnxy8z9v7314604ggpkna"))))
+    (build-system go-build-system)
+    (native-inputs
+     `(("pkg-config" ,pkg-config)))
+    (inputs
+     `(("libvirt" ,libvirt)
+       ("cdrtools" ,cdrtools)))
+    (arguments
+     '(#:import-path "github.com/dmacvicar/terraform-provider-libvirt"
+       #:phases
+       (modify-phases %standard-phases
+         (add-after 'unpack 'patch-mkisofs
+           (lambda* (#:key inputs #:allow-other-keys)
+             (substitute*
+                 "src/github.com/dmacvicar/terraform-provider-libvirt/libvirt/cloudinit_def.go"
+               (("mkisofs")
+                (string-append (assoc-ref inputs "cdrtools")
+                               "/bin/mkisofs")))))
+         ;; This should be redundant once the vendor directory is removed from
+         ;; this package
+         (add-before 'reset-gzip-timestamps 'remove-readonly-gzip-files
+           (lambda* (#:key outputs #:allow-other-keys)
+             (for-each delete-file
+                       (find-files
+                        (assoc-ref outputs "out")
+                        ".*\\.gz")))))))
+    (synopsis "")
+    (description "")
+    (home-page "")
+    (license "")))
-- 
2.16.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [bug#30806]
  2018-03-13 20:25 [bug#30806] [PATCH] Add terraform and terraform-provider-libvirt Christopher Baines
  2018-03-13 20:30 ` [bug#30806] [PATCH 1/2] gnu: Add terraform Christopher Baines
@ 2021-09-28 19:57 ` Sharlatan Hellseher
  1 sibling, 0 replies; 4+ messages in thread
From: Sharlatan Hellseher @ 2021-09-28 19:57 UTC (permalink / raw)
  To: 30806

Hi all,

Terraform is reached stable version 1.0.0+ is it still in review to
have it in Guix or it will be regected due to any licensing reason?

--
… наш разум - превосходная объяснительная машина которая способна
найти смысл почти в чем угодно, истолковать любой феномен, но
совершенно не в состоянии принять мысль о непредсказуемости.

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2021-09-28 19:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-03-13 20:25 [bug#30806] [PATCH] Add terraform and terraform-provider-libvirt Christopher Baines
2018-03-13 20:30 ` [bug#30806] [PATCH 1/2] gnu: Add terraform Christopher Baines
2018-03-13 20:30   ` [bug#30806] [PATCH 2/2] gnu: Add terraform-provider-libvirt Christopher Baines
2021-09-28 19:57 ` [bug#30806] Sharlatan Hellseher

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).