From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.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 cIZbDYVzxmOItgAAbAwnHQ (envelope-from ) for ; Tue, 17 Jan 2023 11:08:05 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id AMyQDIVzxmMHuwAAG6o9tA (envelope-from ) for ; Tue, 17 Jan 2023 11:08:05 +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 114C4BC30 for ; Tue, 17 Jan 2023 11:08:05 +0100 (CET) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1pHisb-0005vF-PB; Tue, 17 Jan 2023 05:07:45 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHisH-0005uK-SK for guix-devel@gnu.org; Tue, 17 Jan 2023 05:07:30 -0500 Received: from mail-0301.mail-europe.com ([188.165.51.139]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1pHisE-0004Yr-BK for guix-devel@gnu.org; Tue, 17 Jan 2023 05:07:25 -0500 Date: Tue, 17 Jan 2023 10:07:10 +0000 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=lendvai.name; s=protonmail2; t=1673950034; x=1674209234; bh=em1hjlioh2No2EDvmOdNE/GrN92hs+nagirjJj6K7ZQ=; h=Date:To:From:Cc:Subject:Message-ID:In-Reply-To:References: Feedback-ID:From:To:Cc:Date:Subject:Reply-To:Feedback-ID: Message-ID:BIMI-Selector; b=R3CUlhr/G4XviKid4IUAufDfKhIABqMFZFm8I7fOBrLkS48TUJKFrKFWFaxuCL/Pa q+BVLbjTOFhnxh6gNCtXSNRj8kUYxJbVKhkfzyS9q56e+CT1tkogsziA2tfG1JvfOJ pqeTn/XNhCf+hZF5CbOfNUiNpf0+3GDUF3ErHNo3/uXK4PKQmdJjwFpLwbRK7Ifzcn yzADfllDNNSl4WRYK4w1A6ty8anl/M5cI4fKTwqXH9fSqDjdVdLcnunuv+3sQrlK9B bF83oCxD/sZ76gJzJgs62W6TWw783Wax2rBWbqyuvJI7MIPZdI/jnUgr2pRjDVEWEr jF9XIhEuTPaKw== To: Russell Sim From: Attila Lendvai Cc: jgart , John Kehayias , guix-devel@gnu.org Subject: Re: Should Guix support writing CLI Common Lisp scripts? (Think Roswell) Message-ID: In-Reply-To: <87k02cwmk3.fsf@simopolis.xyz> References: <87o7rowre7.fsf@simopolis.xyz> <87r0wkk8kx.fsf@protonmail.com> <24871675f2ccdf7f3c46c46832b3f3f9@dismail.de> <5706580cffe4acd70e7a790ff7df810b@dismail.de> <87k02cwmk3.fsf@simopolis.xyz> Feedback-ID: 28384833:user:proton MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Received-SPF: pass client-ip=188.165.51.139; envelope-from=attila@lendvai.name; helo=mail-0301.mail-europe.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, 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: 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-bounces+larch=yhetil.org@gnu.org X-TUID: lVYlEL6rssJy i have this, which uses guix when available, but works without it, too: the entire file: https://hub.darcs.net/hu.dwim/hu.dwim.environment/browse/bin/build-developm= ent-image.sh it builds an executable SBCL image with every dependency of our project loa= ded. we start it as an inferior for Slime. the essence: #!/usr/bin/env bash #| -*- mode: lisp; coding: utf-8-unix -*- SCRIPT_DIR=3D`dirname "$0"` SCRIPT_DIR=3D`readlink -f ${SCRIPT_DIR}` if command -v guix &> /dev/null; then echo "Guix detected, entering the environment." eval $(guix shell --search-paths libffi openssl sdl2 sdl2-gfx sdl2-image = sdl2-ttf bluez sqlite graphviz libfixposix pkg-config clang-toolchain --dev= elopment sbcl) # this is needed for SBCL to find some of the .so files export LD_LIBRARY_PATH=3D"${LD_LIBRARY_PATH:+${LD_LIBRARY_PATH}:}${LIBRAR= Y_PATH}" echo "Setting LD_LIBRARY_PATH based on LIBRARY_PATH to ${LD_LIBRARY_PATH}= " fi # NOTE: using --script would also imply --no-userinit (i.e. quicklisp would= n't get loaded from .sbclrc), so we use a different trick here to skip the = first line of this shell script file when reading it as a lisp file. exec ${LISP} --noinform --end-runtime-options \ --eval "(require :asdf)" --eval "(asdf:load-system :asdf)" \ --eval "(with-open-file (s \"${0}\" :element-type 'character) (read-line = s) (load s))" \ --end-toplevel-options 2>&1 | tee ${BUILD_LOG_FILE} # let's quit the shell part before the shell interpreter runs on the lisp s= tuff below kill -INT $$ # and from here follows the lisp part that gets "called" above |# (in-package :cl-user) [...] --=20 =E2=80=A2 attila lendvai =E2=80=A2 PGP: 963F 5D5F 45C7 DFCD 0A39 -- =E2=80=9CTo put the world in order, we must first put the nation in order; = to put the nation in order, we must first put the family in order; to put t= he family in order; we must first cultivate our personal life; we must firs= t set our hearts right.=E2=80=9D =09=E2=80=94 Confucius (551=E2=80=93479 BC)