presenterm: 0.9.0 -> 0.10.0 (#378946)
[NixPkgs.git] / pkgs / by-name / li / libsepol / package.nix
blob01e038d4ec0c31facf2f7daa01eef07585953dda
2   lib,
3   stdenv,
4   fetchurl,
5   flex,
6 }:
8 stdenv.mkDerivation rec {
9   pname = "libsepol";
10   version = "3.7";
11   se_url = "https://github.com/SELinuxProject/selinux/releases/download";
13   outputs = [
14     "bin"
15     "out"
16     "dev"
17     "man"
18   ];
20   src = fetchurl {
21     url = "${se_url}/${version}/libsepol-${version}.tar.gz";
22     sha256 = "sha256-zXQeJSROfvbNk01jNhQTGiZsPq6rM9i/pF6Kk7RcyQE=";
23   };
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
28   '';
30   nativeBuildInputs = [ flex ];
32   makeFlags = [
33     "PREFIX=$(out)"
34     "BINDIR=$(bin)/bin"
35     "INCDIR=$(dev)/include/sepol"
36     "INCLUDEDIR=$(dev)/include"
37     "MAN3DIR=$(man)/share/man/man3"
38     "MAN8DIR=$(man)/share/man/man8"
39     "SHLIBDIR=$(out)/lib"
40   ];
42   env.NIX_CFLAGS_COMPILE = "-Wno-error";
44   enableParallelBuilding = true;
46   passthru = { inherit se_url; };
48   meta = with lib; {
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" ];
55   };