2021-05-20 05:42:48 +00:00
|
|
|
{ lib
|
|
|
|
, stdenv
|
2020-03-31 08:32:07 +00:00
|
|
|
, fetchFromGitHub
|
|
|
|
, autoreconfHook
|
|
|
|
, pkg-config
|
|
|
|
, glib
|
|
|
|
, libcap
|
|
|
|
, libseccomp
|
|
|
|
, libslirp
|
2020-05-19 00:41:01 +00:00
|
|
|
, nixosTests
|
2020-03-31 08:32:07 +00:00
|
|
|
}:
|
2019-02-14 06:23:26 +00:00
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2019-08-15 12:41:18 +00:00
|
|
|
pname = "slirp4netns";
|
2022-05-02 08:07:17 +00:00
|
|
|
version = "1.2.0";
|
2019-02-14 06:23:26 +00:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
|
|
|
owner = "rootless-containers";
|
|
|
|
repo = "slirp4netns";
|
|
|
|
rev = "v${version}";
|
2022-05-02 08:07:17 +00:00
|
|
|
sha256 = "sha256-wVisE4YAK52yfeM2itnBqCmhRKlrKRs0NEppQzZPok8=";
|
2019-02-14 06:23:26 +00:00
|
|
|
};
|
|
|
|
|
2020-03-19 00:57:30 +00:00
|
|
|
nativeBuildInputs = [ autoreconfHook pkg-config ];
|
2019-07-25 03:29:55 +00:00
|
|
|
|
2020-03-31 08:32:07 +00:00
|
|
|
buildInputs = [ glib libcap libseccomp libslirp ];
|
2019-02-14 06:23:26 +00:00
|
|
|
|
|
|
|
enableParallelBuilding = true;
|
2022-07-05 01:17:04 +00:00
|
|
|
strictDeps = true;
|
2019-02-14 06:23:26 +00:00
|
|
|
|
2020-08-23 22:38:11 +00:00
|
|
|
passthru.tests = { inherit (nixosTests) podman; };
|
2020-05-19 00:41:01 +00:00
|
|
|
|
2021-01-11 07:54:33 +00:00
|
|
|
meta = with lib; {
|
2020-03-19 00:57:30 +00:00
|
|
|
homepage = "https://github.com/rootless-containers/slirp4netns";
|
2019-02-14 06:23:26 +00:00
|
|
|
description = "User-mode networking for unprivileged network namespaces";
|
|
|
|
license = licenses.gpl2;
|
2020-04-03 10:11:28 +00:00
|
|
|
maintainers = with maintainers; [ orivej ] ++ teams.podman.members;
|
2019-02-14 06:23:26 +00:00
|
|
|
platforms = platforms.linux;
|
|
|
|
};
|
|
|
|
}
|