From a42097674ddd7b70047208fea19bd4ebc7d85cd7 Mon Sep 17 00:00:00 2001 From: Arthur Rodrigues Date: Sun, 26 Oct 2025 20:41:35 +0000 Subject: [PATCH] gnu: Add go-sigs-k8s-io-knftables. * gnu/packages/golang-web.scm (go-sigs-k8s-io-knftables): New variable. Change-Id: If1afbb7fb941ecef0a2899c06f3b5321c26569ab Signed-off-by: Sharlatan Hellseher --- gnu/packages/golang-web.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/golang-web.scm b/gnu/packages/golang-web.scm index d98345c083b725dc72a4af0bf26e02ee9cc4ce73..d9228be12fc45be690fb3b0f5c2d93fda8ea3a69 100644 --- a/gnu/packages/golang-web.scm +++ b/gnu/packages/golang-web.scm @@ -14720,6 +14720,43 @@ be used as both a binary and a library.") protocol.") (license license:isc))) +(define-public go-sigs-k8s-io-knftables + (package + (name "go-sigs-k8s-io-knftables") + (version "0.0.19") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/kubernetes-sigs/knftables") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1dx0flrdhxbvk8wxgk90px91gx731qjq4j2di3nyfnn2sp3yfz1d")))) + (build-system go-build-system) + (arguments + (list + #:import-path "sigs.k8s.io/knftables" + ;; Tests are not copatible with Go 1.24+. + #:test-flags #~(list "-vet=off") + #:phases + #~(modify-phases %standard-phases + (add-after 'unpack 'fix-tests + (lambda* (#:key import-path #:allow-other-keys) + (substitute* (string-append "src/" import-path "/exec_test.go") + (("/bin/true") (which "true")) + (("/bin/false") (which "false")))))))) + (native-inputs + (list go-github-com-google-go-cmp + go-github-com-lithammer-dedent)) + (home-page "https://github.com/kubernetes-sigs/knftables") + (synopsis "Golang nftables library for Kubernetes") + (description + "This package provides nftables bindings in Go. It is not intended to +support arbitrary use cases, but instead specifically focuses on supporting +Kubernetes components which are using nftables.") + (license license:asl2.0))) + ;;; ;;; Executables: ;;;