File tree Expand file tree Collapse file tree 1 file changed +63
-0
lines changed
pkgs/by-name/se/selinux-refpolicy Expand file tree Collapse file tree 1 file changed +63
-0
lines changed Original file line number Diff line number Diff line change 1+ {
2+ lib ,
3+ stdenv ,
4+ fetchFromGitHub ,
5+ gnum4 ,
6+ python3 ,
7+ getopt ,
8+ checkpolicy ,
9+ policycoreutils ,
10+ semodule-utils ,
11+ policyVersion ? null ,
12+ moduleVersion ? null ,
13+ } :
14+ stdenv . mkDerivation ( finalAttrs : {
15+ pname = "selinux-refpolicy" ;
16+ version = "2.20250213" ;
17+
18+ src = fetchFromGitHub {
19+ owner = "SELinuxProject" ;
20+ repo = "refpolicy" ;
21+ tag = "RELEASE_${ lib . versions . major finalAttrs . version } _${ lib . versions . minor finalAttrs . version } " ;
22+ hash = "sha256-VsQRqigGwSVJ52uqFj1L2xzQqbWwQ/YaFI5Rsn/HbP8=" ;
23+ } ;
24+
25+ nativeBuildInputs = [
26+ gnum4
27+ python3
28+ getopt
29+ ] ;
30+
31+ configurePhase = ''
32+ runHook preConfigure
33+ make conf '' ${makeFlags[@]}
34+ runHook postConfigure
35+ '' ;
36+
37+ makeFlags =
38+ [
39+ "CHECKPOLICY=${ lib . getExe checkpolicy } "
40+ "CHECKMODULE=${ lib . getExe' checkpolicy "checkmodule" } "
41+ "SEMODULE=${ lib . getExe' policycoreutils "semodule" } "
42+ "SEMOD_PKG=${ lib . getExe' semodule-utils "semodule_package" } "
43+ "SEMOD_LNK=${ lib . getExe' semodule-utils "semodule_link" } "
44+ "SEMOD_EXP=${ lib . getExe' semodule-utils "semodule_expand" } "
45+ "DESTDIR=${ placeholder "out" } "
46+ "prefix=${ placeholder "out" } "
47+ "DISTRO=nixos"
48+ "SYSTEMD=y"
49+ "UBAC=y"
50+ ]
51+ ++ lib . optional ( policyVersion != null ) "OUTPUT_POLICY=${ toString policyVersion } "
52+ ++ lib . optional ( moduleVersion != null ) "OUTPUT_MODULE=${ toString moduleVersion } " ;
53+
54+ installTargets = "all install install-headers install-docs" ;
55+
56+ meta = {
57+ description = "SELinux Reference Policy v2" ;
58+ homepage = "http://userspace.selinuxproject.org" ;
59+ platforms = lib . platforms . linux ;
60+ maintainers = with lib . maintainers ; [ RossComputerGuy ] ;
61+ license = lib . licenses . gpl2Only ;
62+ } ;
63+ } )
You can’t perform that action at this time.
0 commit comments