diff options
author | Timmy Douglas <mail@timmydouglas.com> | 2021-12-21 23:33:52 -0800 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2022-01-01 19:06:58 +0100 |
commit | a45e05a80fb83ea972d83dbce11de02985ce155c (patch) | |
tree | 25a3ddbba86734c667b7ec6931e0c06dd0ef0306 | |
parent | f4ee4523ebad70f80069d833c2b838543af89e18 (diff) | |
download | guix-a45e05a80fb83ea972d83dbce11de02985ce155c.tar.gz guix-a45e05a80fb83ea972d83dbce11de02985ce155c.zip |
gnu: Add slirp4netns.
* gnu/packages/containers.scm (slirp4netns): New variable.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
-rw-r--r-- | gnu/packages/containers.scm | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm index 84f4039277..63395a60a9 100644 --- a/gnu/packages/containers.scm +++ b/gnu/packages/containers.scm @@ -171,3 +171,44 @@ runtime (like runc or crun) for a single container.") "libslirp is a user-mode networking library used by virtual machines, containers or various tools.") (license license:bsd-3))) + +(define-public slirp4netns + (package + (name "slirp4netns") + (version "1.1.12") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/rootless-containers/slirp4netns") + (commit (string-append "v" version)))) + (sha256 + (base32 "03llv4dlf7qqxwz4zdyk926g4bigfj2gb50glm70ciflpvzs8081")) + (file-name (git-file-name name version)))) + (build-system gnu-build-system) + (arguments + '(#:tests? #f ; XXX: open("/dev/net/tun"): No such file or directory + #:phases (modify-phases %standard-phases + (add-after 'unpack 'fix-hardcoded-paths + (lambda _ + (substitute* (find-files "tests" "\\.sh") + (("ping") "/run/setuid-programs/ping"))))))) + (inputs + (list glib + libcap + libseccomp + libslirp)) + (native-inputs + (list automake + autoconf + iproute ; iproute, jq, nmap (ncat) and util-linux are for tests + jq + nmap + pkg-config + util-linux)) + (home-page "https://github.com/rootless-containers/slirp4netns") + (synopsis "User-mode networking for unprivileged network namespaces") + (description + "slirp4netns provides user-mode networking (\"slirp\") for unprivileged +network namespaces.") + (license license:gpl2+))) |