aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Baines <mail@cbaines.net>2018-02-05 09:34:28 +0100
committerChristopher Baines <christopher.baines@digital.cabinet-office.gov.uk>2019-02-24 20:34:02 +0000
commite122fb2d05b6295204c2e2702f16fdc7b0853fcf (patch)
tree409c58da469b5d49b5c3ea02deb47e5b450a633b
parent9bb82f89268037fc5c910884f1f113e2bf93a360 (diff)
downloadgnu-guix-e122fb2d05b6295204c2e2702f16fdc7b0853fcf.tar
gnu-guix-e122fb2d05b6295204c2e2702f16fdc7b0853fcf.tar.gz
gnu: Add terraform-provider-libvirt.
* gnu/packages/terraform.scm (terraform-provider-libvirt): New variable.
-rw-r--r--gnu/packages/terraform.scm49
1 files changed, 48 insertions, 1 deletions
diff --git a/gnu/packages/terraform.scm b/gnu/packages/terraform.scm
index 1ece07bcb8..1ce8cce2c6 100644
--- a/gnu/packages/terraform.scm
+++ b/gnu/packages/terraform.scm
@@ -22,7 +22,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
@@ -84,3 +88,46 @@ 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-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)
+ (outputs '("out" "lib"))
+ (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 "lib")
+ ".*\\.t?gz")))))))
+ (synopsis "")
+ (description "")
+ (home-page "")
+ (license "")))