mirror of
https://git.in.rschanz.org/ryan77627/guix.git
synced 2024-11-07 15:36:20 -05:00
services: udev: Rewrite udev-rule to use file->udev-rule.
* gnu/services/base.scm (udev-rule): Use file->udev-rule.
This commit is contained in:
parent
cde1becfab
commit
c2c29eb1b4
1 changed files with 1 additions and 13 deletions
|
@ -2262,19 +2262,7 @@ (define (rules-sub-directory directory)
|
|||
|
||||
(define (udev-rule file-name contents)
|
||||
"Return a directory with a udev rule file FILE-NAME containing CONTENTS."
|
||||
(computed-file file-name
|
||||
(with-imported-modules '((guix build utils))
|
||||
#~(begin
|
||||
(use-modules (guix build utils))
|
||||
|
||||
(define rules.d
|
||||
(string-append #$output "/lib/udev/rules.d"))
|
||||
|
||||
(mkdir-p rules.d)
|
||||
(call-with-output-file
|
||||
(string-append rules.d "/" #$file-name)
|
||||
(lambda (port)
|
||||
(display #$contents port)))))))
|
||||
(file->udev-rule file-name (plain-file file-name contents)))
|
||||
|
||||
(define (file->udev-rule file-name file)
|
||||
"Return a directory with a udev rule file FILE-NAME which is a copy of FILE."
|
||||
|
|
Loading…
Reference in a new issue