-
Notifications
You must be signed in to change notification settings - Fork 50
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
Fix Nix build, add more Nix usage docs, more relaxed Rust build artifacts discovery #28
Conversation
Pegasust
commented
Jun 22, 2023
- Should fix CI builds for Nix target
- Nix build should theoretically faster thanks to build artifact cache
I would actually prefer using https://github.com/yusdacra/nix-cargo-integration instead of crane but, alas, I'm not the one writing the code here :D |
flake.nix
Outdated
inherit (self) meta; | ||
}; | ||
|
||
packages.default = inputs.self.packages.${system}.all; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done, thanks!
@@ -51,7 +55,24 @@ | |||
|
|||
formatter = pkgs.alejandra; | |||
|
|||
packages.default = pkgs.callPackage ./. {inherit toolchain;}; | |||
packages.workspace = pkgs.callPackage ./workspace-drv.nix { | |||
craneLib = inputs.crane.lib.${system}.overrideToolchain toolchain; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
inputs'.crane.lib.overrideToolchain
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this works, my hunch is that inputs'
does not support .lib
, I may be wrong.
I have adjusted other the similar patterns through out my PRs
Not sure why MacOS is failing. I'll have to plug "it works on my machine" here. Maybe there's something wrong with |
Bumping the cachix action to v22 should fix it, according to the cachix docs |
Noice |
nci also looks very clean, I've decided to give it a try because the current build time is a bit too high (let's set up cachix at a later PR?). The TL;DR is nci doesn't support workspace quite too well yet yusdacra/nix-cargo-integration#123. This is because of dream2nix. |
Oh well, it'll catch up eventually. You might consider moving all of the *.nix files into a nix/ (or contrib/) sub directory, to avoid cluttering the root with a bunch of contrib files. Up to @tjdevries |
|