all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
To: "Tomáš Čech" <sleep_walker@gnu.org>
Cc: guix-devel@gnu.org
Subject: Re: ‘guix publish’ now compresses archives
Date: Thu, 21 Jul 2016 07:53:45 +0200	[thread overview]
Message-ID: <87r3anedue.fsf@mdc-berlin.de> (raw)
In-Reply-To: <20160720130559.n44vau4iysyn7qlz@crashnator.suse.cz>


Tomáš Čech <sleep_walker@gnu.org> writes:

> First, I'm not saying that we should do that for every archive, but I
> think that having a way how to automatically export this information
> would be great and I see it as a week point for using Guix packages as
> alternative to Snappy or Flatpak.

Agreed.  I think it’s unfortunate that there is no step in between the
purely symbolic and the purely binary method of sharing environments.

> Now, as long as Guix sources are part of equation and change during
> the time, you may need to keep more Guix versions. If there is some
> stable not-changing core, you probably could eliminate the need.

This is going to be virtually impossible.  Users can change Guix
locally.  We cannot assume an immutable core.

Guix packages are code.  Guix itself is mostly a library.

> 1] I guess I should better explain my position. In the discussion on
> social media I was explaining why it can't be used now for
> self-containing packages and what is missing. My goal now on the
> mailing list is here the discussion itself, to see whether it is
> possible and whether are people interested in that.

It *can* be used for self-contained packages.  “guix archive --export”
and “guix archive --import” is sufficient for people who come from the
world of bundling.  They can just take a binary archive that someone
else exported from their store and import it into their store.

It is not pretty and I wouldn’t do it, though, because I would always
want to be able to build the exact same binaries myself, which I cannot
do without the exact same version of Guix (this includes package
expressions).

> 2] I don't know much Guile, maybe there is nice way how to work with
> Scheme program from Scheme program. If I should implement it, I'd need
> to strictly "draw line" between package definitions and Guix itself,
> then I would need to parse package definitions files to identify which
> parts were used and ship those. Maybe you can get this information
> during evaluation by some side effect. I don't know Guile enough, really.

In Guix we don’t parse package definitions.  Package definitions are
code.  A package expression is evaluated to a Scheme value.  To compute
the Scheme value one needs all the definitions that are used therein.
And that’s the rest of Guix.  Package expressions are a part of the code
of Guix.  The code used inside of package expressions may change as we
encounter new problems that need to be addressed.  You cannot treat
package expressions as if they were apart from the rest of Guix.

If all you wanted was the names of all packages in a closure — that’s
easy to obtain with Guix.  Just recurse over the inputs.

But to get just a subset of Guix that is used in a closure is futile.
At the end all closures are rooted in bootstrap binaries, so it’s likely
you need a big chunk of all the Guix library definitions.  It’s easier
to just include a copy of Guix itself.

My point is that you cannot (currently?) do this after the fact for any
store item you may want to export.  You would have to embed the state of
the Guix world at store-add time in the store items themselves.  This
can be done by adding the current state of Guix to the store itself and
add it as an input to each store item.  This seems very heavy-handed,
though.

If we agree that we don’t need to be able to extract the Guix state for
*any* store item the problem is smaller and much easier to solve.
Preparing a reproducible binary package would then only involve
appending the current Guix state (including whatever Guix sees via
GUIX_PACKAGE_PATH) as a source archive to the exported closure.

~~ Ricardo

  parent reply	other threads:[~2016-07-21  5:54 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-07-18 22:22 ‘guix publish’ now compresses archives Ludovic Courtès
2016-07-19  6:29 ` Tomáš Čech
2016-07-19 10:03   ` Pjotr Prins
2016-07-19 13:15   ` Ludovic Courtès
2016-07-19 13:42     ` Tomáš Čech
2016-07-19 14:23       ` Ricardo Wurmus
2016-07-19 15:50         ` Tomáš Čech
2016-07-20 11:20           ` Ricardo Wurmus
2016-07-20 13:05             ` Tomáš Čech
2016-07-20 13:12               ` Thompson, David
2016-07-20 16:10                 ` Tomáš Čech
2016-07-21  5:33                 ` Ricardo Wurmus
2016-07-21 15:58                   ` Thompson, David
2016-07-21  5:53               ` Ricardo Wurmus [this message]
2016-07-21 20:50                 ` Tomáš Čech
2016-07-21 10:12 ` Andy Wingo
2016-07-21 12:43   ` Ludovic Courtès

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

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

  git send-email \
    --in-reply-to=87r3anedue.fsf@mdc-berlin.de \
    --to=ricardo.wurmus@mdc-berlin.de \
    --cc=guix-devel@gnu.org \
    --cc=sleep_walker@gnu.org \
    /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.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.