Clone of https://github.com/NixOS/nixpkgs.git (to stress-test knotserver)
1{
2 lib,
3 stdenv,
4 fetchurl,
5 bison,
6 flex,
7 libsepol,
8}:
9
10stdenv.mkDerivation rec {
11 pname = "checkpolicy";
12 version = "3.8.1";
13 inherit (libsepol) se_url;
14
15 src = fetchurl {
16 url = "${se_url}/${version}/checkpolicy-${version}.tar.gz";
17 sha256 = "sha256-e0d8UW4mk9i2xRE4YyMXfx19tRwuBOttDejKKzYSDl0=";
18 };
19
20 nativeBuildInputs = [
21 bison
22 flex
23 ];
24 buildInputs = [ libsepol ];
25
26 makeFlags = [
27 "PREFIX=$(out)"
28 "LIBSEPOLA=${lib.getLib libsepol}/lib/libsepol.a"
29 ];
30
31 meta =
32 removeAttrs libsepol.meta [
33 "outputsToInstall"
34 "name"
35 ]
36 // {
37 description = "SELinux policy compiler";
38 mainProgram = "checkpolicy";
39 };
40}