From 081221ca29f604973fb39c32afc0d0346696b346 Mon Sep 17 00:00:00 2001 From: Peter Tillemans Date: Tue, 22 Jul 2025 12:37:31 +0200 Subject: [PATCH] Revert "remove unneeded function" This reverts commit 12831962d7664f2c19689871f977670c197ad409. --- snamellit/common.scm | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/snamellit/common.scm b/snamellit/common.scm index c5403c0..baf819a 100644 --- a/snamellit/common.scm +++ b/snamellit/common.scm @@ -278,6 +278,21 @@ (service home-mcron-service-type) )) +;; add folders at the end of a PATH like string, removing duplicates but +;; keeping the order of first occurrence +(define + (add-folders-to-path path folders) + (if + (null? folders) + (string-join + (delete-duplicates + (string-split path #\:)) + ":") + (add-folders-to-path + (string-append path ":" + (car folders)) + (cdr folders)))) + (define-public %snam-desktop-services (list (service home-dbus-service-type)