From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id sv/CM+PTSGAjGwAA0tVLHw (envelope-from ) for ; Wed, 10 Mar 2021 14:12:51 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mnkBL+PTSGCNEQAAbx9fmQ (envelope-from ) for ; Wed, 10 Mar 2021 14:12:51 +0000 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 26B531E864 for ; Wed, 10 Mar 2021 15:12:51 +0100 (CET) Received: from localhost ([::1]:52754 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lJzZy-0004nn-7c for larch@yhetil.org; Wed, 10 Mar 2021 09:12:50 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]:60218) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lJzZY-0004ma-12 for help-guix@gnu.org; Wed, 10 Mar 2021 09:12:24 -0500 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]:37624) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lJzZW-0006JD-20 for help-guix@gnu.org; Wed, 10 Mar 2021 09:12:23 -0500 Received: by mail-wr1-x42b.google.com with SMTP id v15so23502844wrx.4 for ; Wed, 10 Mar 2021 06:12:21 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:subject:in-reply-to:references:date:message-id:mime-version :content-transfer-encoding; bh=5fH9g7UtdtwYwUaExrJG1TVcTZqNcIXdKI+NAR/Oe38=; b=T0MzMGRWZwcG2bk/tRD4cT/oLL4/0K2S1kY7dF2yVqmdZS2LdXi9goRwOKaN2LdBTp G6UBP6l8FnaYzzIDPldoSS2T5sgOkB3eg8T4CP7G2E8EOSU1eKRF9uUOdbiCJFSInFfP PQmt/Mndwby1MJrdUcl2LEKB42+P988eh71MWkABjYd5gv2pj6TnCWbQ1eUNRh+S9oLU 90AICVfmJervA6XMO/LV9rj3B8mxPZey1a8VPvlpz+zPkpM3IbcnIjXLa270Li8T60fn 4aYxVUf8195anDiV8gNF3Xz6+f9Atmc4i/csQ3UNKgM8FkLC3DhAvtbQDEJPxtQDiThv GcfQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:subject:in-reply-to:references:date :message-id:mime-version:content-transfer-encoding; bh=5fH9g7UtdtwYwUaExrJG1TVcTZqNcIXdKI+NAR/Oe38=; b=WuvbP6NJIq6Sb/yPhMuk61+ryb0j0HkQ/QuXdoWD9sp65E9dIqDVvmTpmR+lr2afkn onp0JUGLYT8tsvV5Ikx4eQlylWiBPVvuPALHfBgrDgdUGFqbkY/H+rVJTgh4YXegjzdU mQQtaTLFlLVCDRmUpWMvPbLY2Nq6WtX++VKQPOzcplqKs8DZ4Ps7MNA/iiNwbGJfWHIn P9XTt09l3UVdUjeMoVsaGay0lmpFdcbTCj00kOgAl5/RHNri4ND5xG0VRJ2Zm3sR9l6t 1+2teieJT3T/vlTr2nxK05CTK2Guu9QuJpoVw5/QYd2wF4fFOyu0z+OCDWaIOH6OThoo By+A== X-Gm-Message-State: AOAM533wE24x9rSm5SnCk4JIeeixr0hTgl6er2DfIIUwYW4LGolyfkM5 6gYZBhSWzrM1ULKmk938H3pxxlJNh6Q= X-Google-Smtp-Source: ABdhPJySftK6bTyQ3rX4ttB3qu6KPwzC73DcvDSGHkHmMwgAJPXaXJVFstWUjalu2AnHcngW7uXZ4w== X-Received: by 2002:adf:ebc9:: with SMTP id v9mr3794906wrn.387.1615385540565; Wed, 10 Mar 2021 06:12:20 -0800 (PST) Received: from lili ([2a01:e0a:59b:9120:65d2:2476:f637:db1e]) by smtp.gmail.com with ESMTPSA id d29sm29558402wra.51.2021.03.10.06.12.19 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 10 Mar 2021 06:12:20 -0800 (PST) From: zimoun To: Pierre-Antoine Bouttier , help-guix Subject: Re: nix shellHook equivalent for guix environment? In-Reply-To: <7663A078-15A7-41AC-BBAB-AED626151B15@univ-grenoble-alpes.fr> References: <7663A078-15A7-41AC-BBAB-AED626151B15@univ-grenoble-alpes.fr> Date: Wed, 10 Mar 2021 15:07:19 +0100 Message-ID: <86k0qfcdbc.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::42b; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x42b.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 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: help-guix@gnu.org X-Mailman-Version: 2.1.23 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" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1615385571; 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: in-reply-to:in-reply-to:references:references:list-id:list-help: list-unsubscribe:list-subscribe:list-post:dkim-signature; bh=5fH9g7UtdtwYwUaExrJG1TVcTZqNcIXdKI+NAR/Oe38=; b=DnCRjCVmWzLjj0Q5XCPmuMGLx6J+1fQVNF9630bJmpbM2fs4LD2UD73llq5zwmCEq2GFOR hJC8w5jNRb7Pg+oaxU0cCaJ17Vae9yIVa0e1gYQ7DpWN2JhV+zntk1THRZpZ0NeagZ+i6d VUY8CHgZec6uQY8JHpyXlwNseiTSt4EvhsDrQhKMJqpISU/GaitsvtHMStJc4gMomomDT8 Dkp/fsoDt33hy3PVMh6C4l0wanr1yl/cLehL17qNPGK51ItLNPu83Ik9OzJroe9Fb0j86O u570P4C9WyCbx6avkLRwUMf0vuSmPKgmFdbZ8izJOFiSFYj9CbdtehppWVoGlg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1615385571; a=rsa-sha256; cv=none; b=i7Dp+d1a9pUKS/caDC5H39ZoFFhO2MzNNZte4vwzOIsDxzwQHBwFRq59cczgDCbsvrZXgu D2vjzUkXWoF6gcy7ALJZE2G0YWjdKa6h/cBHcOH77MffbqmorpCY+irAJ0GmuDd9qegvzI 7AB6buxEy1LbRTj0S1OCzFDLIiJexGVuicsF9TAUmHWOamRsYa4+3ZzAWeLa5NkGUJd0ZL KCbGOg3N6ouXiaJb+hstRQ/L9Yujv1mvsoLBQBBaVO2QiIAqQn98VQlW+V7/LWBCItotWj GwNLMgLANGIN6X/HW6udZ8oKM3nz0gPmyFJPXwESdpVtKITelMMEizWpS8auFQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=T0MzMGRW; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Spam-Score: -2.09 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=gmail.com header.s=20161025 header.b=T0MzMGRW; dmarc=pass (policy=none) header.from=gmail.com; spf=pass (aspmx1.migadu.com: domain of help-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=help-guix-bounces@gnu.org X-Migadu-Queue-Id: 26B531E864 X-Spam-Score: -2.09 X-Migadu-Scanner: scn1.migadu.com X-TUID: 6choDlYUwSjL Hi Pierre-Antoine, On Tue, 09 Mar 2021 at 17:23, Pierre-Antoine Bouttier wrote: > Do you know if there is any equivalent to shellHook, available for the > nix-shell command, for setting up a guix environment through a > manifest.scm file?=20 > > Or maybe another methodology with guix to have approximatively the > same behavior? (i.e. in a file that can be put under version control, > defining dependancies and also init commands to set up a guix > environment)=20 I do not know what shellHook and nix-shell are, well I do not know what they exactly do so it is hard to answer if an equivalent is there or not. :-) Well, I think some UI and interface is missing here, especially to have a manifest containing the inputs of a package. Currently, this ugly: --8<---------------cut here---------------start------------->8--- $ guix environment hello --ad-hoc python -r /tmp/example $ guix package --export-manifest -p /tmp/example ;; This "manifest" file can be passed to 'guix package -m' to reproduce ;; the content of your profile. This is "symbolic": it only specifies ;; package names. To reproduce the exact same profile, you also need to ;; capture the channels being used, as returned by "guix describe". ;; See the "Replicating Guix" section in the manual. (specifications->manifest (list "htop" "tar" "gzip" "bzip2" "xz" "file" "diffutils" "patch" "findutils" "gawk" "sed" "grep" "coreutils" "make" "bash-minimal" "ld-wrapper" "binutils" "gcc" "glibc" "glibc:static" "glibc-utf8-locales" "linux-libre-headers@5.4.20")) --8<---------------cut here---------------end--------------->8--- And what you would like is something like to create a manifest.scm file containing all the inputs of the package hello: --8<---------------cut here---------------start------------->8--- (use-modules (guix) (guix profiles) (guix scripts environment) (gnu packages base)) (make-manifest (package-environment-inputs hello)) --8<---------------cut here---------------end--------------->8--- but =E2=80=99package-environment-inputs=E2=80=99 is not publicly exposed. = Well, there is probably other things in the public API doing something similar as package-environment-inputs. Once you have a profile, you can use it with =E2=80=9Cguix environment=E2= =80=9D and for example launch it in a container: --8<---------------cut here---------------start------------->8--- $ guix environment -C --profile=3D/tmp/example --8<---------------cut here---------------end--------------->8--- However, there is no clean API to do it at the manifest.scm level. Ludo proposed something long time ago but some love for this feature is missing. :-) And the feature requests popups time to time. :-) Hope that helps, simon