diff options
author | Vivien Kraus <vivien@planete-kraus.eu> | 2023-10-05 19:33:24 +0200 |
---|---|---|
committer | Liliana Marie Prikler <liliana.prikler@gmail.com> | 2023-10-10 21:59:24 +0200 |
commit | c2c29eb1b451da919e0f9b41d3ca3506ebadd1ec (patch) | |
tree | b9e86ef01691c83d9a9caa97cc3bc9bb885d56f8 | |
parent | cde1becfaba7a5757b881a5940ef0c6c2a70794f (diff) | |
download | guix-c2c29eb1b451da919e0f9b41d3ca3506ebadd1ec.tar guix-c2c29eb1b451da919e0f9b41d3ca3506ebadd1ec.tar.gz |
services: udev: Rewrite udev-rule to use file->udev-rule.
* gnu/services/base.scm (udev-rule): Use file->udev-rule.
-rw-r--r-- | gnu/services/base.scm | 14 |
1 files changed, 1 insertions, 13 deletions
diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 98d59fd36d..8b54f30ef6 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -2262,19 +2262,7 @@ item of @var{packages}." (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." |