{ buildGoModule, fetchFromGitHub, git, lib, unstableGitUpdater, }: buildGoModule { pname = "apparmor-d"; version = "unstable-2024-10-12"; src = fetchFromGitHub { rev = "db6c94ba5ad97112bc577cb66c2e1fa66df83a29"; owner = "roddhjav"; repo = "apparmor.d"; hash = "sha256-3qVSMLIzVd9hcvj2V2eaacNOjOFTUHkTslaTETYYg4U="; }; vendorHash = null; doCheck = false; nativeBuildInputs = [ git ]; patches = [ ./apparmor-d-prebuild.patch ]; subPackages = [ "cmd/prebuild" "cmd/aa-log" ]; passthru.updateScript = unstableGitUpdater { }; postInstall = '' mkdir -p $out/etc DISTRIBUTION=nixos $out/bin/prebuild --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; }; }