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