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

Fix Nix build, add more Nix usage docs, more relaxed Rust build artifacts discovery #28

Merged
merged 11 commits into from
Jun 28, 2023

Conversation

Pegasust
Copy link
Contributor

  • Should fix CI builds for Nix target
  • Nix build should theoretically faster thanks to build artifact cache

@willruggiano
Copy link
Contributor

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;
Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Contributor Author

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;
Copy link
Contributor

Choose a reason for hiding this comment

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

inputs'.crane.lib.overrideToolchain

Copy link
Contributor Author

@Pegasust Pegasust Jun 22, 2023

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

@Pegasust
Copy link
Contributor Author

Not sure why MacOS is failing. I'll have to plug "it works on my machine" here. Maybe there's something wrong with cachix/install-nix-action itself?

@willruggiano
Copy link
Contributor

Not sure why MacOS is failing. I'll have to plug "it works on my machine" here. Maybe there's something wrong with cachix/install-nix-action itself?

Bumping the cachix action to v22 should fix it, according to the cachix docs

@willruggiano
Copy link
Contributor

Noice

@Pegasust
Copy link
Contributor Author

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.

@willruggiano
Copy link
Contributor

willruggiano commented Jun 24, 2023

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

@tjdevries
Copy link
Contributor

contrib/ is a good idea. Would you mind putting them there?

@tjdevries tjdevries merged commit 3574508 into sourcegraph:master Jun 28, 2023
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