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 oBvwK/SrhmL4oQAAbAwnHQ (envelope-from ) for ; Thu, 19 May 2022 22:43:32 +0200 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 EPulK/SrhmLarwAAauVa8A (envelope-from ) for ; Thu, 19 May 2022 22:43:32 +0200 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 6F8E8253D4 for ; Thu, 19 May 2022 22:43:32 +0200 (CEST) Received: from localhost ([::1]:36822 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrmzb-00009k-AM for larch@yhetil.org; Thu, 19 May 2022 16:43:31 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60946) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrmrK-0000Zd-J4 for guix-devel@gnu.org; Thu, 19 May 2022 16:34:58 -0400 Received: from xavier.telenet-ops.be ([2a02:1800:120:4::f00:14]:42840) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrmrI-0000IQ-C6 for guix-devel@gnu.org; Thu, 19 May 2022 16:34:58 -0400 Received: from ptr-bvsjgyhxw7psv60dyze.18120a2.ip6.access.telenet.be ([IPv6:2a02:1811:8c09:9d00:3c5f:2eff:feb0:ba5a]) by xavier.telenet-ops.be with bizsmtp id Ykar270014UW6Th01kar22; Thu, 19 May 2022 22:34:51 +0200 Message-ID: Subject: Re: Setting environment variables in a profile From: Maxime Devos To: =?ISO-8859-1?Q?Th=E9o?= Maxime Tyburn , guix-devel@gnu.org Date: Thu, 19 May 2022 22:34:46 +0200 In-Reply-To: <877d6h47bw.fsf@gmail.com> References: <877d6h47bw.fsf@gmail.com> Content-Type: multipart/signed; micalg="pgp-sha512"; protocol="application/pgp-signature"; boundary="=-ea87PO1lc4+ojyK/Gp/d" User-Agent: Evolution 3.38.3-1 MIME-Version: 1.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telenet.be; s=r22; t=1652992491; bh=6QNJDDDAJG3MVtjggnjApouF2ME3HOVbSnoa62/t9pc=; h=Subject:From:To:Date:In-Reply-To:References; b=OAvNoz8GrDlyygQD//rkZTYYuNvVWlSl06tML+G5UIhejVFFa1CSb/6HMCKgtg0xu bNeV3O7hz/0vqVqSGCho/lqPLPAnDZnYXWYFTyu59vh5njve60wc6xsmG68aJz0wxa 5ASCO3awkiBA995a30Awae+Ov3vo9QDK+OGybch9LP8yblW1N1VJS4h3AoFwXgBxJP YAm1ptjNbjSuZjoxMTW8+5beDTZpbU2JN3oMrsYeY04lN5nQWTHWSlCxg39orZkmPh sq1K+7iCx8okIzNn8IDCPWzKYiDWMEY0j37PhHxT1/us7hBDHxhn0/XTW8Jo5oYpKR cpQLmYsJLBeKg== Received-SPF: pass client-ip=2a02:1800:120:4::f00:14; envelope-from=maximedevos@telenet.be; helo=xavier.telenet-ops.be X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: guix-devel@gnu.org X-Mailman-Version: 2.1.29 Precedence: list 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+larch=yhetil.org@gnu.org Sender: "Guix-devel" X-Migadu-Flow: FLOW_IN X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1652993012; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to: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=6QNJDDDAJG3MVtjggnjApouF2ME3HOVbSnoa62/t9pc=; b=UvpcGqkeefN7ltcN2fe6MTINcVjvIMnEL9dX7qgl+a2RYXsnOBMwjxdspjDdiIFahueHQq XDeivQ+Wwco1CgMPpHqA3rxXfIssOrlRamXpYl+iQS/EB0q6FDpM9WTLs1XHVi58kndZoZ emdIgPHeOTx3rjbK05UNx0PFUwT+H8hcj1Y4YFfu4hSILYSPpErDtfelhvXL87ZgqUBeMj QxEICSymtwErfFGNq/qgehK/+UQ8zj/d6seCkwaqzVeD4kvmdutOX7kBbdoV0Liob1lDDE md/2+y5Xc9jHfzY1JH8ntD3cpRXMZ+mJRyqTjr3l1jy3pLL5ZOGV/6czlKYGrg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652993012; a=rsa-sha256; cv=none; b=TCiId4c1SrxHL9yIwcTvPperAS18OYi7T0lGh2GdLE0lp0rTjP85uWLdL8UWYGDhx/g/ia EYhWLUvPpV4hTGthBxK1F54CFpd2YIjc3hncRYUVR4Lwghe2VcuQODzGO5Z6AnMMOBLdVA ipkn8Xnd9wk1zrgMAinB+cDgvGAEBPSr+RVI/avfVx4BaSFTWnE7nVVY5buu2i/ip9786i Vdc27pIbxQpWhP27xPFvYHmGxjsmx3402bYvb2RUyF2wdBUzJPXu2TnzpRAOMxqa5cKYVE 3E8/BgO/OhwykLCvhvHgLlkTzCcOPTpzmsnQ0aSC+Dn+5RBJipU0w3whyef7Gg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=OAvNoz8G; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -6.24 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=telenet.be header.s=r22 header.b=OAvNoz8G; dmarc=pass (policy=none) header.from=telenet.be; spf=pass (aspmx1.migadu.com: domain of "guix-devel-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-devel-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 6F8E8253D4 X-Spam-Score: -6.24 X-Migadu-Scanner: scn0.migadu.com X-TUID: jdS8Ncpp1vTN --=-ea87PO1lc4+ojyK/Gp/d Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Th=C3=A9o Maxime Tyburn schreef op do 19-05-2022 om 21:43 [+0200]: > =C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0=C2=A0 (files '("/h= ome/teddd/..." > =C2=A0=C2=A0=C2=A0 "/home/teddd/..." > =C2=A0=C2=A0=C2=A0 "/home/teddd/..."))) This will do PYTHONPATH=3D$GUIX_ENVIRONMENT/home/tedd/...:$GUIX_ENVIRONMENT= /home/tedd/... where $GUIX_ENVIRONMENT is something like '/gnu/store/sgx9l505s7gw1axqnyqvz= 7iabgsni243-profile', which I don't think is what you want here. Additionally, most likely /home= /tedd does not exist in the profile, so they will be ignored and PYTHONPATH won't be s= et. > Another problem I would have with this method is that the last environmen= t > variable I want to set (BLENDER_OPTIONS) is not even a path. I am not > sure it is possible to sepcify a file-type to be "just a string". > Anyway I think this seems to be the wrong approach. >=20 > How would you approach this? I don't think this is currently supported, but I suppose it would be possible to extend guix/profiles.scm and to support this. Maybe an API like: contents of manifest.scm: (manifest (packages->manifest (list python3 blender ...)) (environment-variables ; <-- new field (list (extend-search-path ; <--- new procedure (search-path [...] "PYTHONPATH" [...]) "/home/tedd/...") (with-environment-variable "BLENDER_USER_CONFIG" "...") ; <-- n= ew procedure [...]))) WDYT of this API? Greetings, Maxime. --=-ea87PO1lc4+ojyK/Gp/d Content-Type: application/pgp-signature; name="signature.asc" Content-Description: This is a digitally signed message part Content-Transfer-Encoding: 7bit -----BEGIN PGP SIGNATURE----- iI0EABYKADUWIQTB8z7iDFKP233XAR9J4+4iGRcl7gUCYoap5hccbWF4aW1lZGV2 b3NAdGVsZW5ldC5iZQAKCRBJ4+4iGRcl7g+vAP9rDjuezJjcRNjUp9s9JKHT8aTY o6FHzLJFKOWpKPA4lgEAgCMkwKpGd5uCNn/Ww9rEwAmdbvh0sabKOLAk6Ik2+wo= =6/uj -----END PGP SIGNATURE----- --=-ea87PO1lc4+ojyK/Gp/d--