-
Notifications
You must be signed in to change notification settings - Fork 38
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
fixes the build on NixOS #20
Conversation
@zimbatm I think we should also pick https://github.com/oxalica/rust-overlay as our default's rust overlay. Also, we haven't implemented the |
Let's address those separately. This fixes the immediate problem. We can always improve afterward. |
It is not being used right now and depends on libcurl and zlib
Rust need a CC to compile some of the stuff. Since LLVM is being used by Rust and clang is also working on darwin, use that.
7190d0e
to
c1e7f66
Compare
…d update flake.nix
bf7788a
to
f4a89e4
Compare
@zimbatm my latest commit should address it. |
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 am not really familiar with flakes so it took me a bit of time to test this.
nix build .#bin
seems to work just fine for me on NixOS
However nix-shell
doesn't work any more:
➜ nix-shell
nix-shell: src/libfetchers/tarball.cc:67: nix::fetchers::DownloadFileResult nix::fetchers::downloadFile(nix::ref<nix::Store>, const string&, const string&, bool, const Headers&): Assertion `request.expectedETag == res.etag' failed.
Aborted (core dumped)
And I get a similar error for a simple nix-build
It could be something on my side 🤷♂️
This is an issue with Nix. GitHub has changed their API which breaks some internal assumption that Nix does. |
I don't think we should be using Flakes as it's unstable and not necessary. |
@@ -30,7 +24,7 @@ | |||
]; | |||
}; | |||
overlays = [ | |||
(import mozilla-overlay) |
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.
What is the advantage of using an overlay over rust that is in nixpkgs?
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 is no advantage. It is only for development. You can just use rust-bin.latest.stable.rust
and you get the set of toolchain. I can't have it if we use nixpkgs.
I'm using WSL2 and it's fine to use |
jonas' I can |
I don't have any preference on this, I am okay with or without flakes. |
Allows specifying the order in which formatters are applied. Very simple for now, adding a `Before` field to the formatted config which allows the user to say that formatter `x` needs to be applied _before_ formatted `y`. ```toml [formatter.statix] command = "statix" includes = ["*.nix"] before = "deadnix" [formatter.deadnix] command = "statix" includes = ["*.nix"] ``` Signed-off-by: Brian McGee <[email protected]> Reviewed-on: https://git.numtide.com/numtide/treefmt/pulls/20 Reviewed-by: Jonas Chevalier <[email protected]> Co-authored-by: Brian McGee <[email protected]> Co-committed-by: Brian McGee <[email protected]>
Two changes that were needed to make it work on NixOS.