8 stdenv.mkDerivation rec {
11 se_url = "https://github.com/SELinuxProject/selinux/releases/download";
21 url = "${se_url}/${version}/libsepol-${version}.tar.gz";
22 sha256 = "sha256-zXQeJSROfvbNk01jNhQTGiZsPq6rM9i/pF6Kk7RcyQE=";
25 postPatch = lib.optionalString stdenv.hostPlatform.isStatic ''
26 substituteInPlace src/Makefile --replace 'all: $(LIBA) $(LIBSO)' 'all: $(LIBA)'
27 sed -i $'/^\t.*LIBSO/d' src/Makefile
30 nativeBuildInputs = [ flex ];
35 "INCDIR=$(dev)/include/sepol"
36 "INCLUDEDIR=$(dev)/include"
37 "MAN3DIR=$(man)/share/man/man3"
38 "MAN8DIR=$(man)/share/man/man8"
42 env.NIX_CFLAGS_COMPILE = "-Wno-error";
44 enableParallelBuilding = true;
46 passthru = { inherit se_url; };
49 description = "SELinux binary policy manipulation library";
50 homepage = "http://userspace.selinuxproject.org";
51 platforms = platforms.linux;
52 maintainers = with maintainers; [ RossComputerGuy ];
53 license = lib.licenses.gpl2Plus;
54 pkgConfigModules = [ "libselinux" ];