From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id KPuGN4e83GG/ywAAgWs5BA (envelope-from ) for ; Tue, 11 Jan 2022 00:08:55 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id wEcxMIe83GEAEQEAG6o9tA (envelope-from ) for ; Tue, 11 Jan 2022 00:08:55 +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 5C2353FD34 for ; Tue, 11 Jan 2022 00:08:55 +0100 (CET) Received: from localhost ([::1]:47936 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1n73mX-0002Gp-K7 for larch@yhetil.org; Mon, 10 Jan 2022 18:08:53 -0500 Received: from eggs.gnu.org ([209.51.188.92]:38446) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n73mJ-0002Dd-2g for help-guix@gnu.org; Mon, 10 Jan 2022 18:08:39 -0500 Received: from mail2.fsfe.org ([213.95.165.55]:60238) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1n73mF-0005J6-0v for help-guix@gnu.org; Mon, 10 Jan 2022 18:08:37 -0500 From: Jelle Licht DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fsfe.org; s=2021081301; t=1641856110; h=from:from: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; bh=JsZxySJiGIKM+Fplli2JhHF2qvj+PPcFbJy/zyHp4VM=; b=Cc2ZuMKgJeK/4qnTXKlENJmiFXCpFnv8mGQlDFu0Ter6bSLYAAmzsI0OYxwshQ+lyyo/A8 RYvbWiFfMhX+ANcM8/BCaAaw9E6okCEICjmKhbh5x6mBxurESM007WwJ0VeISqsRJO65pm injWUdypzT+7BRb6/FEJQYxaP2i3E8w= To: t@fullmeta.me, Remco Subject: Re: Web development on Guix: nodejs, npm and all that In-Reply-To: <95b291c9-b95f-488b-82b3-ebc2d3d16533@www.fastmail.com> References: <87y23niukg.fsf@fastmail.com> <877db78z9r.fsf@rwv.io> <95b291c9-b95f-488b-82b3-ebc2d3d16533@www.fastmail.com> Date: Tue, 11 Jan 2022 00:08:29 +0100 Message-ID: <86czkz89zm.fsf@fsfe.org> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=213.95.165.55; envelope-from=jlicht@fsfe.org; helo=mail2.fsfe.org 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, 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.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: help-guix@gnu.org Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1641856135; 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=JsZxySJiGIKM+Fplli2JhHF2qvj+PPcFbJy/zyHp4VM=; b=Y9m/BhCKhgEBzBgbkHlUS9dnqvzLZO4/SGYRJkqQ4B+Vj4/kMZ0HgFyzglDZJLT0K1IU4K wKH0kBnjM63+wJ1oNudVQhmef/hZA0DRKAvvwsKa3Ex45PDLfwBAxWnmBoTywTH9VXsQc+ PB+9vk8fpPEwppCzkLGdjA7HnwcwZYOIMZfbji9UH2vtSkKNqoDQy19S8Pa1Lv0ubUGajR 8GctyprCwHar2k293/IN9YBhRCIJjfrO+p4nHk0KPgp9kgPi5TbPnvWZEvXZIpIBdEHFK+ LVDKhVYkcAYdXUVAviAa3lUuLidILDZe//wEEXkV2KgZYm1qD/bHQdoxYz1x8Q== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1641856135; a=rsa-sha256; cv=none; b=mYap4X4uHBmHFcWqLu7qR6CfTIZgAh/4+oHaD/gDEDqnVW5qgW7LAdlZ2ztBvrLFWCyJLA kj3hXhlcXTf0sc3dagyh5/xKhSiyPhjd77qq+fkZu+N32LQz6YxIpevHvJbdZjfUXcJhCx X5KmCF8ZkEUy/SVkKVWNXh7mnzoytDd7Kve1vsTUByoFmAyJGPVg/bsvnd02BD41VYw8Qd QrBSFuM9XMFNY/dwqZhLSwbCB2MC9Op1+raUn+mQobdY5O3O4RPUyl3lJ5u2kOAdluA441 O0+fQ7S9WPq2TqKU64oGEaFvbQRFBGkZQlFDDeq6+oWAGyANIL7xxuw/MKBssQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fsfe.org header.s=2021081301 header.b=Cc2ZuMKg; dmarc=pass (policy=none) header.from=fsfe.org; 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" X-Migadu-Spam-Score: -6.31 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fsfe.org header.s=2021081301 header.b=Cc2ZuMKg; dmarc=pass (policy=none) header.from=fsfe.org; 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" X-Migadu-Queue-Id: 5C2353FD34 X-Spam-Score: -6.31 X-Migadu-Scanner: scn1.migadu.com X-TUID: mE2Z6SMOa4Fl t@fullmeta.me writes: >> I haven't encountered any npm package which doesn't work when not >> installed globally yet and it seems to me that would be a bug in said >> package. > > this is certainly great to hear! Thank you > > I've been trying to do all setup via `guix shell --container`. Is there an easy (obvious) way to extend environment inside the container? I can --preserve etc, but doesn't look like I can easily change e.g. PATH to ensure it includes local node_modules/bin. Maybe the better way would be to have the ability to set GUIX_ENVIRONMENT to a profile that you tweak which sets env vars apprpiately. I feel like maybe I'm already asking too much of the guix shell CLI front end and maybe I'm better of reversing what relevant .scm script does setting up container's environment and just drop my modified .scm script to a project dir. I hate mucking with BASH and such - never ends well and never goes smoothly. Would prefixing your commands with 'npx' work? I can't recall any major issues running some tools that were installed in node_modules/bin via guix's node/npm. > > Anyone has suggestions? Basically at this point we are trying to go slightly above what `guix shell --container` or even `guix shell` can do. Something that I feel amounts to (in non-guix world) to running a sort of .loginrc script when you enter the environment or container. I don't believe there is a clean solution for doing these things, but you can probably cobble something together with bash and the --expose flag of 'guix shell' As other folks mentioned, this does seem more easily solved using direnv, so that's probably what I would go for. - Jelle