From mboxrd@z Thu Jan 1 00:00:00 1970 From: Robert Vollmert Subject: sharing code between gexps in config.scm Date: Mon, 8 Jul 2019 14:42:35 +0200 Message-ID: Mime-Version: 1.0 (Mac OS X Mail 12.4 \(3445.104.11\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:39283) by lists.gnu.org with esmtp (Exim 4.86_2) (envelope-from ) id 1hkSyo-0006Z2-GS for guix-devel@gnu.org; Mon, 08 Jul 2019 08:42:51 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1hkSyn-00026k-Ms for guix-devel@gnu.org; Mon, 08 Jul 2019 08:42:50 -0400 Received: from mx2a.mailbox.org ([2001:67c:2050:104:0:2:25:2]:46846 helo=mx2.mailbox.org) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1hkSyn-00025U-Go for guix-devel@gnu.org; Mon, 08 Jul 2019 08:42:49 -0400 Received: from smtp2.mailbox.org (smtp2.mailbox.org [IPv6:2001:67c:2050:105:465:1:2:0]) (using TLSv1.2 with cipher ECDHE-RSA-CHACHA20-POLY1305 (256/256 bits)) (No client certificate requested) by mx2.mailbox.org (Postfix) with ESMTPS id 2E871A113F for ; Mon, 8 Jul 2019 14:42:46 +0200 (CEST) Received: from smtp2.mailbox.org ([80.241.60.241]) by spamfilter02.heinlein-hosting.de (spamfilter02.heinlein-hosting.de [80.241.56.116]) (amavisd-new, port 10030) with ESMTP id 5yLepCdYVGjb for ; Mon, 8 Jul 2019 14:42:36 +0200 (CEST) List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: guix-devel@gnu.org Hi, I=E2=80=99m currently writing some slightly repetitive mcron jobs in my config.scm that use gexps / program-file. I=E2=80=99m wondering whether there=E2=80=99s a better way to share code between these than writing a separate scheme file and importing that via with-imported-modules? That approach works, but it=E2=80=99s a bit painful because I can no longer just =E2=80=9Csystem reconfigure=E2=80=9D, but need to deal with = the guile load path. Also I=E2=80=99d prefer to have config.scm = self-contained. It turns out to not be possible to use a config.scm-level function via e.g. (#$funcname arg1 arg2) for what are probably good reasons. Cheers Robert