grimm-nixos-laptop/common/tooling/apparmor/apparmor-d-package.nix

47 lines
1.1 KiB
Nix

{ buildGoModule, fetchFromGitHub, git, lib }:
buildGoModule {
pname = "apparmor-d";
version = "unstable-2024-10-12";
src = fetchFromGitHub {
rev = "04df7052725b4ac473f1bdcd1e1644b8163ff0d2";
owner = "roddhjav";
repo = "apparmor.d";
hash = "sha256-USDbCBx6+exHJM834f+dr9fmF9hx3Xo/ddhGJVpYjC0=";
};
vendorHash = "sha256-YkOcpzn5AKFMDWUYbKY8DzGMiIMSyaDfexFmXv5HNQI=";
doCheck = false;
#dontBuild = true;
nativeBuildInputs = [ git ];
patches = [
./apparmor-d-paths.patch
];
subPackages = [
"cmd/prebuild"
"cmd/aa-log"
];
postInstall = ''
mkdir -p $out/etc
DISTRIBUTION=arch $out/bin/prebuild --complain --abi 4 # fixme: replace with nixos support once available
mv .build/apparmor.d $out/etc
rm $out/bin/prebuild
'';
meta = {
description = "Full set of AppArmor profiles (~ 1500 profiles) ";
homepage = "https://github.com/roddhjav/apparmor.d";
license = lib.licenses.gpl2Only;
mainProgram = "aa-log";
maintainers = with lib.maintainers; [ grimmauld ];
platforms = lib.platforms.linux;
};
}