mirror of
https://git.savannah.gnu.org/git/guix.git
synced 2025-02-07 19:39:34 +01:00
gnu: python-sepolgen: Use G-expression and remove labels.
* gnu/packages/selinux.scm (python-sepolgen)[arguments]: Convert to G-expression. Don't refer to python by label. [inputs]: Remove labels.
This commit is contained in:
parent
71d07d821d
commit
46bb84bb57
1 changed files with 34 additions and 32 deletions
|
@ -251,12 +251,13 @@ binary policies.")
|
||||||
(package/inherit libsepol
|
(package/inherit libsepol
|
||||||
(name "python-sepolgen")
|
(name "python-sepolgen")
|
||||||
(arguments
|
(arguments
|
||||||
`(#:modules ((srfi srfi-1)
|
(substitute-keyword-arguments (package-arguments libsepol)
|
||||||
|
((#:modules _ #~%gnu-build-system-modules)
|
||||||
|
'((srfi srfi-1)
|
||||||
(guix build gnu-build-system)
|
(guix build gnu-build-system)
|
||||||
(guix build utils))
|
(guix build utils)))
|
||||||
,@(substitute-keyword-arguments (package-arguments libsepol)
|
|
||||||
((#:phases phases)
|
((#:phases phases)
|
||||||
`(modify-phases ,phases
|
#~(modify-phases #$phases
|
||||||
(delete 'portability)
|
(delete 'portability)
|
||||||
(replace 'enter-dir
|
(replace 'enter-dir
|
||||||
(lambda _ (chdir "python/sepolgen")))
|
(lambda _ (chdir "python/sepolgen")))
|
||||||
|
@ -264,26 +265,27 @@ binary policies.")
|
||||||
;; $out/gnu/store/...-python-.../, so we override the
|
;; $out/gnu/store/...-python-.../, so we override the
|
||||||
;; PACKAGEDIR to fix this.
|
;; PACKAGEDIR to fix this.
|
||||||
(add-after 'enter-dir 'fix-target-path
|
(add-after 'enter-dir 'fix-target-path
|
||||||
(lambda* (#:key inputs outputs #:allow-other-keys)
|
(lambda* (#:key inputs #:allow-other-keys)
|
||||||
(let ((get-python-version
|
(let ((get-python-version
|
||||||
;; FIXME: copied from python-build-system
|
;; FIXME: copied from python-build-system
|
||||||
(lambda (python)
|
(lambda (python)
|
||||||
(let* ((version (last (string-split python #\-)))
|
(let* ((version (last (string-split python #\-)))
|
||||||
(components (string-split version #\.))
|
(components (string-split version #\.))
|
||||||
(major+minor (take components 2)))
|
(major+minor (take components 2)))
|
||||||
(string-join major+minor ".")))))
|
(string-join major+minor "."))))
|
||||||
|
(python (dirname (dirname (search-input-file
|
||||||
|
inputs "bin/python3")))))
|
||||||
(substitute* "src/sepolgen/Makefile"
|
(substitute* "src/sepolgen/Makefile"
|
||||||
(("^PACKAGEDIR.*")
|
(("^PACKAGEDIR.*")
|
||||||
(string-append "PACKAGEDIR="
|
(string-append "PACKAGEDIR="
|
||||||
(assoc-ref outputs "out")
|
#$output
|
||||||
"/lib/python"
|
"/lib/python"
|
||||||
(get-python-version
|
(get-python-version python)
|
||||||
(assoc-ref inputs "python"))
|
|
||||||
"/site-packages/sepolgen")))
|
"/site-packages/sepolgen")))
|
||||||
(substitute* "src/share/Makefile"
|
(substitute* "src/share/Makefile"
|
||||||
(("\\$\\(DESTDIR\\)") (assoc-ref outputs "out")))))))))))
|
(("\\$\\(DESTDIR\\)") #$output)))))))))
|
||||||
(inputs
|
(inputs
|
||||||
`(("python" ,python-wrapper)))
|
(list python-wrapper))
|
||||||
(native-inputs '())
|
(native-inputs '())
|
||||||
(synopsis "Python module for generating SELinux policies")
|
(synopsis "Python module for generating SELinux policies")
|
||||||
(description
|
(description
|
||||||
|
|
Loading…
Add table
Reference in a new issue