Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

system: build for riscv64-unknown-linux-gnu #10228

Merged
merged 4 commits into from
Apr 18, 2024

Conversation

0x4A6F
Copy link
Member

@0x4A6F 0x4A6F commented Mar 11, 2024

Motivation

With the advent of increasing RISC-V plaforms, it would be nice to also have a (cross-compiled) nix tarball available to be consumed by our nix installation methods.

Context

Currently the nix installation instructions both errors out on riscv64-linux systems with following:

# curl -sL https://nixos.org/nix/install | sh -s -- --daemon
sh: sorry, there is no binary distribution of Nix for your platform

# curl --proto '=https' --tlsv1.2 -sSf -L https://install.determinate.systems/nix | sh -s -- install
nix-installer: unknown CPU type: riscv64

With these changes I was able to produce the required output to install nix on a riscv64-linux system (running Debian).

nix --extra-experimental-features 'nix-command flakes' build .#hydraJobs.binaryTarballCross.x86_64-linux.riscv64-unknown-linux-gnu

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@0x4A6F 0x4A6F requested a review from edolstra as a code owner March 11, 2024 20:14
@fricklerhandwerk fricklerhandwerk added the feature Feature request or proposal label Mar 27, 2024
@edolstra edolstra changed the title system: add support for riscv64-unknown-linux-gnu system: build for riscv64-unknown-linux-gnu Mar 27, 2024
@edolstra edolstra added the idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome. label Mar 27, 2024
@edolstra
Copy link
Member

Note that this PR in itself does not cause the build to be added to the installer. For that you would need to add it to maintainers/upload-release.pl.

@fricklerhandwerk
Copy link
Contributor

Triaged in the Nix team meeting:

@fricklerhandwerk fricklerhandwerk self-assigned this Mar 27, 2024
@0x4A6F
Copy link
Member Author

0x4A6F commented Apr 3, 2024

We do have matrix:r/riscv:nixos.org for communication. Build failures can be reported there.
If lib.maintainers is used at least my handle (_0x4A6F) can be used.

@fgaz
Copy link
Member

fgaz commented Apr 3, 2024

If lib.maintainers is used at least my handle (_0x4A6F) can be used

Also mine ✋

@silvanshade
Copy link

If lib.maintainers is used at least my handle (_0x4A6F) can be used

Also mine ✋

I'd also like to participate.

@github-actions github-actions bot added the contributor-experience Developer experience for Nix contributors label Apr 18, 2024
@fricklerhandwerk fricklerhandwerk enabled auto-merge (squash) April 18, 2024 10:46
@fricklerhandwerk
Copy link
Contributor

Thanks! And sorry for the extended delay in merging.

@fricklerhandwerk fricklerhandwerk merged commit e3fa7c3 into NixOS:master Apr 18, 2024
8 checks passed
@@ -171,6 +171,10 @@ sub downloadFile {
downloadFile("binaryTarballCross.x86_64-linux.armv7l-unknown-linux-gnueabihf", "1");
};
warn "$@" if $@;
eval {
downloadFile("binaryTarballCross.x86_64-linux.riscv64-linux-gnu", "1");
Copy link
Member

@Ericson2314 Ericson2314 Apr 18, 2024

Choose a reason for hiding this comment

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

Forgot the -unknown-

Suggested change
downloadFile("binaryTarballCross.x86_64-linux.riscv64-linux-gnu", "1");
downloadFile("binaryTarballCross.x86_64-linux.riscv64-unknown-linux-gnu", "1");

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributor-experience Developer experience for Nix contributors feature Feature request or proposal idea approved The given proposal has been discussed and approved by the Nix team. An implementation is welcome.
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

6 participants