From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id GFlRJAFP7mNY2wAAbAwnHQ (envelope-from ) for ; Thu, 16 Feb 2023 16:42:57 +0100 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id +PQqJAFP7mMVRgEAauVa8A (envelope-from ) for ; Thu, 16 Feb 2023 16:42:57 +0100 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 136D23A045 for ; Thu, 16 Feb 2023 16:42:56 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pSgPA-00039W-WF; Thu, 16 Feb 2023 10:42:41 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pSgP6-0002v6-CE for help-guix@gnu.org; Thu, 16 Feb 2023 10:42:37 -0500 Received: from mail-wm1-x335.google.com ([2a00:1450:4864:20::335]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1pSgP4-0004QU-Do for help-guix@gnu.org; Thu, 16 Feb 2023 10:42:36 -0500 Received: by mail-wm1-x335.google.com with SMTP id g6-20020a05600c310600b003e1f6dff952so4544616wmo.1 for ; Thu, 16 Feb 2023 07:42:34 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender:from:to :cc:subject:date:message-id:reply-to; bh=97WxZeIEcr913WAoOQtDeTWUtBJsHnUK6Ya5lU40uzk=; b=mU91i8GVtttrXnqgCXbeX9piBq0UgRoKI/XjWMkcX/ocElTaGnhjuAo9/QYOqhuH8t ZmKFlQDZIXhDhzefmStajieOqJNnEzUEelEHHHxGCELNSHr5MxwkTO+isoZ5ETEJR2Ge U02ejvfABER+ahb4pFw6kL81nb5cqSsYMDdYHc3WDC4V+qrEyUvbujb4brLERv6E7ylD exDYPTTeDvJELGSzaODIDJ+nieZYybyhRqfkqrYjG97N6KPUI+U/t+S3DTwcECuixKia VGBt9bGuVGCsQMsOcP6f4bN4Yp26dKCfjxTCAVTbPictIKk7iINNWUj/d3DbSQ7iVWzl I2ug== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references :mail-followup-to:message-id:subject:cc:to:from:date:sender :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=97WxZeIEcr913WAoOQtDeTWUtBJsHnUK6Ya5lU40uzk=; b=N9WzfOnAHuvdcOWcIuxwPIf4FVA2LpHNryN7ErvhsqJmhSzCTXbDApXO0KlPxmmzWM Gj391Fu0kFMZlTmLHipqHLArKwyGajYNz3tC+arcW2opri8FfofYLHIg8QtHS5c1CyOP I1Xp+foaoEMgcHBzn7xEx9F2gtUKChGBKafqHCn3jYMOFb9l2qc5j9fZowFaL1HSHiQ8 DxbjpTXis3m2Nex6pZsOU/TdGGGoeox7BOclFs4GYtKYYM12GgA8YyYbuUrITci20vnG qIwlmtEtLkm+nUUbrx4oOkxwi3VPyQVcQfD3CiwpnVRBlAB5qDuNKmRK3dxVHIyKkhwN HMFw== X-Gm-Message-State: AO0yUKVq+ORglffQ/wobJfK0B36CrQ9dE7tefRVMAu+rJzHTBKXLMkbQ YD4O/WommU789tm0Rmg921HKZD2GFRGuVSbv X-Google-Smtp-Source: AK7set9JJdUKbSC77BPbSUFmFR6Tl7qRG2g3HQPbEOTRnmA+liPMb5rzO9xZKM1T7ydvLaoYDtFbAw== X-Received: by 2002:a05:600c:2e93:b0:3e0:fda8:7e26 with SMTP id p19-20020a05600c2e9300b003e0fda87e26mr5066650wmn.33.1676562152845; Thu, 16 Feb 2023 07:42:32 -0800 (PST) Received: from localhost ([141.226.15.115]) by smtp.gmail.com with ESMTPSA id l19-20020a7bc353000000b003dc1d668866sm5658286wmj.10.2023.02.16.07.42.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 16 Feb 2023 07:42:32 -0800 (PST) Date: Thu, 16 Feb 2023 17:42:17 +0200 From: Efraim Flashner To: Tom Willemse Cc: help-guix@gnu.org Subject: Re: SCSH libraries search path Message-ID: Mail-Followup-To: Tom Willemse , help-guix@gnu.org References: <871qqoxxyd.fsf@ryuslash.org> <87k03ymkce.fsf@ryuslash.org> <87leo06el4.fsf@ryuslash.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="I+tRVODYyu55/1rQ" Content-Disposition: inline In-Reply-To: <87leo06el4.fsf@ryuslash.org> X-PGP-Key-ID: 0x41AAE7DCCA3D8351 X-PGP-Key: https://flashner.co.il/~efraim/efraim_flashner.asc X-PGP-Fingerprint: A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Received-SPF: pass client-ip=2a00:1450:4864:20::335; envelope-from=efraim.flashner@gmail.com; helo=mail-wm1-x335.google.com X-Spam_score_int: -14 X-Spam_score: -1.5 X-Spam_bar: - X-Spam_report: (-1.5 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FORGED_FROMDOMAIN=0.249, FREEMAIL_FROM=0.001, HEADER_FROM_DIFFERENT_DOMAINS=0.25, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=no autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Country: US X-Migadu-Flow: FLOW_IN ARC-Seal: i=1; s=key1; d=yhetil.org; t=1676562177; a=rsa-sha256; cv=none; b=c8k83FJ3r50x+FE1FRP1LWWSxEsECyWxuwC3cPUYtq4z85Vd2YUNEGi6Xa96ivZB5PyHfi JDLXzwhA8eP+K/3r5cft7vQMccpe0+Q14z6IIm33aUvyTqNNkTPWNU3TT4LoChS7uV3NOr r0vasSccyBni8SMcjfEawArwZniZbKbnQ8xEagpUy+rISk8rsEB4BYTf2kjQF/VdWNsRTe 3siThYlB4tzm6sv4oOwZ8GQPdrMY8oH6/8fpSBoPAekiwkcz1fPC6PstW7j1jFXzbCCnpu nvks3pHi3JqFCp1OS44YolyRWevqzzMbXVbCoWJg90kHUwq16MVbPQoibf2cqQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=mU91i8GV; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1676562177; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=97WxZeIEcr913WAoOQtDeTWUtBJsHnUK6Ya5lU40uzk=; b=ejbmDNFRCJfYvx+tcRHrr3s5ZloW6T21NqjdSxML0oO/DID2vnzPOvdskjSE9MDAmO2uJ6 npjnkEC0E6e2tYgTLB8TbEYvfaezG5UpCr20msyRkUcOrGcm3aV/QFNqA9cXPYqOUoNdZH GmwZ+GQjPqQ3URDQ0chORLyL/9x/HHmNJd3n0fyLdEr2Zyt7pWAtLoxe3rWFsIq8F9dkA6 oInPdnf3A3QR93HSuV2VFQz91FjA4DM5H2fPZPiML26oZcoeLdmTkGS3HH0kTbE8fG3XiV O4RmznD4C4N1Otig7bBslgYVuJp0RWShikW8FNpV+Ci2UY9SJpP9QRNcQlCbSw== Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=mU91i8GV; spf=pass (aspmx1.migadu.com: domain of "help-guix-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="help-guix-bounces+larch=yhetil.org@gnu.org"; dmarc=none X-Migadu-Spam-Score: -2.02 X-Spam-Score: -2.02 X-Migadu-Queue-Id: 136D23A045 X-Migadu-Scanner: scn1.migadu.com X-TUID: lwI2rkQWqzS4 --I+tRVODYyu55/1rQ Content-Type: text/plain; charset=utf-8 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Nov 23, 2022 at 10:39:35PM -0800, Tom Willemse wrote: > Hey Efraim, >=20 > Efraim Flashner writes: >=20 > > On Sun, Nov 13, 2022 at 04:49:05PM -0800, Tom Willemse wrote: > >> Hey Efraim, > >>=20 > >> Efraim Flashner writes: > >>=20 > >> > On Mon, Oct 31, 2022 at 12:18:50AM -0700, Tom Willemse wrote: > >> >> Hey Guix \o/ > >> >>=20 > >> >> I've been wanting to package one of my little scripts in Guix Home = and > >> >> it uses a little library I wrote for SCSH. I've been looking at how > >> >> Search Paths work and I'm having trouble figuring out how to make t= his > >> >> work. > >> >>=20 > >> >> Search paths seem easy enough generally, I was able to add a simple > >> >> addition to my configuration by just adding this to the scsh package > >> >> definition: > >> >>=20 > >> >> (native-search-paths > >> >> (list (search-path-specification > >> >> (variable "SCSH_LIB_DIRS") > >> >> (files '("share/scsh/site"))))) > >> > > >> > Try adding the 'separator' field, so it would look like this: > >> > > >> > (native-search-paths > >> > (list (search-path-specification > >> > (variable "SCSH_LIB_DIRS") > >> > (separator " ") > >> > (files '("share/scsh/site"))))) > >>=20 > >> Thanks for the suggestion! Unfortunately this gets me a value of > >> `SCSH_LIB_DIRS' like > >>=20 > >> /home/chelys/.guix-home/profile/share/scsh-0.7 > >>=20 > >> which, when I try the command `scsh -ll mpd.scm -o mpd' causes the > >> following error to appear: > >>=20 > >> error: Illegal path element in $SCSH_LIB_DIRS > >> $SCSH_LIB_DIRS: /home/chelys/.guix-home/profile/share/scsh-0.7 > >> The following element is not a string or #f: /home/chelys/.guix-ho= me/profile/share/scsh-0.7 > >>=20 > >> It's because SCSH treats the contents of `SCSH_LIB_DIRS' as "a sequence > >> of of s-expressions, which are `read' from the string"[1] and supports > >> either string values or the value #f. So `SCSH_LIB_DIRS' would have to > >> be in this case: > >>=20 > >> "/home/chelys/.guix-home/profile/share/scsh-0.7" > >>=20 > >> I guess this just isn't supported as yet in Guix? > >>=20 > > > > I played around with a bunch of different options, and I wasn't able to > > get the search-path-specification to pass the directories as strings. If > > we change the file-type to 'string then it looks for strings, but it > > really means it's looking for individual files or for directories, so > > that's not the right change. > > > > IMO the easiest way to work around it (from scsh, not from guix) would > > be to use 'stringify' from (scheme utilities) in (scheme lib-dirs) (for > > the syntactic sugar around symbol->string) to make all the items in the > > search path into strings if they aren't already. >=20 > I've tried out your changes and it seems to work just great for my > little module so far, thank you! >=20 > > Actually I have a simple diff I'll send upstream that should take care > > of it. If you could help test it that'd be great. I haven't been able to > > create a scenario where I had more than one path in the SCSH_LIB_DIRS. >=20 > I don't know how I would get more than one value in there with Guix, but > manually adding another path in there works fine: >=20 > > 22:36 ~ [1]> export SCSH_LIB_DIRS=3D"\"${HOME}/usr/share/scsh/\" ${SCSH= _LIB_DIRS}" > > 22:37 ~ [130]> echo $SCSH_LIB_DIRS = =20 > > "/home/chelys/usr/share/scsh/" /home/chelys/.guix-home/profile/share/sc= sh-0.7 > > 22:37 ~ > scsh -ll mpd.scm -o mpd -ll herbstluft.scm -o herbstluft=20 > > Welcome to scsh 0.7 > > Type ,? for help. > > > (query (and (=3D artist "Danko Jones") (=3D album "Garage Rock"))) > > "((artist =3D=3D \"Danko Jones\") AND (album =3D=3D \"Garage Rock\"))" > > > (hc get_attr "my_wallpaper") > > /home/chelys/pictures/wallpaper/5120x1440/nfbq2nw3rsm81.jpg > > 0 I was waiting for upstream to apply the patch and then I realized it had been a while and figured I'd just add it here also. Patch finally applied, scsh now uses the search path SCSH_LIB_DIRS. --=20 Efraim Flashner =D7=90=D7=A4=D7=A8=D7=99=D7=9D = =D7=A4=D7=9C=D7=A9=D7=A0=D7=A8 GPG key =3D A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351 Confidentiality cannot be guaranteed on emails sent or received unencrypted --I+tRVODYyu55/1rQ Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEoov0DD5VE3JmLRT3Qarn3Mo9g1EFAmPuTtYACgkQQarn3Mo9 g1GMkhAAnFML4fYEtDxsjopdSXNdp2kqSTe0fvEeCqWNYO7LoTloiPIGCkyiaAld 6HY+lsTN3h4rydrEc7/z7cMDjKpq/2k5yFBIn7xQA+jAbnQPwM9bZZGmiY2W3eWc B9JEh/xUAxYF7yCzDyuBrG/a3PC2kR2xqOtEmA9TvLtyaodDfWWPYx6RYdHIGisk Z3Zo4DbcpBJGjeQBdICQRLZTLNkMkaHu0Drczj8gvol1fn3OjHb60VbBYWwAxr2F h4NPNnzhU6iTDKOViYU+nHs3haDSul1OaC3shF7rkg6JE7E1yXg46EIKPSDx3+yk HcXwo/JQfcdRT94zyMBoeDLKaHRBrXkj6DGlW48PK2bKYXIMWjnv7vH2ce/AXqHh WPYoLvJdJd2TG+mCpu0tJUpatc8UMb3dahFAkAZIgBuu9vr3UFI2UdqMSeN8NE1U Vr37BVTnVfa1+oreCTQTQotGX6BlwXr1GvkdiHIq5LwJsq1KP/iqTOWA+e88qpwq IF9ox6A5Zz3SWOFJXa1u+YMnkcybZ4AtQFYnYyWT0sf7ybpoaznC+47vCX+GrDrM tPvXML1F+3EcGQAN5Xx3EXfrzTEwjsGRU22PIsTL5gccN28iElCqv2XkzeATafMz rIMPpgf1VNQmes02TM2QbuPMX/PzG5BhtmQj4zzhdhmRwLvnK9w= =lV/e -----END PGP SIGNATURE----- --I+tRVODYyu55/1rQ--