mirror of
https://github.com/NixOS/nixpkgs.git
synced 2024-12-25 03:17:13 +00:00
571c71e6f7
We are migrating packages that meet below requirements: 1. using `callPackage` 2. called path is a directory 3. overriding set is empty (`{ }`) 4. not containing path expressions other than relative path (to makenixpkgs-vet happy) 5. not referenced by nix files outside of the directory, other than`pkgs/top-level/all-packages.nix` 6. not referencing nix files outside of the directory 7. not referencing `default.nix` (since it's changed to `package.nix`) 8. `outPath` doesn't change after migration The tool is here: https://github.com/Aleksanaa/by-name-migrate.
38 lines
1 KiB
Nix
38 lines
1 KiB
Nix
{ lib, stdenv, fetchurl, gettext, libsepol, libselinux, libsemanage, libxcrypt }:
|
|
|
|
stdenv.mkDerivation rec {
|
|
pname = "policycoreutils";
|
|
version = "3.7";
|
|
inherit (libsepol) se_url;
|
|
|
|
src = fetchurl {
|
|
url = "${se_url}/${version}/policycoreutils-${version}.tar.gz";
|
|
hash = "sha256-WP5OSB7ftEVsEUklRC4ROJ3xc5SSWs26PeIRFFzl6pg=";
|
|
};
|
|
|
|
postPatch = ''
|
|
# Fix install references
|
|
substituteInPlace po/Makefile \
|
|
--replace /usr/bin/install install --replace /usr/share /share
|
|
substituteInPlace newrole/Makefile --replace /usr/share /share
|
|
'';
|
|
|
|
nativeBuildInputs = [ gettext ];
|
|
buildInputs = [ libsepol libselinux libsemanage libxcrypt ];
|
|
|
|
makeFlags = [
|
|
"PREFIX=$(out)"
|
|
"SBINDIR=$(out)/bin"
|
|
"ETCDIR=$(out)/etc"
|
|
"BASHCOMPLETIONDIR=$out/share/bash-completion/completions"
|
|
"LOCALEDIR=$(out)/share/locale"
|
|
"MAN5DIR=$(out)/share/man/man5"
|
|
];
|
|
|
|
meta = with lib; {
|
|
description = "SELinux policy core utilities";
|
|
license = licenses.gpl2Only;
|
|
inherit (libsepol.meta) homepage platforms maintainers;
|
|
};
|
|
}
|