aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2024-09-09 20:17:31 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2024-09-09 21:05:20 +0100
commit7287f05246a03cffdae84fde2dcb057ab8a98f9a (patch)
tree6f019d89b7f6a18770d357e6d8a487367dc300d9
parenta6e705cbcb74877222105559a8e65716a34ebecb (diff)
downloadguix-7287f05246a03cffdae84fde2dcb057ab8a98f9a.tar
guix-7287f05246a03cffdae84fde2dcb057ab8a98f9a.tar.gz
gnu: Add go-github-com-containerd-cgroups.
* gnu/packages/golang-xyz.scm (go-github-com-containerd-cgroups): New variable. Change-Id: Ic85fb7fd0a57d98ae8521eafad64fa508df60f57
-rw-r--r--gnu/packages/golang-xyz.scm54
1 files changed, 54 insertions, 0 deletions
diff --git a/gnu/packages/golang-xyz.scm b/gnu/packages/golang-xyz.scm
index ced7871f03..a276617158 100644
--- a/gnu/packages/golang-xyz.scm
+++ b/gnu/packages/golang-xyz.scm
@@ -1523,6 +1523,60 @@ levels that works by wrapping the standard @code{log} library.")
"Readline is a pure Go implementation of a GNU-Readline like library.")
(license license:expat)))
+(define-public go-github-com-containerd-cgroups
+ (package
+ (name "go-github-com-containerd-cgroups")
+ (version "1.1.0")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/containerd/cgroups")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32 "14nf5nc65vsnijaairs5v96h98y8f0sy35bpxbpmxxn4dfnz9x0y"))
+ (modules '((guix build utils)))
+ (snippet
+ #~(begin
+ ;; Submodule(s) with their own go.mod files and packed as
+ ;; separated packages:
+ ;;
+ ;; - github.com/containerd/cgroups/cmd cgctl
+ (delete-file-recursively "cmd")))))
+ (build-system go-build-system)
+ (arguments
+ (list
+ #:import-path "github.com/containerd/cgroups"
+ #:phases
+ #~(modify-phases %standard-phases
+ (add-after 'unpack 'disable-failing-tests
+ (lambda* (#:key tests? import-path #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (substitute* (find-files "." "_test\\.go$")
+ ;; expected error "controller is not supported" but received
+ ;; "cgroups: cannot find cgroup mount destination"
+ (("TestSystemd240") "OffTestSystemd240"))))))))
+ (native-inputs
+ (list go-github-com-stretchr-testify
+ go-go-uber-org-goleak))
+ (propagated-inputs
+ (list go-github-com-coreos-go-systemd-v22
+ go-github-com-docker-go-units
+ go-github-com-godbus-dbus-v5
+ go-github-com-gogo-protobuf
+ go-github-com-opencontainers-runtime-spec
+ go-github-com-sirupsen-logrus
+ go-golang-org-x-sys))
+ (home-page "https://containerd.io/")
+ (synopsis "Cgroups for Golang")
+ (description
+ "This package implements a functinoality for creating, managing,
+inspecting, and destroying cgroups. The resources format for settings on the
+cgroup uses the OCI runtime-spec found
+@url{https://github.com/opencontainers/runtime-spec,here}.")
+ (license license:asl2.0)))
+
(define-public go-github-com-containerd-fifo
(package
(name "go-github-com-containerd-fifo")