@@ -125,3 +125,24 @@ (define-public apparmor
(native-inputs (list gettext-minimal perl which))
(inputs (list libapparmor))
(license license:gpl2)))
+
+(define-public apparmor-parser
+ (let ((base apparmor))
+ (package
+ (inherit base)
+ (name "apparmor-parser")
+ (arguments
+ (substitute-keyword-arguments (package-arguments base)
+ ((#:phases phases)
+ #~(modify-phases #$phases
+ (replace 'change-directory
+ (lambda _
+ (chdir "parser")))
+ (add-after 'change-directory 'fix-kernel-header-path
+ (lambda* (#:key inputs #:allow-other-keys)
+ (substitute* "Makefile"
+ (("/include/linux/capability.h" path)
+ (search-input-file inputs path)))))))))
+ (native-inputs
+ (modify-inputs (package-native-inputs base)
+ (append bison flex python-minimal))))))