1 { lib, stdenv, fetchurl, gettext, libsepol, libselinux, libsemanage, libxcrypt }:
3 stdenv.mkDerivation rec {
4 pname = "policycoreutils";
6 inherit (libsepol) se_url;
9 url = "${se_url}/${version}/policycoreutils-${version}.tar.gz";
10 hash = "sha256-WP5OSB7ftEVsEUklRC4ROJ3xc5SSWs26PeIRFFzl6pg=";
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
20 nativeBuildInputs = [ gettext ];
21 buildInputs = [ libsepol libselinux libsemanage libxcrypt ];
27 "BASHCOMPLETIONDIR=$out/share/bash-completion/completions"
28 "LOCALEDIR=$(out)/share/locale"
29 "MAN5DIR=$(out)/share/man/man5"
33 description = "SELinux policy core utilities";
34 license = licenses.gpl2Only;
35 inherit (libsepol.meta) homepage platforms maintainers;