guix_mirror_bot pushed a commit to branch master
in repository guix.

commit 455f9948dc12b3934747f0a3078f0cecd476910f
Author: Sharlatan Hellseher <[email protected]>
AuthorDate: Thu Sep 3 14:39:58 2026 +0100

    gnu: python-setools: Simplify.
    
    * gnu/packages/selinux.scm (python-setools):
    [phases]{portability}: Preserve phase.
    {pre-build}: New phase merging {set-SEPOL-variable, set-checkpolicy-env}
    phases.
    {fix-tests}: Rename to {remove-local-source} commonly use for that case.
    [native-inputs]: Replace swig-4.0 with swig-4.4.
---
 gnu/packages/selinux.scm | 17 +++++++----------
 1 file changed, 7 insertions(+), 10 deletions(-)

diff --git a/gnu/packages/selinux.scm b/gnu/packages/selinux.scm
index 24b248f585..9f794015e9 100644
--- a/gnu/packages/selinux.scm
+++ b/gnu/packages/selinux.scm
@@ -324,29 +324,26 @@ based on required access.")
       #:test-flags #~(list "tests")
       #:phases
       #~(modify-phases %standard-phases
-          (delete 'portability)
-          (add-after 'unpack 'set-SEPOL-variable
+          (add-before 'build 'pre-build
             (lambda* (#:key inputs #:allow-other-keys)
               (setenv "SEPOL"
-                      (search-input-file inputs "/lib/libsepol.a"))))
-          ;; tests assume /usr/bin/checkpolicy, override with
-          ;; CHECKPOLICY env variable
-          (add-before 'check 'set-checkpolicy-env
-            (lambda* (#:key inputs #:allow-other-keys)
+                      (search-input-file inputs "/lib/libsepol.a"))
+              ;; Tests assume /usr/bin/checkpolicy, override with
+              ;; CHECKPOLICY env variable.
               (setenv "CHECKPOLICY"
                       (search-input-file inputs "/bin/checkpolicy"))))
-          (add-before 'check 'fix-tests
+          (add-before 'check 'remove-local-source
             (lambda _
               (delete-file-recursively "setools"))))))
     (native-inputs
      (list bison
+           checkpolicy
            flex
            python-cython
-           swig-4.0
            python-pytest
            python-pytest-qt
            python-setuptools
-           checkpolicy))
+           swig-4.4))
     (inputs
      (list libsepol
            libselinux

Reply via email to