diff --git a/lib/maintainers.nix b/lib/maintainers.nix index d798d6d315b5..d33ffac79183 100644 --- a/lib/maintainers.nix +++ b/lib/maintainers.nix @@ -487,6 +487,7 @@ patternspandemic = "Brad Christensen "; pawelpacana = "Paweł Pacana "; pbogdan = "Piotr Bogdan "; + pcarrier = "Pierre Carrier "; periklis = "theopompos@gmail.com"; pesterhazy = "Paulus Esterhazy "; peterhoeg = "Peter Hoeg "; diff --git a/pkgs/tools/system/minijail/default.nix b/pkgs/tools/system/minijail/default.nix new file mode 100644 index 000000000000..c47d40cef2b2 --- /dev/null +++ b/pkgs/tools/system/minijail/default.nix @@ -0,0 +1,39 @@ +{ stdenv, fetchgit, libcap }: + +stdenv.mkDerivation rec { + shortname = "minijail"; + name = "${shortname}-${version}"; + version = "android-8.0.0_r34"; + + src = fetchgit { + url = "https://android.googlesource.com/platform/external/minijail"; + rev = version; + sha256 = "1d0q08cgks6h6ffsw3zw8dz4rm9y2djj2pwwy3xi6flx7vwy0psf"; + }; + + buildInputs = [ libcap ]; + + makeFlags = [ "LIBDIR=$(out)/lib" ]; + + preConfigure = '' + substituteInPlace common.mk --replace /bin/echo echo + sed -i '/#include / d' signal_handler.c + ''; + + installPhase = '' + mkdir -p $out/lib + cp -v *.so $out/lib + mkdir -p $out/include + cp -v libminijail.h $out/include + mkdir -p $out/bin + cp minijail0 $out/bin + ''; + + meta = { + homepage = https://android.googlesource.com/platform/external/minijail/; + description = "Sandboxing library and application using Linux namespaces and capabilities"; + license = stdenv.lib.licenses.bsd3; + maintainers = with stdenv.lib.maintainers; [pcarrier]; + platforms = stdenv.lib.platforms.linux; + }; +} diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 5d69015b748d..3a81a1ead15d 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -3372,6 +3372,8 @@ with pkgs; miniball = callPackage ../development/libraries/miniball { }; + minijail = callPackage ../tools/system/minijail { }; + minixml = callPackage ../development/libraries/minixml { }; mir-qualia = callPackage ../tools/text/mir-qualia {