unofficial mirror of help-guix@gnu.org 
 help / color / mirror / Atom feed
From: zimoun <zimon.toutoune@gmail.com>
To: Olivier Dion <olivier.dion@polymtl.ca>, help-guix@gnu.org
Subject: Re: guix-pack on package record
Date: Mon, 22 Aug 2022 17:08:38 +0200	[thread overview]
Message-ID: <87czcs5n9l.fsf@gmail.com> (raw)
In-Reply-To: <87r11ek2my.fsf@laura>

Hi Olivier,

On mer., 17 août 2022 at 16:59, Olivier Dion via <help-guix@gnu.org> wrote:

> (define* (bundle-package package . rest)
>
>   (define manifest (packages->manifest (list package)))
>   (define profile (profile (content manifest)))
            –^       –^ 

Well, I do not think the compiler likes that.  From “guix repl”, it
raises the message:

;;; <unknown-location>: warning: possibly unbound variable `content'

and then ’bundle-package’ fails with:

ice-9/boot-9.scm:1685:16: In procedure raise-exception:
error: content: unbound variable


>
>   (run-with-store (open-connection)
>     (mlet %store-monad ((drv (apply self-contained-tarbar
                                                         –^
                                                     typo

It is ’self-contained-tarball’ from (guix scripts pack), I guess.


Otherwise, it does the same thing as “guix pack foo”.

--8<---------------cut here---------------start------------->8---
scheme@(guix-user)> ,use(gnu packages base)
scheme@(guix-user)> (bundle-package hello)
$1 = "/gnu/store/riyxydg95yyczl6w4dv9j1rd9m1jbq1h-hello.tar.gz"
scheme@(guix-user)> ,q

$ guix pack hello
/gnu/store/0s6z9w6giwjh80ks4f3hwbhb1g9nhh8c-hello-tarball-pack.tar.gz

$ shasum                                                     \
    /gnu/store/riyxydg95yyczl6w4dv9j1rd9m1jbq1h-hello.tar.gz \
    /gnu/store/0s6z9w6giwjh80ks4f3hwbhb1g9nhh8c-hello-tarball-pack.tar.gz 
d326ee555dde564e357e3aa4d66a4497306fc12e  /gnu/store/riyxydg95yyczl6w4dv9j1rd9m1jbq1h-hello.tar.gz
d326ee555dde564e357e3aa4d66a4497306fc12e  /gnu/store/0s6z9w6giwjh80ks4f3hwbhb1g9nhh8c-hello-tarball-pack.tar.gz
--8<---------------cut here---------------end--------------->8---

And “guix package foo” can be done from the REPL using ’guix-pack’ from
(guix scripts pack):

--8<---------------cut here---------------start------------->8---
scheme@(guix-user)> ,use(guix scripts pack)
scheme@(guix-user)> (guix-pack "hello")
/gnu/store/0s6z9w6giwjh80ks4f3hwbhb1g9nhh8c-hello-tarball-pack.tar.gz
$1 = #t
--8<---------------cut here---------------end--------------->8---

Somehow, bundle-package is a simplified version without all the
“options“.  But hey, it is always cool to unwrap things and have a
better control. :-)  That’s why Guix is so cool! ;-)


Cheers,
simon


  reply	other threads:[~2022-08-22 17:57 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-08-17 20:38 guix-pack on package record Olivier Dion via
2022-08-17 20:59 ` Olivier Dion via
2022-08-22 15:08   ` zimoun [this message]
2022-08-25  4:24     ` Olivier Dion via

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87czcs5n9l.fsf@gmail.com \
    --to=zimon.toutoune@gmail.com \
    --cc=help-guix@gnu.org \
    --cc=olivier.dion@polymtl.ca \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).