From c2c29eb1b451da919e0f9b41d3ca3506ebadd1ec Mon Sep 17 00:00:00 2001 From: Vivien Kraus Date: Thu, 5 Oct 2023 19:33:24 +0200 Subject: services: udev: Rewrite udev-rule to use file->udev-rule. * gnu/services/base.scm (udev-rule): Use file->udev-rule. --- gnu/services/base.scm | 14 +------------- 1 file changed, 1 insertion(+), 13 deletions(-) (limited to 'gnu/services/base.scm') 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." -- cgit v1.2.3