nix: add binaryTarball derivation #51626
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Copy (and adapt a little) the
binaryTarball
derivation found innix
'srelease.nix
:https://github.com/NixOS/nix/blob/4aee93d5ce6cf77e314e93074b9da1dcff8979e9/release.nix#L115
binaryTarball
is useful for cross-compilingnix
:Which builds a
result/nix-2.1.3-armv7a-linux.tar.bz2
packing an
install
script which will create a nix storeand most importantly register in it the closure of the
nix
package(using
nix-store --load-db
).NOTE: the tarball can be quite bigger than expected (~450Mo), mainly because
gcc
is not stripped by default when cross-compiling.Motivation for this change
Cross-compiling
nix
(eg. for ARM) and packing everything needed to install it in a tarball.sandbox
innix.conf
on non-NixOS)nix-shell -p nox --run "nox-review wip"
./result/bin/
)nix path-info -S
before and after)