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

Test Nix on CI #385

Merged
merged 6 commits into from
Aug 6, 2024
Merged

Test Nix on CI #385

merged 6 commits into from
Aug 6, 2024

Conversation

ThetaSinner
Copy link
Contributor

I was recently unable to build because of the wrapProgram issue #359. That is now resolved, but it would be good to test that Amber is building correctly with Nix on CI. I've added a workflow job to do that.

I also noticed that you have duplicate nixpkgs coming in through naersk. I have configured naersk to use the same nixpkgs as the Amber project is using.

flake.nix Show resolved Hide resolved
flake.nix Show resolved Hide resolved
flake.nix Show resolved Hide resolved
nativeBuildInputs = [ toolchain ];
RUST_SRC_PATH = rustPlatform.rustLibSrc;
] ++ [ toolchain ];
RUST_SRC_PATH = toolchain.availableComponents.rust-src;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

This part I'm not sure about, I assume this is for VSCode integration? I don't have that or know how to check if this is still making Rust's source code available for inspection with RLS

Copy link
Member

Choose a reason for hiding this comment

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

This seems to be necessary for rust-analyzer, for the development environment. See https://discourse.nixos.org/t/rust-src-not-found-and-other-misadventures-of-developing-rust-on-nixos/11570

Trying to run rust-analyzer from the dev environment, I get another problem though:

(nix:nix-shell-env) mks@Navi:~/Projects/amber$ rust-analyzer 
error: Unknown binary 'rust-analyzer' in official toolchain 'stable-x86_64-unknown-linux-gnu'.

@Mte90 Mte90 merged commit cde0068 into amber-lang:master Aug 6, 2024
1 check passed
Mte90 pushed a commit to Mte90/Amber that referenced this pull request Sep 19, 2024
* Build Nix package on CI

* Resolve duplicate inputs and flake update

* Switch to rust-overlay

* Check that the `bc` command is included and set path works correctly

* Exit if check fails

* Move Nix checks to its own workflow
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.

6 participants