erofs-utils: add selinuxSupport option

This commit is contained in:
rewine 2023-07-14 16:17:24 +08:00
parent 891e7b46b9
commit 7db1010453
No known key found for this signature in database
GPG key ID: 2964FF5514455F51

View file

@ -1,5 +1,6 @@
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, fuse, util-linux, lz4, zlib
{ lib, stdenv, fetchurl, autoreconfHook, pkg-config, fuse, util-linux, lz4, zlib, libselinux
, fuseSupport ? stdenv.isLinux
, selinuxSupport ? false
}:
stdenv.mkDerivation rec {
@ -15,11 +16,13 @@ stdenv.mkDerivation rec {
nativeBuildInputs = [ autoreconfHook pkg-config ];
buildInputs = [ util-linux lz4 zlib ]
++ lib.optionals fuseSupport [ fuse ];
++ lib.optionals fuseSupport [ fuse ]
++ lib.optionals selinuxSupport [ libselinux ];
configureFlags = [
"MAX_BLOCK_SIZE=4096"
] ++ lib.optional fuseSupport "--enable-fuse";
] ++ lib.optional fuseSupport "--enable-fuse"
++ lib.optional selinuxSupport "--with-selinux";
meta = with lib; {
homepage = "https://git.kernel.org/pub/scm/linux/kernel/git/xiang/erofs-utils.git/about/";