radix/system/setuid.scm

16 lines
600 B
Scheme

(define-module (radix system setuid)
#:use-module (pipe)
#:use-module (ice-9 match)
#:use-module (radix utils)
#:use-module (gnu system setuid)
#:export (map-setuid-programs))
(define-syntax-rule
(map-setuid-programs (package package-programs) clause ...)
(map (match-lambda ((package-program . package)
(setuid-program
(program (->> package-program
(string-append "/bin/")
(file-append package))))))
(associate-right (package package-programs) clause ...)))