* [bug#44721] [PATCH] gnu: Add terraform.
@ 2020-11-18 13:31 EuAndreh via Guix-patches via
2020-11-20 9:21 ` Christopher Baines
0 siblings, 1 reply; 9+ messages in thread
From: EuAndreh via Guix-patches via @ 2020-11-18 13:31 UTC (permalink / raw)
To: 44721; +Cc: EuAndreh
* gnu/packages/terraform.scm (terraform): New variable.
---
gnu/packages/terraform.scm | 25 +++++++++++++++++++++++++
1 file changed, 25 insertions(+)
diff --git a/gnu/packages/terraform.scm b/gnu/packages/terraform.scm
index b9313bbd4a..233859629c 100644
--- a/gnu/packages/terraform.scm
+++ b/gnu/packages/terraform.scm
@@ -1,6 +1,7 @@
;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+;;; Copyright © 2020 EuAndreh <eu@euandre.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -47,3 +48,27 @@ 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.13.5")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/hashicorp/terraform")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32
+ "0q8x6fhhkh4spddbqsxbsc2fp0r5p5010awgkb628s9vz111ws3r"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/hashicorp/terraform"))
+ (synopsis "Tool for building, changing, and versioning infrastructure")
+ (description
+ "Terraform enables you to safely and predictably create, change, and
+improve infrastructure. It is an open source tool that codifies APIs into
+declarative configuration files that can be shared amongst team members,
+treated as code, edited, reviewed, and versioned.")
+ (home-page "https://www.terraform.io/")
+ (license license:mpl2.0)))
--
2.29.2
^ permalink raw reply related [flat|nested] 9+ messages in thread
* [bug#44721] [PATCH] gnu: Add terraform.
2020-11-18 13:31 [bug#44721] [PATCH] gnu: Add terraform EuAndreh via Guix-patches via
@ 2020-11-20 9:21 ` Christopher Baines
2020-11-22 22:11 ` EuAndreh via Guix-patches via
0 siblings, 1 reply; 9+ messages in thread
From: Christopher Baines @ 2020-11-20 9:21 UTC (permalink / raw)
To: EuAndreh; +Cc: 44721
[-- Attachment #1: Type: text/plain, Size: 2751 bytes --]
EuAndreh via Guix-patches via <guix-patches@gnu.org> writes:
> * gnu/packages/terraform.scm (terraform): New variable.
> ---
> gnu/packages/terraform.scm | 25 +++++++++++++++++++++++++
> 1 file changed, 25 insertions(+)
>
> diff --git a/gnu/packages/terraform.scm b/gnu/packages/terraform.scm
> index b9313bbd4a..233859629c 100644
> --- a/gnu/packages/terraform.scm
> +++ b/gnu/packages/terraform.scm
> @@ -1,6 +1,7 @@
> ;;; GNU Guix --- Functional package management for GNU
> ;;; Copyright © 2018 Christopher Baines <mail@cbaines.net>
> ;;; Copyright © 2018, 2019 Tobias Geerinckx-Rice <me@tobias.gr>
> +;;; Copyright © 2020 EuAndreh <eu@euandre.org>
> ;;;
> ;;; This file is part of GNU Guix.
> ;;;
> @@ -47,3 +48,27 @@ 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.13.5")
> + (source (origin
> + (method git-fetch)
> + (uri (git-reference
> + (url "https://github.com/hashicorp/terraform")
> + (commit (string-append "v" version))))
> + (sha256
> + (base32
> + "0q8x6fhhkh4spddbqsxbsc2fp0r5p5010awgkb628s9vz111ws3r"))))
> + (build-system go-build-system)
> + (arguments
> + '(#:import-path "github.com/hashicorp/terraform"))
> + (synopsis "Tool for building, changing, and versioning infrastructure")
> + (description
> + "Terraform enables you to safely and predictably create, change, and
> +improve infrastructure. It is an open source tool that codifies APIs into
> +declarative configuration files that can be shared amongst team members,
> +treated as code, edited, reviewed, and versioned.")
> + (home-page "https://www.terraform.io/")
> + (license license:mpl2.0)))
Hi,
Thanks for the patch. I've also written a package definition like this,
which works, but isn't yet suitable for inclusion in Guix, because it
misrepresents the dependencies/inputs.
Terraform has a number of dependencies, but this package does
not. Properly packaging it for Guix will require packaging those
dependencies, then making a package definition which actually uses those
dependencies.
I'm hopeful that the recent progress with importers for Go packages will
help with this, but I haven't checked myself, maybe you can take a look?
Thanks,
Chris
(there's also some Terraform related discussion here
https://issues.guix.info/30806 )
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 987 bytes --]
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#44721] [PATCH] gnu: Add terraform.
2020-11-20 9:21 ` Christopher Baines
@ 2020-11-22 22:11 ` EuAndreh via Guix-patches via
2020-11-23 0:37 ` EuAndreh via Guix-patches via
0 siblings, 1 reply; 9+ messages in thread
From: EuAndreh via Guix-patches via @ 2020-11-22 22:11 UTC (permalink / raw)
To: Christopher Baines; +Cc: 44721
Christopher Baines <mail@cbaines.net> writes:
> Hi,
>
> Thanks for the patch. I've also written a package definition like this,
> which works, but isn't yet suitable for inclusion in Guix, because it
> misrepresents the dependencies/inputs.
>
> Terraform has a number of dependencies, but this package does
> not. Properly packaging it for Guix will require packaging those
> dependencies, then making a package definition which actually uses those
> dependencies.
Hi there. Thanks for the explanation.
I didn't inspect the dependencies of Terraform itself. I just tried
using the "go-build-system" and tested the resulting binary.
I'll check the linked discussions to better understand and further
investigate.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#44721] [PATCH] gnu: Add terraform.
2020-11-22 22:11 ` EuAndreh via Guix-patches via
@ 2020-11-23 0:37 ` EuAndreh via Guix-patches via
2020-11-23 12:03 ` EuAndreh via Guix-patches via
0 siblings, 1 reply; 9+ messages in thread
From: EuAndreh via Guix-patches via @ 2020-11-23 0:37 UTC (permalink / raw)
To: Christopher Baines; +Cc: 44721
EuAndreh <eu@euandre.org> writes:
> Hi there. Thanks for the explanation.
>
> I didn't inspect the dependencies of Terraform itself. I just tried
> using the "go-build-system" and tested the resulting binary.
Interestingly, the package compiled successfully and the final binary
was generated. I didn't test any functionality, though.
I wonder if the compilation should have failed, instead. I'll try the
package again and see if it is actually working.
I looked into the issue you pointed, and my package definition was
smaller and simpler, indeed. But those didn't seem to produce a binary
at the end. I wonder if mine worked because I used a newer version.
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#44721] [PATCH] gnu: Add terraform.
2020-11-23 0:37 ` EuAndreh via Guix-patches via
@ 2020-11-23 12:03 ` EuAndreh via Guix-patches via
2020-11-23 12:12 ` EuAndreh via Guix-patches via
0 siblings, 1 reply; 9+ messages in thread
From: EuAndreh via Guix-patches via @ 2020-11-23 12:03 UTC (permalink / raw)
To: Christopher Baines; +Cc: 44721
Now I get it: the Terraform repo used to vendor all of its dependencies,
and has just stopped doing it recently [0].
But the release tarball still contains all of the vendored dependencies.
I'm still not sure if that is deliberate, or just left over from the
previous model of vendoring everything from the source code repository
itself.
I'll check if the vendoring on the release tarball is deliberate now,
and start packaging the dependencies as Christopher sugested.
[0]: https://github.com/hashicorp/terraform/pull/26358
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#44721] [PATCH] gnu: Add terraform.
2020-11-23 12:03 ` EuAndreh via Guix-patches via
@ 2020-11-23 12:12 ` EuAndreh via Guix-patches via
2020-11-24 17:33 ` EuAndreh via Guix-patches via
0 siblings, 1 reply; 9+ messages in thread
From: EuAndreh via Guix-patches via @ 2020-11-23 12:12 UTC (permalink / raw)
To: Christopher Baines; +Cc: 44721
EuAndreh <eu@euandre.org> writes:
> Now I get it: the Terraform repo used to vendor all of its dependencies,
> and has just stopped doing it recently [0].
>
> But the release tarball still contains all of the vendored dependencies.
> I'm still not sure if that is deliberate, or just left over from the
> previous model of vendoring everything from the source code repository
> itself.
>
> I'll check if the vendoring on the release tarball is deliberate now,
> and start packaging the dependencies as Christopher sugested.
>
> [0]: https://github.com/hashicorp/terraform/pull/26358
The commit [0] that removed the vendoring was done in September 24th,
and the release of v0.13.5 [1] was done in October 21st.
However the release of v0.13.5 was a backport, and didn't include the
commit that removed the vendoring. Only v0.14.0-rc1 (the current latest
release) onwards that has removed the vendoring.
So the "go-build-system" just worked because all of the dependencies
were already there. Switching to v0.14.0-rc1 should probably break the
build, and require the dependencies to be packaged individually.
[0]: https://github.com/hashicorp/terraform/commit/a7c5a72c3d079fd65b29dd99c1cd0210a4dd1d57
[1]: https://github.com/hashicorp/terraform/releases/tag/v0.13.5
^ permalink raw reply [flat|nested] 9+ messages in thread
* [bug#44721] [PATCH] gnu: Add terraform.
2020-11-23 12:12 ` EuAndreh via Guix-patches via
@ 2020-11-24 17:33 ` EuAndreh via Guix-patches via
2020-11-25 22:49 ` Marius Bakke
0 siblings, 1 reply; 9+ messages in thread
From: EuAndreh via Guix-patches via @ 2020-11-24 17:33 UTC (permalink / raw)
To: Christopher Baines; +Cc: 44721
> Switching to v0.14.0-rc1 should probably break the
> build, and require the dependencies to be packaged individually.
It does break, I'll start doing it.
It would probably be better to work on a golang importer, and I'm more
inclined to do that to package Terraform instead of packaging every
dependency manually.
This will take a bit more work than I initially planned for, but I'm
still up for it.
^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2020-11-26 0:01 UTC | newest]
Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-11-18 13:31 [bug#44721] [PATCH] gnu: Add terraform EuAndreh via Guix-patches via
2020-11-20 9:21 ` Christopher Baines
2020-11-22 22:11 ` EuAndreh via Guix-patches via
2020-11-23 0:37 ` EuAndreh via Guix-patches via
2020-11-23 12:03 ` EuAndreh via Guix-patches via
2020-11-23 12:12 ` EuAndreh via Guix-patches via
2020-11-24 17:33 ` EuAndreh via Guix-patches via
2020-11-25 22:49 ` Marius Bakke
2020-11-25 23:34 ` EuAndreh via Guix-patches via
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.