From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id QCZPBAyjhmKypwAAbAwnHQ (envelope-from ) for ; Thu, 19 May 2022 22:05:32 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id 6MUbBAyjhmLnFAEAauVa8A (envelope-from ) for ; Thu, 19 May 2022 22:05: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 B082E199C for ; Thu, 19 May 2022 22:05:31 +0200 (CEST) Received: from localhost ([::1]:50852 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nrmOo-0008VZ-S4 for larch@yhetil.org; Thu, 19 May 2022 16:05:30 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:56572) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nrmON-0008Uv-SO for guix-devel@gnu.org; Thu, 19 May 2022 16:05:03 -0400 Received: from mail-ej1-x635.google.com ([2a00:1450:4864:20::635]:47099) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nrmOI-0004it-8W for guix-devel@gnu.org; Thu, 19 May 2022 16:05:03 -0400 Received: by mail-ej1-x635.google.com with SMTP id rs12so218823ejb.13 for ; Thu, 19 May 2022 13:04:57 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=user-agent:from:to:subject:date:message-id:mime-version :content-transfer-encoding; bh=vMrE4h46FidzAUC/yapS3hkfPnMS9cMQSZ2woFIvFJ0=; b=PEGn0hykNyqYZX6J4/xb+UlSXunYLwK3V4WHdKtIVrKwsZUUiK2kziIdWNAkmzN7fI WBvpdAQZBGRj50tLl7OkAiG2Os3SKDIJ/LCTnUzK2G0tdyHgjlak2UJe13Zr0O83LvhT 3s7AyIvrTTho+5v95sCubmKDO/WWdRgcTPpPJSZnChFrJeT17n+yPkMqAfKAj9EFCmMI VTriKHj5VBEzde/VdN1eEUif4CvJxwTl2ZVfyW2bxc2kuoJfS52KWw3/T4VwrHq+EVo6 KaSMedBSMTD5VsfI7OkJz7eK0ZIkHvAVKZGW6W3N62V9A0ZBzlWl6Nj+YyiudI0gLc9x 769A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:user-agent:from:to:subject:date:message-id :mime-version:content-transfer-encoding; bh=vMrE4h46FidzAUC/yapS3hkfPnMS9cMQSZ2woFIvFJ0=; b=rm68bXUq6JcdUdHM1VLkqktZdv0uBL8rsgfN3qws5CE0DOxqGmD/FimkBfe3hRB7pE Ela2aQbwICxE+w5R2jGF2yZQlnCRq5vd5bUj5dT78EtSINYbFcQFnN5gwH4ZXMXy5rYq E669nSs245A6w+krm3W5DafMMQGVszdeaJQJJX1T1jnFnkV7AyrPlw5u7kJcZ/duhPOV A9eCkLbErGw1fr1Jq14HWJjOY6upUJNSd33W+dERiKV9zVslJJMKi2cch4QfzAbtWUDI W78b85vOPymP9x+CW3k88U+QMBrf9cYsLjQOl67VxSEf9xpTCoiWGuJlKAcXym2MJo8Y 5OkQ== X-Gm-Message-State: AOAM530ckgIEkmCe0dGpG04nyNLO8+dMujRAsler/VAxQCRsK6SjRMXS ME+R7Pd/qEBq271SlYQ26v/3kqntz+0= X-Google-Smtp-Source: ABdhPJweTBcErXAguB6/iRHDy4oXat5RKbtftPx0qZJDQn9aapMuM1B007v/oMpW+l++ucXjXPs8HQ== X-Received: by 2002:a17:907:6d14:b0:6f4:a3ab:7548 with SMTP id sa20-20020a1709076d1400b006f4a3ab7548mr5912616ejc.596.1652990696349; Thu, 19 May 2022 13:04:56 -0700 (PDT) Received: from gazelle.gmail.com (p579ad6e4.dip0.t-ipconnect.de. [87.154.214.228]) by smtp.gmail.com with ESMTPSA id qx16-20020a170907b59000b006f3ef214e5esm2376839ejc.196.2022.05.19.13.04.54 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 19 May 2022 13:04:55 -0700 (PDT) User-agent: mu4e 1.6.10; emacs 28.0.90 From: =?utf-8?Q?Th=C3=A9o?= Maxime Tyburn To: guix-devel@gnu.org Subject: Setting environment variables in a profile Date: Thu, 19 May 2022 21:43:12 +0200 Message-ID: <877d6h47bw.fsf@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=2a00:1450:4864:20::635; envelope-from=theo.tyburn@gmail.com; helo=mail-ej1-x635.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 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_NONE=-0.0001, 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=1652990731; 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: content-transfer-encoding:content-transfer-encoding:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=vMrE4h46FidzAUC/yapS3hkfPnMS9cMQSZ2woFIvFJ0=; b=d2hLJJ8ot4+eph5w4mOOblsca8lWK6iF+lbia7BmbA5Zmnv0T4YGbB0IfBwxk6YP9GCWn4 c2b9tBRymyXQQtrEsBaXAPe6oHCez82LdEtprli5kvUO0y5+c0SIgsxxy+XzAgv+D3rOlh qIdzw6+fLxXKkOhE2g3COgoWmRqtYxumr/DXpvccur9ka3QPPuKLpHU9JmlMHxJNoFqLKU xTQfNRNMQfUCYplR8xgK20HDbh6Zv583l8Qsvti5YYZO7pAVZ92ruGqDk0XBl+yFJa2lLE kghZs6Hnx74Q0ZiU+sMs8slgac8fF+7b8feoqsNS3S7ST2QiL388MqvDbKWz9Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1652990731; a=rsa-sha256; cv=none; b=QfyJGleuQ3wafyeTWf6Q3OjQq8niwCs7Xq5QSPWcv4/NEer9+EkU3G8PqEejzUHg7cLgLU nw5XStISXqeOOaPxR/cKGQcjA52aGklCDUsIq3GQc0edH+ZXFG63SGdiQJgJYPoWBymY2b 8z+TfgxEukIAeVbtfhuX9GzCLdBZZN6DM+dUstokFKxRN4QKa0BI/caHKolotVxli4wXOA KMXGt7Gp4rSz2uLZYMoArk0XDUGjsnoboDWRI+lVhOjMJ2ZP3o3XlU9krtndCfMqz2M1Zr powWI0FbORVrNYV+m8U0oNFAi3VEMe8uHINBeriuKRsBrqjrRGbFm0iN92mS+Q== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PEGn0hyk; dmarc=pass (policy=none) header.from=gmail.com; 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: -2.54 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20210112 header.b=PEGn0hyk; dmarc=pass (policy=none) header.from=gmail.com; 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: B082E199C X-Spam-Score: -2.54 X-Migadu-Scanner: scn1.migadu.com X-TUID: w3CEp4Dc9s9F Hi, I would like some environement variables to be present whenever I enter a shell using `guix shell -p ...`. Is there an easy way to do this? I tried it this way: in the manifest file I use to define the profile, I define a package and set some (native)-search-paths. Unfortunatly this It didn=E2=80=99t work for some reason I ignore. The environment variables are not there when I enter the shell or source the profile directly. Here is the code --8<---------------cut here---------------start------------->8--- (define my-env (package (version "0")=20=20=20=20 (source #f) (build-system trivial-build-system) (arguments '(#:builder (mkdir %output))) (synopsis "Empty package") (description "This package creates its store directory and nothing more.") (home-page #f) (license license:gpl3+) (name "my-env") (native-search-paths (list (search-path-specification (variable "PYTHONPATH") (files '("/home/teddd/..." "/home/teddd/..." "/home/teddd/..."))) (search-path-specification (variable "BLENDER_USER_CONFIG") (files '("..."))) (search-path-specification (variable "BLENDER_OPTIONS") (files '("--python-use-system-env"))) )) (arguments '(#:builder (mkdir %output))) )) --8<---------------cut here---------------end--------------->8--- Another problem I would have with this method is that the last environment 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. How would you approach this? I konw direnv and other utils to set environment variables exist, I miself use a bash script to initialize my profiles with variables I want. But it would just be much more convinient to be able to define arbitr= ary env variables in a guix manifest and enter a shell with everything you need. Best, Th=C3=A9o