;;; GNU Guix --- Functional package management for GNU
;;; Copyright © 2016, 2017, 2018 Ricardo Wurmus <rekado@elephly.net>
+;;; Copyright © 2018 Tobias Geerinckx-Rice <me@tobias.gr>
;;;
;;; This file is part of GNU Guix.
;;;
#:use-module (gnu packages pcre)
#:use-module (gnu packages pkg-config)
#:use-module (gnu packages python)
+ #:use-module (gnu packages python-xyz)
#:use-module (gnu packages swig)
#:use-module (gnu packages textutils)
#:use-module (gnu packages xml))
(modify-phases %standard-phases
(delete 'configure)
(add-after 'unpack 'enter-dir
- (lambda _ (chdir ,name) #t)))))
+ (lambda _ (chdir ,name) #t))
+ (add-after 'enter-dir 'portability
+ (lambda _
+ (substitute* "src/ibpkeys.c"
+ (("#include \"ibpkey_internal.h\"" line)
+ (string-append line "\n#include <inttypes.h>\n"))
+ (("%#lx") "%#\" PRIx64 \""))
+ #t)))))
(native-inputs
`(("flex" ,flex)))
(home-page "https://selinuxproject.org/")
#:phases
(modify-phases %standard-phases
(delete 'configure)
+ (delete 'portability)
(add-after 'unpack 'enter-dir
(lambda _ (chdir ,name) #t)))))
(inputs
(define-public libselinux
(package (inherit libsepol)
(name "libselinux")
+ (outputs '("out" "python"))
(arguments
(substitute-keyword-arguments (package-arguments libsepol)
((#:make-flags flags)
(assoc-ref %build-inputs "libsepol")
"/lib/libsepol.a")
(string-append "PYSITEDIR="
- (assoc-ref %outputs "out")
+ (assoc-ref %outputs "python")
"/lib/python"
,(version-major+minor (package-version python))
"/site-packages/")
,flags))
((#:phases phases)
`(modify-phases ,phases
+ (delete 'portability)
(replace 'enter-dir
(lambda _ (chdir ,name) #t))
(add-after 'enter-dir 'remove-Werror
#t))
(add-after 'build 'pywrap
(lambda* (#:key make-flags #:allow-other-keys)
- (zero? (apply system* "make" "pywrap" make-flags))))
+ (apply invoke "make" "pywrap" make-flags)))
(add-after 'install 'install-pywrap
(lambda* (#:key make-flags #:allow-other-keys)
- (zero? (apply system* "make" "install-pywrap" make-flags))))))))
+ (apply invoke "make" "install-pywrap" make-flags)))))))
;; These libraries are in "Requires.private" in libselinux.pc.
(propagated-inputs
`(("libsepol" ,libsepol)
,flags))
((#:phases phases)
`(modify-phases ,phases
+ (delete 'portability)
(replace 'enter-dir
(lambda _ (chdir ,name) #t))
(add-after 'build 'pywrap
(lambda* (#:key make-flags #:allow-other-keys)
- (zero? (apply system* "make" "pywrap" make-flags))))
+ (apply invoke "make" "pywrap" make-flags)))
(add-after 'install 'install-pywrap
(lambda* (#:key make-flags #:allow-other-keys)
- (zero? (apply system* "make" "install-pywrap" make-flags))))))))
+ (apply invoke "make" "install-pywrap" make-flags)))))))
(inputs
`(("libsepol" ,libsepol)
("libselinux" ,libselinux)
,flags)))
((#:phases phases)
`(modify-phases ,phases
+ (delete 'portability)
(replace 'enter-dir
(lambda _ (chdir ,name) #t))))))
(inputs
,@(substitute-keyword-arguments (package-arguments libsepol)
((#:phases phases)
`(modify-phases ,phases
+ (delete 'portability)
(replace 'enter-dir
(lambda _ (chdir "python/sepolgen") #t))
;; By default all Python files would be installed to
`(#:tests? #f ; the test target causes a rebuild
#:phases
(modify-phases %standard-phases
+ (delete 'portability)
(add-after 'unpack 'set-SEPOL-variable
(lambda* (#:key inputs #:allow-other-keys)
(setenv "SEPOL"
#:phases
(modify-phases %standard-phases
(delete 'configure)
+ (delete 'portability)
(add-after 'unpack 'enter-dir
(lambda _ (chdir ,name) #t))
(add-after 'enter-dir 'ignore-/usr-tests