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

Switch to flake-parts and nci #167

Merged
merged 1 commit into from
Oct 19, 2023
Merged

Switch to flake-parts and nci #167

merged 1 commit into from
Oct 19, 2023

Conversation

ehllie
Copy link
Contributor

@ehllie ehllie commented Oct 18, 2023

Switched the nix expression used for building ante to use flake-parts and nci instead of manually calling buildRustPackage. It should lower the amount of maintenance required for it, since the dependency hashes won't need to be updated each time Cargo.lock changes like it did recently as those are not required by nci at all. The flake.nix is also much simpler now thanks to flake-parts.

@ehllie
Copy link
Contributor Author

ehllie commented Oct 18, 2023

Oh, I've also ended up including .envrc used by direnv. Not sure if you want to include that in the repository. I can always just add it to my local .git/info/exclude instead

Copy link
Owner

@jfecher jfecher left a comment

Choose a reason for hiding this comment

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

Looks good, thank you 🙂

@jfecher jfecher merged commit ffba97f into jfecher:master Oct 19, 2023
@jfecher
Copy link
Owner

jfecher commented Oct 19, 2023

@ehllie, I just pushed another commit updating some dependencies. Will this break the nix build?

@ehllie
Copy link
Contributor Author

ehllie commented Oct 19, 2023

@ehllie, I just pushed another commit updating some dependencies. Will this break the nix build?

No, the nix build still works fine. It should be much more resilient now.

~nix shell github:jfecher/ante

~file $(realpath $(which ante))
/nix/store/ilipmv42z4ms0rqi1ddh4fhv25vi1dw8-ante-0.1.1/bin/ante: Mach-O 64-bit executable arm64

~ante
error: the following required arguments were not provided:
  <FILE>

Usage: ante <FILE>

For more information, try '--help'.

~exit

~ took 7m36s

One extra thing could be adding a github action for building the binary and uploading it to a binary cache like cachix so that it wouldn't take ~7 minutes to compile, but instead get downloaded from the substituter. It's up to you if you think that's worthwhile. I could look into setting it up if you want.

@ehllie ehllie deleted the flake-parts branch October 19, 2023 20:20
@jfecher
Copy link
Owner

jfecher commented Oct 19, 2023

@ehllie I think we should be good for now, but thank you. It may be something to revisit once the compiler is more mature or if it ever becomes more widely used though.

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.

2 participants