GNU bug report logs - #61682
[PATCH] gnu: buildah: Add 'buildah' package

Previous Next

Package: guix-patches;

Reported by: Zongyuan Li <zongyuan.li <at> c0x0o.me>

Date: Tue, 21 Feb 2023 14:58:03 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Zongyuan Li <zongyuan.li <at> c0x0o.me>
To: 61682 <at> debbugs.gnu.org, liliana.prikler <at> gmail.com
Cc: Zongyuan Li <zongyuan.li <at> c0x0o.me>
Subject: [bug#61682] [PATCH v3 1/1] gnu: buildah: Add 'buildah' package
Date: Fri, 24 Mar 2023 10:14:33 +0000
gnu: buildah: Add 'buildah' package

Introduce new 'buildah' package

* gnu/packages/containers.scm: New 'buildah' package
---
 gnu/packages/containers.scm | 73 +++++++++++++++++++++++++++++++++++++
 1 file changed, 73 insertions(+)

diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index b316588ea2..c20bcdaba3 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -406,3 +406,76 @@ (define-public podman
 volumes mounted into those containers, and pods made from groups of
 containers.")
     (license license:asl2.0)))
+
+(define-public buildah
+  (package
+    (name "buildah")
+    (version "1.29.1")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/containers/buildah")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "1mcqkz68fjccdla1bgxw57w268a586brm6x28fcm6x425ah0w07h"))))
+    (build-system go-build-system)
+    (arguments
+      (list #:import-path "github.com/containers/buildah/cmd/buildah"
+            #:unpack-path "github.com/containers/buildah"
+            ; Some dependencies require go-1.18 to build
+            #:go go-1.18
+            #:tests? #f
+            #:build-flags
+            ; These information is constructed in 'buildah' Makefile.
+            #~(list (string-append "-ldflags=-X main.GitCommit="
+                                   "faf0d4fcbaede00f4e615dc5cc2ccc816f240cfe"
+                                   " -X main.cniVersion=v1.1.2"))
+            #:install-source? #f
+            #:phases
+            #~(modify-phases %standard-phases
+                (add-after 'unpack 'prepare-install-docs
+                  (lambda* (#:key unpack-path #:allow-other-keys)
+                    (substitute* (string-append "src/"
+                                                unpack-path
+                                                "/docs/Makefile")
+                      (("../tests/tools/build/go-md2man")
+                       (which "go-md2man")))
+                    (substitute* (string-append "src/"
+                                                unpack-path
+                                                "/docs/Makefile")
+                      (("/usr/local") (string-append #$output)))))
+                (add-after 'build 'build-docs
+                  (lambda* (#:key unpack-path #:allow-other-keys)
+                    (let*
+                      ((doc-path (string-append "src/" unpack-path "/docs")))
+                      (invoke "make" "-C" doc-path))))
+                (add-after 'install 'install-docs
+                  (lambda* (#:key unpack-path #:allow-other-keys)
+                    (let*
+                      ((doc-path (string-append "src/" unpack-path "/docs")))
+                      (invoke "make" "-C" doc-path "install")))))))
+    (inputs (list btrfs-progs
+                  cni-plugins
+                  conmon
+                  eudev
+                  glib
+                  gpgme
+                  libassuan
+                  libseccomp
+                  lvm2
+                  runc))
+    (native-inputs
+     (list go-github-com-go-md2man
+           gnu-make
+           pkg-config))
+    (synopsis
+     "Facilitates building Open Container Initiative (OCI) container images")
+    (description
+     "Buildah is an open source, Linux-based tool used to build Open Container
+Initiative (OCI)-compatible containers.  With Buildah, you can use your
+favorite tools to create efficient container images from an existing base image
+or from scratch using an empty image.")
+    (home-page "https://buildah.io")
+    (license license:asl2.0)))
--
2.37.1 (Apple Git-137.1)






This bug report was last modified 2 years and 46 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.