Allow embedding pasta binary #996

Open
opened 2025-09-19 09:55:56 +00:00 by yu-re-ka · 1 comment
Member

When using Lix where it is infeasible to deploy it to /nix/store/ (because Lix is used for system recovery, or because the user does not have permissions to create /nix/store/), this is possible using the pkgsStatic.lix package. rsync-ing ${pkgsStatic.lix}/bin to the target host and adding it to the PATH has worked previously to use Lix with an external store or for recovery purposes.
Since pasta was added, now the Lix binary from pkgsStatic.lix depends on the pasta binary being present on the target system, and it defaults to the default pasta_path in the Nix store. This creates a regression with the aforementioned use cases.

Describe the solution you'd like

Similar to the sandbox shell is embeded into the Lix binary for pkgsStatic builds, I would like the pasta binary to be embeddable too, so that the pkgsStatic Lix binary has as little external dependencies as possible.

While the sandbox shell binary is extracted in the sandbox, the pasta binary simply needs to be executed out of the Lix binary's memory space.

Describe alternatives you've considered

I can copy the pasta binary to the target host separately and set pasta_path in the Nix config, but this involves extra steps which have already been removed for the sandbox shell binary.

Additional context

Discussed on Lix Development Matrix on 2025-09-19

## Is your feature request related to a problem? Please describe. When using Lix where it is infeasible to deploy it to /nix/store/ (because Lix is used for system recovery, or because the user does not have permissions to create /nix/store/), this is possible using the pkgsStatic.lix package. rsync-ing ${pkgsStatic.lix}/bin to the target host and adding it to the PATH has worked previously to use Lix with an external store or for recovery purposes. Since pasta was added, now the Lix binary from pkgsStatic.lix depends on the pasta binary being present on the target system, and it defaults to the default pasta_path in the Nix store. This creates a regression with the aforementioned use cases. ## Describe the solution you'd like Similar to the sandbox shell is embeded into the Lix binary for pkgsStatic builds, I would like the pasta binary to be embeddable too, so that the pkgsStatic Lix binary has as little external dependencies as possible. While the sandbox shell binary is extracted in the sandbox, the pasta binary simply needs to be executed out of the Lix binary's memory space. ## Describe alternatives you've considered I can copy the pasta binary to the target host separately and set pasta_path in the Nix config, but this involves extra steps which have already been removed for the sandbox shell binary. ## Additional context Discussed on Lix Development Matrix on 2025-09-19
Owner

the static build could also override pasta = null to drop the dependency altogether? if the primary purpose of the static builds is to have a self-contained recovery mechanism then pasta won't even be necessary (it being just an additional security measure that won't prevent much you're not going to erase anyway when booting a live so or something)

the static build could also override `pasta = null` to drop the dependency altogether? if the primary purpose of the static builds is to have a self-contained recovery mechanism then pasta won't even be necessary (it being just an additional security measure that won't prevent much you're not going to erase anyway when booting a live so or something)
Sign in to join this conversation.
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: lix-project/lix#996
No description provided.