From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms8.migadu.com with LMTPS id UH7RKGaJOmVOcQEAG6o9tA:P1 (envelope-from ) for ; Thu, 26 Oct 2023 17:44:38 +0200 Received: from aspmx1.migadu.com ([2001:41d0:403:4876::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id UH7RKGaJOmVOcQEAG6o9tA (envelope-from ) for ; Thu, 26 Oct 2023 17:44:38 +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 6360C34A3F for ; Thu, 26 Oct 2023 17:44:38 +0200 (CEST) Authentication-Results: aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=rsQtcAqm; dkim=pass header.d=wolfsden.cz header.s=mail header.b=bPLahNZw; dmarc=pass (policy=none) header.from=wolfsden.cz; 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" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1698335078; 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=bvdn1QuDad6Q+VSc29h0CwjiQMWN53vmGNMJpchcCX8=; b=HcIZNbC8z9PetF02Nh+JU/f7aY6dApnVOT4XVLf/vI6TlVtx0QM91vZFAy1PYUwcFDXi2G PkQ5PY9GZJULXsdL6AYgetMCHRhi5gOB3S3ZoCh6KOqaf2o+cIGBkF1OLWvRvM0kfZTiZR irE9Cm30VcOYhdkfMc3Bxqn3XFtqxEhAy3vyEfQ/NVcc5qEVRIYTXxQFqukDjjOWbeJ6el HMOMsxJxwLnNqeOlBZbAquHpftSN/kIrRgY8aTBpHXeZ7IcSel2hoRw3IDQIhPABxeSdYf ycF6BHvi0P0sDzYQEajNurCewtlkqaT+50oGDBDd7f9wh9Q9sdC1xWnITtGNYA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=pass header.d=wolfsden.cz header.s=mail header.b=rsQtcAqm; dkim=pass header.d=wolfsden.cz header.s=mail header.b=bPLahNZw; dmarc=pass (policy=none) header.from=wolfsden.cz; 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" ARC-Seal: i=1; s=key1; d=yhetil.org; t=1698335078; a=rsa-sha256; cv=none; b=jYyGQjxqRMKYb6sj+nLrAUqc1DfPIwx3hANZcJNb7kSvtSh/1meaMLvb14DqtcbySAd8HR cQqT8T0f0+iT8f2Ra8xsUZ6mifZAMrSEBS6EoBlPb4YIOcZmwfnOuSn/6QeLBlmgSrkDMB mFR3z/Cwm9PPCVnRFYnEsC1cvSp/JkEdufQjIRK0/WTir0qJqU8AhdlpGtfu/2E3YDcSjR 4EfmU/p50kjNDCM+B42O4Q1s+79rIukGE8jbYjzkCyTOMjrTXfLYFHbLFqSKfIF/DF5gEb uZOARW0XZARSRmjLWC7WGRJx3Tb5p+WCxFXXWnE3yDWaVM+4JjZaRAvFb9S3iQ== Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qw2WT-0002Pl-M7; Thu, 26 Oct 2023 11:43:49 -0400 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 1qw2WR-0002Pa-Ur for help-guix@gnu.org; Thu, 26 Oct 2023 11:43:47 -0400 Received: from wolfsden.cz ([37.205.8.62]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qw2WP-00063A-3D for help-guix@gnu.org; Thu, 26 Oct 2023 11:43:47 -0400 Received: by wolfsden.cz (Postfix, from userid 104) id 476CB273678; Thu, 26 Oct 2023 15:43:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1698335021; bh=PwXC2WBBbj13dJR3LAT5fe8vHMvuMYPblcHoBEpEHD0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=rsQtcAqm/w3U0sqnMn8XFEu781KzvN0OFPgOy8AbIO7p5e6Pb/Da5ADQhuUld7Eoj EsZV1zFvtdcOArcRiLU86R96J/M6L61tyUIy+CHq1JbC+5j8+ypLhwGkFcmY2mfKNE PO5JMFyK5aPDXO/LHBq/3iUxxVHUEpqn8maRG9FYXzUbTErcVU5VfPBnyJfIkJ+xyD GlsiPyAJLCLYTdATvRB5jrKc3RIoT+Tt483q+P+DX6B7/w5HdfHUtOEWyX6efvENct 8u4V59v6sjJaDTyG5gfa6DuiOoOYWvFNZcRz8BzGa///MSLAPeG6IelMgXKJp41KnG uEuisD8DGEurxT4rIfqTsZpBQzHJI5Dzarjkwq6j4KiWCFZuBjbwZpMFyUdnPz+gU2 CRVqERy65XLNouUoD2NIOi22PAAszkq+cF5SwX9hIBcDRRHj5bpPSzB2l8gHI9pSKj mEMoCiwjc0uqjUfoPzDlKZpUwh5PsiDMo+RrE75XLIFGaCf/8k+gnAd5vyb1KMha6W yY62BSD0rrYBSZiWMlqJFzGm5Q1RtgbdrWErPrGiLlitpkvUDTVBsx1PcoLEn/Glez 0C/x1cmE2eXZJ/MSJ3TIKCRzyXX3XdE8fBaSKgVE52F2l1DdBUzohlLcA2KPVecBkn k+FXoLBprkgpLY/o3AHGLRbs= Received: from localhost (unknown [81.17.16.82]) by wolfsden.cz (Postfix) with ESMTPSA id 24B57273FE0; Thu, 26 Oct 2023 15:43:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=wolfsden.cz; s=mail; t=1698335018; bh=PwXC2WBBbj13dJR3LAT5fe8vHMvuMYPblcHoBEpEHD0=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=bPLahNZwFWSaouZGnbWt9K64BTKvepz5Uaci3ozt43lnunIgjwc63ROLgLffxzxJS mFs6SazVoqsn3zGXIuyKGZbc9xmaTHrRjgYrBTa0e0Tt4A/VRfpFpOcshgEUZZjwYQ GYE5LcYYInmYc6j3vz5U0+HWqgIbyDzKsAGEPABemIJbeNdiKuA1Bq5T+cTRE0VjMx S3wQ7S8YvKRlJKShWb/Hu7xfHrGr2dnpWk0Qqly/cp33YMg3y+Y469BLz1ifV9KQPF R8k91yvwXvi7tJJX5XZeq9aMmm9/naYqq2onPuB3eStIUrDhZXNXYIhSsNewHCugp7 AaxvT8k7ZYV5x3D3+oh24Tzlqy0EuGQ50S7vUCGVEesNpNmYOaulMWIrNhaNBDlUfU S5qseq+qbCN0TzZD75Mgo8u3ypW8BNYKhXzPS7J8PYAgssJ5L8NkivQTVZZKDSWlZc m2yjfOimc2n+ITHouCQQ/9qw/WcRULgfrjFO/DL/S/b0t1olHb1fTDF6nvSFiMQf0n 47lr8qU7t/iH9GK7w9tgaZeClfsnp08IqZznyHtqFYjg9+o2aqcM6SssHzCrGAKxy0 m3TCStA5wrT1lU4z3f0zG4sDt0dFL+7QaotjJ1ZGfhKGt86OXtML3Ia92PRKv4BIal uvsM8nW0jwpUCLRvAuZTfqmI= Received: from localhost (localhost [local]) by localhost (OpenSMTPD) with ESMTPA id 8a4a7006; Thu, 26 Oct 2023 15:43:36 +0000 (UTC) Date: Thu, 26 Oct 2023 17:43:36 +0200 From: Tomas Volf To: Jesse Cc: help-guix@gnu.org Subject: Re: Using local package in shell manifest Message-ID: Mail-Followup-To: Jesse , help-guix@gnu.org References: <6e04801a-dada-4dd2-a857-d58794eea478@millwood.earth> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="SSzccWD1JzOxqwFy" Content-Disposition: inline In-Reply-To: Received-SPF: none client-ip=37.205.8.62; envelope-from=ws@wolfsnet.cz; helo=wolfsden.cz X-Spam_score_int: -16 X-Spam_score: -1.7 X-Spam_bar: - X-Spam_report: (-1.7 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.25, SPF_HELO_PASS=-0.001, SPF_NONE=0.001, UNPARSEABLE_RELAY=0.001 autolearn=no 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: , Errors-To: help-guix-bounces+larch=yhetil.org@gnu.org Sender: help-guix-bounces+larch=yhetil.org@gnu.org X-Migadu-Flow: FLOW_IN X-Migadu-Country: US X-Migadu-Spam-Score: -11.22 X-Spam-Score: -11.22 X-Migadu-Queue-Id: 6360C34A3F X-Migadu-Scanner: mx10.migadu.com X-TUID: DCmBTMDyWts8 --SSzccWD1JzOxqwFy Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On 2023-10-26 10:48:45 -0400, Jesse wrote: > Thanks Tomas, >=20 > I plan to upstream it but there is some more development I'd like to try = out > first. If I put it in the manifest, is there some different syntax I need= to > use? I have been doing some searching and it seems like I would have to w= rap > the "(package ...)" expression in define-public and the use-module seems = to > be a bit different too? I am having trouble finding the distinction in the > manual. My understanding is that for guix.scm, the object returned by the file has = to be a package? and it will be installed. That is why you only need: [..] (package ...) If you would put it into the manifest instead, you can just store it into a variable, it does not even have to be public. So you could do something li= ke: [..] (define crosstool-ng (package ...) ; The very same definition from guix.scm ) (packages->manifest (list crosstool-ng)) ; The variable from above Technically you could even just have ...(list (package ...)), but that woul= d get unwieldy quickly. Since define-public is for exporting symbols from module, it should not be required in this particular case. As far as I can the main difference between guix.scm and manifest.scm is th= at former is expected to produce (=3D=3D have as a last expression) a build-ab= le object (usually package?), and the latter a manifest? object. >=20 > On 10/26/23 10:16, Tomas Volf wrote: > > On 2023-10-25 16:49:43 -0400, Jesse wrote: > > > Hello, > > >=20 > > > I have written a package that I have installed with "guix package > > > --install-from-file=3Dcrosstool-ng.scm". I was able to get it to buil= d and > > > install. I can use it if I do "source ~/.guix-profile/etc/profile". > > >=20 > > > However, I would like to add it to a shell manifest. My manifest just > > > includes > > >=20 > > > (specifications->manifest > > > =A0 (list "gcc" "git" "zsh" "crosstool-ng")) > > >=20 > > > My understanding is that "specifications->manifest" is supposed to se= arch > > > for the packages in the list? It returns the following when I rung "g= uix > > > shell" in the directory with the manifest.scm: > > >=20 > > > guix shell: loading environment from > > > '/home/jesse/Code/guix-tests/manifest.scm'... > > > hint: Consider passing the `--check' option once to make sure your sh= ell > > > does not > > > clobber environment variables. > > >=20 > > > guix shell: error: crosstool-ng: unknown package > > > guix shell: error: failed to load > > > '/home/jesse/Code/guix-tests/manifest.scm': > > > gnu/packages.scm:545:4: In procedure specification->package+output: > > > Throw to key `quit' with args `(1)'. > > >=20 > > > I'd imagine it doesn't know where to look for the package? Is there a= way to > > > tell guix shell where to look? If not, is there a way to include the = package > > > in the manifest file? For what it's worth, I have attached the packag= e file > > > in question. > > I can think of few options: > >=20 > > 0. If it would make sense to upstream the package, you should. That wi= ll solve > > your problem. > >=20 > > 1. Next you could create your own channel, and publish the package ther= e. After > > adding the channel, it should also just work. > >=20 > > 2. You could load the package by an absolute path and use it that way, = something > > like this (untested): > >=20 > > (concatenate-manifests > > (list (specifications->manifest (list "gcc" "git" "zsh")) > > (packages->manifest (list (load "/home/.../crosstool-ng.scm")))= )) > >=20 > > 3. Alternative of the above would be to move the package definition int= o the > > manifest.scm itself, allowing you to drop the load invocation. > >=20 > > Dunno, maybe there are better ways. > >=20 > > > This is also my first foray into Guix and Guile, so I've been kind of > > > banging my head through writing a package and the manual but I got a = little > > > stuck here. > > >=20 > > > Thanks > > > (use-modules > > > (guix packages) > > > (guix git-download) > > > (guix licenses) > > > (guix profiles) > > > (guix build-system gnu) > > > (guix build-system python) > > > (guix build utils) > > > (gnu packages python) > > > (gnu packages autotools) > > > (gnu packages gettext) > > > (gnu packages texinfo) > > > (gnu packages pkg-config) > > > (gnu packages base) > > > (gnu packages flex) > > > (gnu packages gawk) > > > (gnu packages man) > > > (gnu packages bison) > > > (gnu packages compression) > > > (gnu packages ncurses) > > > ) > > >=20 > > > (package > > > (name "crosstool-ng") > > > (version "1.26.0") > > > (source (origin > > > (method git-fetch) > > > (uri (git-reference > > > (url "https://github.com/crosstool-ng/crosstool-ng.g= it") > > > (commit (string-append "crosstool-ng-" version)))) > > > (sha256 > > > (base32 > > > "04z7zwhxfbjqrd4j16lviilppsd8phwi8zv2rs4jpkmqni6856j1") > > > ) > > > )) > > > (build-system gnu-build-system) > > > (native-inputs > > > (list autoconf > > > automake > > > gettext-minimal > > > libtool > > > texinfo > > > bison > > > flex > > > gawk > > > unzip > > > which > > > help2man > > > python > > > ncurses > > > pkg-config)) > > > (arguments > > > '(#:phases (modify-phases %standard-phases > > > (add-before 'bootstrap 'fix-version-gen > > > (lambda* _ > > > (patch-shebang "mai= ntainer/git-version-gen") > > > ))))) > > >=20 > > > (synopsis "A versatile (cross-)toolchain generator.") > > > (description "A versatile (cross-)toolchain generator.") > > > (home-page "https://crosstool-ng.github.io/docs/") > > > (license gpl2) > > > ) > > T. > >=20 >=20 T. --=20 There are only two hard things in Computer Science: cache invalidation, naming things and off-by-one errors. --SSzccWD1JzOxqwFy Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCgAdFiEEt4NJs4wUfTYpiGikL7/ufbZ/wakFAmU6iSgACgkQL7/ufbZ/ wam/+w//VD8/7U0X5kw6J8zyED24JYgSh7ecDIiJttZHCP7STn8GPKBJn06wwrJO Anu603NouErqqBlu/bhcAsAfi9GaM7P+cqroT8SbUPV0CoNfa6eKvEwp6YGzAbms c5asEyKLM6oytp7YtUim0hHaZdBfqEYNQmXSXbrLDX4xd4nCvt0Sf7EIDP2R9boa 3cVWVoo5WGQXXltggkArmxmREA4Y97U2Z1TqA5UmdeJF2SbGqsHYpJm+47AvM/8H I3S1BDL4bGg5RvC00RrVTpye+kq+FRi4195lS7x9/Hb1OX0rJWziQAq9BZesEL1c ivf/MByFQo2tUsBt2fe21iDjfBMd1wRhsSlzz8yEK09bmMyTjeIgwVHosl5OKNAo G2I5Q8vbDxW5iGFO9PUPNJfCUdJNBfFD0mVdUytEeeD+pWqiMho5uH0G2g/fd8Lm QUR5kNbxpAdLuzmf0m6um5U3xfvE/xbR1n8z3AolF0OyXP8xcC2LEBnBBZKrwthi XwlFnj2C6gefVC1h3VediJtrg7F7TsJbccq2Y/NiWs2lfgVEoJTvXY5+SOyzdYdQ 7MDN1bcCgZrNZUmm3Eud2HSQvqhkpFGD3cP1azWBLQUWlPyK+gJt58YgMLqbjEQI 2CPkV/MWp3+s8ttzFqgqynYRy+RPC55VRHHLVz8aBReaVCSHyg8= =vu06 -----END PGP SIGNATURE----- --SSzccWD1JzOxqwFy--