From mboxrd@z Thu Jan 1 00:00:00 1970 From: mlell@posteo.de Subject: Re: guix environment shebang interpreter Date: Fri, 07 Feb 2020 15:57:43 +0100 Message-ID: <5b97063254662ed22e22bd9cc9c0bcef@posteo.de> References: Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from eggs.gnu.org ([2001:470:142:3::10]:58666) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1j054m-0002WS-Rm for help-guix@gnu.org; Fri, 07 Feb 2020 09:57:50 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1j054l-0003bC-KH for help-guix@gnu.org; Fri, 07 Feb 2020 09:57:48 -0500 Received: from mout01.posteo.de ([185.67.36.65]:47323) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1j054l-0003Rh-3B for help-guix@gnu.org; Fri, 07 Feb 2020 09:57:47 -0500 Received: from submission (posteo.de [89.146.220.130]) by mout01.posteo.de (Postfix) with ESMTPS id 59DE8160066 for ; Fri, 7 Feb 2020 15:57:44 +0100 (CET) In-Reply-To: List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-guix-bounces+gcggh-help-guix=m.gmane-mx.org@gnu.org Sender: "Help-Guix" To: "John D. Boy" Cc: Help-Guix , help-guix@gnu.org Great! however, note that at two different time points, you can get different versions of python with this command as the executing machine might have different versions of guix. Only if you pull a specific version of guix (e.g. with guix pull --commit) and have it in your PATH you will get the same packages. Best regards, Moritz --- OpenPGP: 0xB4CCD0677340821E Am 07.02.2020 00:22 schrieb John D. Boy: >> > Is there a Guix equivalent of the nix-shell shebang? >> You could imagine something like: >> >> #! /usr/bin/env guix environment --ad-hoc PKG1 PKG2 ... -- >> INTERPRETER >> >> But alas, on linux you cannot put more than one argument in the >> shebang >> line. > > I have successfully gotten this to work by passing -S to env: > #!/usr/bin/env -S guix environment --ad-hoc python python-pandas > python-numpy -- python3 > > See a short test script here: > https://gist.github.com/jboynyc/1faa5dc4e278d5b6284795f780d22764