* Is there any mechanism of Guix analog to, or trick in Guile to imitate Nix flakes?
@ 2024-05-27 16:37 肖 海帆
2024-06-04 18:03 ` Simon Tournier
0 siblings, 1 reply; 6+ messages in thread
From: 肖 海帆 @ 2024-05-27 16:37 UTC (permalink / raw)
To: help-guix@gnu.org
GNU Guix is known as one of the most insistent package managers on
reproducibility, the same as Nix, from which Guix was deeply inspired.
However, while the two programs share most of their philosophies, I
couldn't see something like flakes in Guix. I know Guix has
descriptions and manifests, or integrated inferiors, which guarantee
the exactness of building of a package set. But all these mechanisms
point directly to the precise references ("guix.git" with a commit
hash), rather than separate the unlocked references ("nixpkgs/master"
in flake.nix) from the locks (flake.lock), which allows imperative
upgrade for a specific workspace.
So, is there any mechanism of Guix analog to, or trick in Guile to
imitate the functionalities of flakes? Or is there a possibility for
this? I have merely skimmed R7RS, and know little about the Guile
implementation, but just impressed by the generality of the language.
So I wonder if this can be done provided a much more powerful backend
than that of Nix.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there any mechanism of Guix analog to, or trick in Guile to imitate Nix flakes?
2024-05-27 16:37 Is there any mechanism of Guix analog to, or trick in Guile to imitate Nix flakes? 肖 海帆
@ 2024-06-04 18:03 ` Simon Tournier
2024-06-10 4:41 ` Abbé
2024-06-10 17:54 ` rczb
0 siblings, 2 replies; 6+ messages in thread
From: Simon Tournier @ 2024-06-04 18:03 UTC (permalink / raw)
To: 肖 海帆, help-guix@gnu.org
Hi,
On Tue, 28 May 2024 at 00:37, 肖 海帆 <rc-zb@outlook.com> wrote:
> So, is there any mechanism of Guix analog to, or trick in Guile to
> imitate the functionalities of flakes? Or is there a possibility for
> this?
It’s hard to tell – at least from my understanding – because each time
people ask for Flakes, they assume we know what it is or they explain
using the vocabulary of Nix which, for what it is worth, I am not
familiar. That’s said, then…
The best step is to describe – using Guix terminology – the Flake
feature, IMHO. :-)
Cheers,
simon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there any mechanism of Guix analog to, or trick in Guile to imitate Nix flakes?
2024-06-04 18:03 ` Simon Tournier
@ 2024-06-10 4:41 ` Abbé
2024-06-10 17:54 ` rczb
1 sibling, 0 replies; 6+ messages in thread
From: Abbé @ 2024-06-10 4:41 UTC (permalink / raw)
To: 肖 海帆; +Cc: help-guix
[-- Attachment #1.1: Type: text/plain, Size: 967 bytes --]
On Tuesday, June 4th, 2024 at 8:03 PM, Simon Tournier <zimon.toutoune@gmail.com> wrote:
> Hi,
>
> On Tue, 28 May 2024 at 00:37, 肖 海帆 rc-zb@outlook.com wrote:
>
> > So, is there any mechanism of Guix analog to, or trick in Guile to
> > imitate the functionalities of flakes? Or is there a possibility for
> > this?
>
>
> It’s hard to tell – at least from my understanding – because each time
> people ask for Flakes, they assume we know what it is or they explain
> using the vocabulary of Nix which, for what it is worth, I am not
> familiar. That’s said, then…
>
> The best step is to describe – using Guix terminology – the Flake
> feature, IMHO. :-)
>
>
> Cheers,
> simon
Maybe "(guix)Invoking guix time-machine"[0] in conjunction with channels file is what they're looking for.
References:
[0] https://guix.gnu.org/manual/en/html_node/Invoking-guix-time_002dmachine.html
HTH
--
Abbe
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 249 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there any mechanism of Guix analog to, or trick in Guile to imitate Nix flakes?
2024-06-04 18:03 ` Simon Tournier
2024-06-10 4:41 ` Abbé
@ 2024-06-10 17:54 ` rczb
2024-06-16 15:00 ` Suhail Singh
1 sibling, 1 reply; 6+ messages in thread
From: rczb @ 2024-06-10 17:54 UTC (permalink / raw)
To: Simon Tournier; +Cc: help-guix@gnu.org
Hi,
I'm sorry that I missed the point that flakes are not so prevalent as it
looks in some communities. 😔 To be brief, a /flake
<https://nix.dev/manual/nix/2.22/command-ref/new-cli/nix3-flake>/ is a
directory or a (sub-dir of some) git repository that contains a
`flake.nix`, whose content is then an /attribute set/(similar to JSON
/object/) consisting of
1. An `inputs` attribute that specifies whatever the evaluation of the
flake might need, loosely or strictly, git repo or not, flake or not.
And the most typical cases are like
```
|inputs.nixpkgs.url = "github:NixOS/nixpkgs/nixpkgs-unstable";|
|```
|
|where `nixpkgs-unstable` is the branch to use.|
|2. An `outputs` attribute that gives whatever the user might need from
this flake. Typically some packages (/derivations/), but could also
contain some shell or system environments.
|
|3. An optional `||nixConfig||` attribute that specifies some behaviors
of Nix itself during the evaluation.|
|4. And an optional flake description.|
|During evaluation, Nix will generate a JSON file named `flake.lock`,
which stores the exact revisions of the dependencies, just like the
output of `guix describe -f channels`. The lock file is not mandatory.
You can delete it whenever you want an update, and the next invoking of
`nix build` or something on the flake directory will just generate a new
one that conforms what's written in `inputs` while being as up-to-date
as possible to the upstream. This mechanism allows imperative updating a
program set while not breaking the "rough" specification of
dependencies, and is especially useful in system management (for that
/Nix channels <https://nix.dev/manual/nix/2.22/command-ref/nix-channel>
/and /lookup paths
<https://nix.dev/manual/nix/2.22/language/constructs/lookup-path> /are
not needed anymore, and both the reproducibility and the flexibility get
increased).|
|In comparison to this, Guix rely on `use-modules` of Guile, which
specifies nothing but some symbols and searches the corresponding
modules either directly from the environment or from the /time machine/,
which refer to exact revisions of the channels. Another choice is the
inferiors. Again, they refer directly to the revisions, not branches,
let alone arbitrary source urls. Reproducible as they are, the UX is not
so smooth and simple. So I wonder if there's some approaches that can
deal with this.|
|rczb/
/|
on 2024/6/5 2:03, Simon Tournier wrote:
> Hi,
>
> On Tue, 28 May 2024 at 00:37, 肖 海帆<rc-zb@outlook.com> wrote:
>
>> So, is there any mechanism of Guix analog to, or trick in Guile to
>> imitate the functionalities of flakes? Or is there a possibility for
>> this?
> It’s hard to tell – at least from my understanding – because each time
> people ask for Flakes, they assume we know what it is or they explain
> using the vocabulary of Nix which, for what it is worth, I am not
> familiar. That’s said, then…
>
> The best step is to describe – using Guix terminology – the Flake
> feature, IMHO. :-)
>
>
> Cheers,
> simon
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: Is there any mechanism of Guix analog to, or trick in Guile to imitate Nix flakes?
2024-06-10 17:54 ` rczb
@ 2024-06-16 15:00 ` Suhail Singh
0 siblings, 0 replies; 6+ messages in thread
From: Suhail Singh @ 2024-06-16 15:00 UTC (permalink / raw)
To: rczb; +Cc: Simon Tournier, help-guix@gnu.org
rczb <rc-zb@outlook.com> writes:
> During evaluation, Nix will generate a JSON file named `flake.lock`,
> which stores the exact revisions of the dependencies, just like the
> output of `guix describe -f channels`.
How would this be different from using, in Guix, say, a manifest file
(using the specification syntax along with specification->package) with
a channels.scm and then doing the build via guix time-machine?
> The lock file is not mandatory. You can delete it whenever you want an
> update, and the next invoking of `nix build` or something on the flake
> directory will just generate a new one that conforms what's written in
> `inputs` while being as up-to-date as possible to the upstream.
How would this be different than updating the channels.scm file?
--
Suhail
^ permalink raw reply [flat|nested] 6+ messages in thread
* Is there any mechanism of Guix analog to, or trick in Guile to imitate Nix flakes?
@ 2024-05-27 16:34 SailSXiao
0 siblings, 0 replies; 6+ messages in thread
From: SailSXiao @ 2024-05-27 16:34 UTC (permalink / raw)
To: help-guix@gnu.org
GNU Guix is known as one of the most insistent package managers on
reproducibility, the same as Nix, from which Guix was deeply inspired.
However, while the two programs share most of their philosophies, I
couldn't see something like flakes in Guix. I know Guix has
descriptions and manifests, or integrated inferiors, which guarantee
the exactness of building of a package set. But all these mechanisms
point directly to the precise references ("guix.git" with a commit
hash), rather than separate the unlocked references ("nixpkgs/master"
in flake.nix) from the locks (flake.lock), which allows imperative
upgrade for a specific workspace.
So, is there any mechanism of Guix analog to, or trick in Guile to
imitate the functionalities of flakes? Or is there a possibility for
this? I have merely skimmed R7RS, and know little about the Guile
implementation, but just impressed by the generality of the language.
So I wonder if this can be done provided a much more powerful backend
than that of Nix.
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2024-06-17 14:06 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-05-27 16:37 Is there any mechanism of Guix analog to, or trick in Guile to imitate Nix flakes? 肖 海帆
2024-06-04 18:03 ` Simon Tournier
2024-06-10 4:41 ` Abbé
2024-06-10 17:54 ` rczb
2024-06-16 15:00 ` Suhail Singh
-- strict thread matches above, loose matches on Subject: below --
2024-05-27 16:34 SailSXiao
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.