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

50 lines
1.1 KiB
Nix
Raw Normal View History

{ buildGoModule, fetchFromGitHub, git, lib }:
buildGoModule {
2024-10-12 18:19:18 +02:00
pname = "apparmor-d";
version = "unstable-2024-10-12";
src = fetchFromGitHub {
2024-10-16 11:28:00 +02:00
rev = "04df7052725b4ac473f1bdcd1e1644b8163ff0d2";
2024-10-12 18:19:18 +02:00
owner = "roddhjav";
repo = "apparmor.d";
2024-10-16 11:28:00 +02:00
hash = "sha256-USDbCBx6+exHJM834f+dr9fmF9hx3Xo/ddhGJVpYjC0=";
2024-10-12 18:19:18 +02:00
};
vendorHash = "sha256-YkOcpzn5AKFMDWUYbKY8DzGMiIMSyaDfexFmXv5HNQI=";
2024-10-12 18:19:18 +02:00
doCheck = false;
#dontBuild = true;
nativeBuildInputs = [ git ];
2024-10-12 18:19:18 +02:00
patches = [
./apparmor-d-paths.patch
];
2024-10-16 09:06:29 +02:00
subPackages = [
"cmd/prebuild"
"cmd/aa-log"
];
postInstall = ''
2024-10-16 09:06:29 +02:00
mkdir -p $out/etc
DISTRIBUTION=arch $out/bin/prebuild --abi 4 # fixme: replace with nixos support once available
mv .build/apparmor.d $out/etc
2024-10-16 19:39:53 +02:00
rm $out/etc/apparmor.d/abstractions/authentication.d/complete
2024-10-16 09:06:29 +02:00
rm $out/bin/prebuild
2024-10-12 18:19:18 +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
}