Skip to content

Add note about xz requirement for tarball in install-nix.md#1119

Merged
Mic92 merged 1 commit intoNixOS:masterfrom
thadguidry:patch-1
Apr 7, 2025
Merged

Add note about xz requirement for tarball in install-nix.md#1119
Mic92 merged 1 commit intoNixOS:masterfrom
thadguidry:patch-1

Conversation

@thadguidry
Copy link
Copy Markdown
Contributor

Since we're providing for download .tar.xz binary tarballs, we assume that systems have xz-utils or similar for handling that compression format. We should make a note of this small requirement at the beginning of the Install Nix page.

Ref for WSL :

PS C:\Users\thadg> wsl
thad@MarsOrBust:/mnt/c/Users/thadg$ curl -L https://nixos.org/nix/install | sh -s -- --daemon
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
100  4267  100  4267    0     0    880      0  0:00:04  0:00:04 --:--:--  5216
sh: you do not have 'xz' installed, which I need to unpack the binary tarball

Fixed after running sudo apt install xz-utils for my Debian distribution with WSL

Since we're providing for download `.tar.xz` binary tarballs, we assume that systems have xz-utils or similar for handling that compression format.  We should make a note of this small requirement at the beginning of the Install Nix page.

Ref for WSL :
```
PS C:\Users\thadg> wsl
thad@MarsOrBust:/mnt/c/Users/thadg$ curl -L https://nixos.org/nix/install | sh -s -- --daemon
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:--  0:00:03 --:--:--     0
100  4267  100  4267    0     0    880      0  0:00:04  0:00:04 --:--:--  5216
sh: you do not have 'xz' installed, which I need to unpack the binary tarball
```

Fixed after running `sudo apt install xz-utils` for my Debian distribution with WSL
@thadguidry thadguidry requested a review from a team as a code owner March 16, 2025 09:07
Copy link
Copy Markdown
Contributor

@jfly jfly left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! I personally not convinced it's a good idea to duplicate the dependencies (which could change over time) here vs the source of truth (the installer itself).

That said, waiting for a whole download just to get an error message is not very nice. How about we move the checks for missing dependencies to the top of the install script instead? Then people will find out about missing dependencies immediately.

I could also see putting a more generic note here saying something like "Note: the installer may error our if you're missing dependencies".

@thadguidry
Copy link
Copy Markdown
Contributor Author

Agree! Feel free to hack on this PR, or close it with another for improvements on the script as you suggest.

@Mic92 Mic92 enabled auto-merge (squash) April 7, 2025 12:59
@Mic92 Mic92 merged commit 801d362 into NixOS:master Apr 7, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants