From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp12.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id nzsNMhNnL2M39wAAbAwnHQ (envelope-from ) for ; Sat, 24 Sep 2022 22:22:43 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp12.migadu.com with LMTPS id CPnNMBNnL2PVHQAAauVa8A (envelope-from ) for ; Sat, 24 Sep 2022 22:22:43 +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 41CCA35ABD for ; Sat, 24 Sep 2022 22:22:43 +0200 (CEST) Received: from localhost ([::1]:49718 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1ocBfe-0008PZ-AM for larch@yhetil.org; Sat, 24 Sep 2022 16:22:42 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:37828) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocBPu-0005vJ-I8 for help-guix@gnu.org; Sat, 24 Sep 2022 16:06:28 -0400 Received: from relay12.mail.gandi.net ([2001:4b98:dc4:8::232]:46169) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1ocBPs-0007se-FO for help-guix@gnu.org; Sat, 24 Sep 2022 16:06:26 -0400 Received: (Authenticated sender: me@fabionatali.com) by mail.gandi.net (Postfix) with ESMTPSA id E1083200002 for ; Sat, 24 Sep 2022 20:06:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fabionatali.com; s=gm1; t=1664049979; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type; bh=KSDnDBUXeuczxge4CHH+M3z8Xv/WlgsZ/Ewhd8MQCa0=; b=OAwUfDLXJL1OiDKM0RBP11Npi7L5PvaZTkYD8QCryXEuY7KLcjRpd1fSXpmiPZGAudEwHT lXe7nqfEIsAsxrR/fPe1UL7Ui1RMFwAs43r2iM1uD4zY85phfgScWKNLfmcBvu1tLeedhi u3E7CchNOuD6dylOfrwMzBOAPl23Lkq8eenrl6W02xyKEWWqcWUYy8WYrJfF29D5yAdAV2 eyjOUTnw5hM6o6jkDOBwrORkqjPMxrG0/PcslXhUr4z7POcNKnHa6TF8MK2khsoVo9GAra WQWK2Ao79d/fNEEqKOmtLbKgY1sqesPMDok1UGtG7r3yHpGKPKN4O2VKh38KHg== From: Fabio Natali To: help-guix@gnu.org Subject: Guix Home, .local/bin executable scripts Date: Sat, 24 Sep 2022 21:06:18 +0100 Message-ID: <87r100czb9.fsf@reckondigital.com> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: pass client-ip=2001:4b98:dc4:8::232; envelope-from=me@fabionatali.com; helo=relay12.mail.gandi.net X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 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_LOW=-0.7, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sat, 24 Sep 2022 16:22:22 -0400 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: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: "Help-Guix" 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=1664050963; 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:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=KSDnDBUXeuczxge4CHH+M3z8Xv/WlgsZ/Ewhd8MQCa0=; b=m5GY9ZSbi8fZmBXMM/osSDTH2WK4GQVPHZ3rnuIih1GFPoKiw0Vclpf7RaO9E5jBOTNT5V 180/wva8BuhaP1CQ22km3RGGiLHtfACdvEjLGQiH+HG7jD7ajNhMLhLKd+DDP9lsgyt66v HEyhSYQDURPhCU6Xcv8AELkXx0Tpn9F2zyAlBgwK1XNxOxu5TTaBekOk97Ew6RzYA8x835 g81E9EP1R3+KVKmVaFcx0ecrTu7HTW5AXeuR+l76d3ve/3LXdaWjBnQuENYOl9I/I4VRjO y/kdFBmp18YanMt/uKhz09veDuB4ZRx0IG20K8pA7KTm2wGo8DPvupH+/wKuyg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1664050963; a=rsa-sha256; cv=none; b=Hsm89wEFCdFC6+3Xj108hPTIZuSoIfFA8ka1OHiAtuKzA3N4ZxNjsUOfg2NLg9M3OG/9oD eFAK4/OdKaie4/kHFdZOiVuCqpD6xRdxQEXWntnvYnm4crQI9nzVPSqk0dNcPjd0Kmn/6J /mj+Za6hvA8F+kH7+cdewgLoWdW7xCm7tyt46406OzG51rK7y+k6xwqTb4nFVPNMAzQvJx A59aOggWD2TGlk37sHvs4TpT/EDJ1cHeIt4Ci7zer8LRVqPdhGrBVFsQGIziz3em4ryAH2 nbdoGEJ3lh59EKKXoFUdivW63JWxxQJ9bMjUHViMzRytanen3iI8VZK8F72oFA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=fabionatali.com header.s=gm1 header.b=OAwUfDLX; dmarc=none; 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: -1.95 Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=fabionatali.com header.s=gm1 header.b=OAwUfDLX; dmarc=none; 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: 41CCA35ABD X-Spam-Score: -1.95 X-Migadu-Scanner: scn1.migadu.com X-TUID: eXyC/Oj1tRS8 Dear All, I've recently started exploring Guix Home. I was able to create a few simple services for some of my apps, e.g. Emacs. I've now come to a point where I'd like to add some executables to my configuration, e.g. some of my `.local/bin' scripts. Consider this `hello.sh' script, for example: ,---- | #!/bin/bash | | echo "Hello World" | sed "s/World/Guix/" `---- The following service copies `hello.sh' to the expected destination and does so while preserving the correct permissions (`#:recursive #t'), i.e. the file is executable. ,---- | (define my/home-hello-service | (service | (service-type | (name 'home-hello) | (extensions | (list | (service-extension | home-files-service-type | (lambda (config) | `((".local/bin/hello.sh" | ,(local-file "scripts/hello.sh" #:recursive? #t))))))) | (default-value #f) | (description "My valuable Hello World script.")))) `---- The script shows up in my Guix Home but it won't work - I suppose that `/bin/bash' should be replaced with the correct Bash store path? ,---- | ~$ hello.sh | -bash: ~/.local/bin/hello.sh: /bin/bash: bad interpreter: No such file or directory `---- I've been looking at the docs and found something that feels related to my problem (e.g. `computed-file', `substitute*', ...?) but I'd appreciate if someone could point me in the right direction. Thanks, best, Fabio.