2024-11-26 19:20:10 +01:00
|
|
|
{
|
|
|
|
buildGoModule,
|
|
|
|
fetchFromGitHub,
|
|
|
|
lib,
|
|
|
|
unstableGitUpdater,
|
|
|
|
}:
|
2024-10-15 23:31:58 +02:00
|
|
|
buildGoModule {
|
2024-10-12 18:19:18 +02:00
|
|
|
pname = "apparmor-d";
|
2025-01-14 20:37:14 +01:00
|
|
|
version = "unstable-2025-01-13";
|
2024-10-12 18:19:18 +02:00
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2025-01-14 20:37:14 +01:00
|
|
|
rev = "f1182b27bb64a3bf44e92a4bafb58178ebfbf5ac";
|
2024-10-12 18:19:18 +02:00
|
|
|
owner = "roddhjav";
|
|
|
|
repo = "apparmor.d";
|
2025-01-14 20:37:14 +01:00
|
|
|
hash = "sha256-3Ofv7Eam2/CXRNM84E0H97RrLWQEzDeSM6wYykzlLAM=";
|
2024-10-12 18:19:18 +02:00
|
|
|
};
|
2024-10-15 23:31:58 +02:00
|
|
|
|
2024-11-26 19:20:10 +01:00
|
|
|
vendorHash = null;
|
|
|
|
|
2024-10-12 18:19:18 +02:00
|
|
|
doCheck = false;
|
2024-10-15 23:31:58 +02:00
|
|
|
|
2024-10-12 18:19:18 +02:00
|
|
|
patches = [
|
2024-10-25 13:47:17 +02:00
|
|
|
./apparmor-d-prebuild.patch
|
2024-10-12 18:19:18 +02:00
|
|
|
];
|
|
|
|
|
2024-10-16 09:06:29 +02:00
|
|
|
subPackages = [
|
|
|
|
"cmd/prebuild"
|
|
|
|
"cmd/aa-log"
|
|
|
|
];
|
|
|
|
|
2024-10-22 22:05:22 +02:00
|
|
|
passthru.updateScript = unstableGitUpdater { };
|
|
|
|
|
2024-10-15 23:31:58 +02:00
|
|
|
postInstall = ''
|
2024-10-16 09:06:29 +02:00
|
|
|
mkdir -p $out/etc
|
2024-11-26 19:20:10 +01:00
|
|
|
|
2024-10-25 13:47:17 +02:00
|
|
|
DISTRIBUTION=nixos $out/bin/prebuild --abi 4 # fixme: replace with nixos support once available
|
2024-11-26 19:20:10 +01:00
|
|
|
|
2024-10-15 23:31:58 +02:00
|
|
|
mv .build/apparmor.d $out/etc
|
2024-10-16 09:06:29 +02:00
|
|
|
rm $out/bin/prebuild
|
2024-10-12 18:19:18 +02:00
|
|
|
'';
|
2024-10-15 23:31:58 +02:00
|
|
|
|
|
|
|
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;
|
|
|
|
};
|
2024-10-12 18:19:18 +02:00
|
|
|
}
|