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

48 lines
1.1 KiB
Nix
Raw Normal View History

2024-10-22 22:05:22 +02:00
{ buildGoModule, fetchFromGitHub, git, lib, unstableGitUpdater }:
buildGoModule {
2024-10-12 18:19:18 +02:00
pname = "apparmor-d";
version = "unstable-2024-10-12";
src = fetchFromGitHub {
2024-10-17 23:23:50 +02:00
rev = "93269e0596a8d416a9ee647146c983115da2f346";
2024-10-12 18:19:18 +02:00
owner = "roddhjav";
repo = "apparmor.d";
2024-10-17 23:23:50 +02:00
hash = "sha256-x8vnKEx/HZOweVX2Fu8ydGVpnS4gxsVJBbUWtKuwMUM=";
2024-10-12 18:19:18 +02:00
};
vendorHash = "sha256-YkOcpzn5AKFMDWUYbKY8DzGMiIMSyaDfexFmXv5HNQI=";
2024-10-12 18:19:18 +02:00
doCheck = false;
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"
];
2024-10-22 22:05:22 +02:00
passthru.updateScript = unstableGitUpdater { };
postInstall = ''
2024-10-16 09:06:29 +02:00
mkdir -p $out/etc
2024-10-22 22:05:22 +02:00
DISTRIBUTION=arch $out/bin/prebuild --abi 4 # fixme: replace with nixos support once available
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
'';
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
}