all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: 宋文武 <iyzsong@member.fsf.org>
To: 31767@debbugs.gnu.org
Cc: 宋文武 <iyzsong@member.fsf.org>
Subject: [bug#31767] [PATCH 2/3] gnu: Add umoci.
Date: Sat,  9 Jun 2018 19:20:59 +0800	[thread overview]
Message-ID: <20180609112100.18807-2-iyzsong@member.fsf.org> (raw)
In-Reply-To: <20180609112100.18807-1-iyzsong@member.fsf.org>

* gnu/packages/virtualization.scm (umoci): New variable.
---
 gnu/packages/virtualization.scm | 45 +++++++++++++++++++++++++++++++++
 1 file changed, 45 insertions(+)

diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index d2419df98..d5be45b1e 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -864,3 +864,48 @@ packaged according to the
 Container Initiative (OCI) format} and is a compliant implementation of the
 Open Container Initiative specification.")
     (license asl2.0)))
+
+(define-public umoci
+  (package
+    (name "umoci")
+    (version "0.4.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append
+                    "https://github.com/openSUSE/umoci/releases/download/v"
+                    version "/umoci.tar.xz"))
+              (file-name (string-append "umoci-" version ".tar.xz"))
+              (sha256
+               (base32
+                "0hg7hs4dagj2fgymm4b4s68k1v2k2093s3jg0d94j0ixhfmyg9nd"))))
+    (build-system go-build-system)
+    (arguments
+     '(#:import-path "github.com/openSUSE/umoci"
+       #:install-source? #f
+       #:phases
+       (modify-phases %standard-phases
+         (replace 'unpack
+           (lambda* (#:key source import-path #:allow-other-keys)
+             ;; Unpack the tarball into 'umoci' instead of "runc-${version}".
+             (let ((dest (string-append "src/" import-path)))
+               (mkdir-p dest)
+               (invoke "tar" "-C" (string-append "src/" import-path)
+                       "--strip-components=1"
+                       "-xvf" source))))
+         (replace 'build
+           (lambda* (#:key import-path #:allow-other-keys)
+             (chdir (string-append "src/" import-path))
+             ;; TODO: build manpages with 'go-md2man'.
+             (invoke "make" "SHELL=bash")))
+         (replace 'install
+           (lambda* (#:key outputs #:allow-other-keys)
+             (let* ((out (assoc-ref outputs "out"))
+                    (bindir (string-append out "/bin")))
+               (install-file "umoci" bindir)
+               #t))))))
+    (home-page "https://umo.ci/")
+    (synopsis "Tool for modifying Open Container images")
+    (description
+     "@command{umoci} is a tool that allows for high-level modification of an
+OCI image layout and its tagged images.")
+    (license asl2.0)))
-- 
2.17.1

  reply	other threads:[~2018-06-09 11:23 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-06-09 11:20 [bug#31768] [PATCH 1/3] gnu: Add libostree 宋文武
2018-06-09 11:20 ` 宋文武 [this message]
2018-06-11 12:24   ` [bug#31767] [PATCH 2/3] gnu: Add umoci Ludovic Courtès
2018-06-12 11:35     ` bug#31767: " 宋文武
2018-06-09 11:21 ` [bug#31766] [PATCH 3/3] gnu: Add skopeo 宋文武
2018-06-11 12:24   ` Ludovic Courtès
2018-06-12 11:36     ` bug#31766: " 宋文武
2018-06-11 12:22 ` [bug#31768] [PATCH 1/3] gnu: Add libostree Ludovic Courtès
2018-06-12 11:35   ` bug#31768: " 宋文武

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180609112100.18807-2-iyzsong@member.fsf.org \
    --to=iyzsong@member.fsf.org \
    --cc=31767@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.