mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-26 07:34:11 +00:00
9bb3fccb5b
continuation of #109595 pkgconfig was aliased in 2018, however, it remained in all-packages.nix due to its wide usage. This cleans up the remaining references to pkgs.pkgsconfig and moves the entry to aliases.nix. python3Packages.pkgconfig remained unchanged because it's the canonical name of the upstream package on pypi.
40 lines
1.1 KiB
Nix
40 lines
1.1 KiB
Nix
{ lib, stdenv, fetchurl, pkg-config, bison, flex, libsepol, libselinux, bzip2, audit
|
|
, enablePython ? true, swig ? null, python ? null
|
|
}:
|
|
|
|
with lib;
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "libsemanage";
|
|
version = "2.9";
|
|
inherit (libsepol) se_release se_url;
|
|
|
|
src = fetchurl {
|
|
url = "${se_url}/${se_release}/libsemanage-${version}.tar.gz";
|
|
sha256 = "075w6y3l9hiy5hicgwrmijyxmhfyd1r7cnc08qxyg4j46jfk8xi5";
|
|
};
|
|
|
|
outputs = [ "out" "dev" "man" ] ++ optional enablePython "py";
|
|
|
|
nativeBuildInputs = [ bison flex pkg-config ];
|
|
buildInputs = [ libsepol libselinux bzip2 audit ]
|
|
++ optionals enablePython [ swig python ];
|
|
|
|
makeFlags = [
|
|
"PREFIX=$(out)"
|
|
"INCLUDEDIR=$(dev)/include"
|
|
"MAN3DIR=$(man)/share/man/man3"
|
|
"MAN5DIR=$(man)/share/man/man5"
|
|
"PYTHON=python"
|
|
"PYTHONLIBDIR=$(py)/${python.sitePackages}"
|
|
"DEFAULT_SEMANAGE_CONF_LOCATION=$(out)/etc/selinux/semanage.conf"
|
|
];
|
|
|
|
installTargets = [ "install" ] ++ optionals enablePython [ "install-pywrap" ];
|
|
|
|
meta = removeAttrs libsepol.meta ["outputsToInstall"] // {
|
|
description = "Policy management tools for SELinux";
|
|
license = lib.licenses.lgpl21;
|
|
};
|
|
}
|