at 18.09-beta 36 lines 1.1 kB view raw
1{ stdenv, fetchurl, gettext, libsepol, libselinux, libsemanage }: 2 3stdenv.mkDerivation rec { 4 name = "policycoreutils-${version}"; 5 version = "2.7"; 6 inherit (libsepol) se_release se_url; 7 8 src = fetchurl { 9 url = "${se_url}/${se_release}/policycoreutils-${version}.tar.gz"; 10 sha256 = "1x742c7lkw30namhkw87yg7z384qzqjz0pvmqs0lk19v6958l6qa"; 11 }; 12 13 postPatch = '' 14 # Fix install references 15 substituteInPlace po/Makefile \ 16 --replace /usr/bin/install install --replace /usr/share /share 17 substituteInPlace newrole/Makefile --replace /usr/share /share 18 ''; 19 20 nativeBuildInputs = [ gettext ]; 21 buildInputs = [ libsepol libselinux libsemanage ]; 22 23 preBuild = '' 24 makeFlagsArray+=("PREFIX=$out") 25 makeFlagsArray+=("DESTDIR=$out") 26 makeFlagsArray+=("BASHCOMPLETIONDIR=$out/share/bash-completion/completions") 27 makeFlagsArray+=("LOCALEDIR=$out/share/locale") 28 makeFlagsArray+=("MAN5DIR=$out/share/man/man5") 29 ''; 30 31 meta = with stdenv.lib; { 32 description = "SELinux policy core utilities"; 33 license = licenses.gpl2; 34 inherit (libsepol.meta) homepage platforms maintainers; 35 }; 36}