3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/tools/system/minijail/default.nix

45 lines
1.2 KiB
Nix
Raw Normal View History

{ stdenv, fetchFromGitiles, libcap }:
2017-11-24 18:07:36 +00:00
stdenv.mkDerivation rec {
pname = "minijail";
version = "14";
2017-11-24 18:07:36 +00:00
src = fetchFromGitiles {
2017-11-24 18:07:36 +00:00
url = "https://android.googlesource.com/platform/external/minijail";
rev = "linux-v${version}";
sha256 = "00dq854n4zg3ca2b46f90k15n32zn2sgabi76mnq2w985k9v977n";
2017-11-24 18:07:36 +00:00
};
buildInputs = [ libcap ];
makeFlags = [ "LIBDIR=$(out)/lib" ];
preConfigure = ''
substituteInPlace common.mk --replace /bin/echo echo
'';
postPatch = ''
patchShebangs platform2_preinstall.sh
'';
postBuild = ''
./platform2_preinstall.sh ${version} $out/include/chromeos
'';
2017-11-24 18:07:36 +00:00
installPhase = ''
mkdir -p $out/lib/pkgconfig $out/include/chromeos $out/bin
2017-11-24 18:07:36 +00:00
cp -v *.so $out/lib
cp -v *.pc $out/lib/pkgconfig
cp -v libminijail.h scoped_minijail.h $out/include/chromeos
cp -v minijail0 $out/bin
2017-11-24 18:07:36 +00:00
'';
meta = {
homepage = https://android.googlesource.com/platform/external/minijail/;
description = "Sandboxing library and application using Linux namespaces and capabilities";
license = stdenv.lib.licenses.bsd3;
2020-03-27 08:01:33 +00:00
maintainers = with stdenv.lib.maintainers; [ pcarrier qyliss ];
2017-11-24 18:07:36 +00:00
platforms = stdenv.lib.platforms.linux;
};
}