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

crate2nix: init at 0.8.0 #104027

Merged
merged 1 commit into from Nov 17, 2020
Merged

crate2nix: init at 0.8.0 #104027

merged 1 commit into from Nov 17, 2020

Conversation

cole-h
Copy link
Member

@cole-h cole-h commented Nov 17, 2020

crate2nix is a tool that "generates nix build files for rust crates
using cargo".

Motivation for this change

For flakes-enabled Rust projects, it would be very nice to rely on crate2nix through Nixpkgs, rather than having to add a non-flake input. If it's in Nixpkgs, it's built by Hydra, and the result will be uploaded to the cache, meaning users don't have to rebuild it every time (themselves, at least).

Closes nix-community/crate2nix#137.

Things done
  • Tested using sandboxing (nix.useSandbox on NixOS, or option sandbox in nix.conf on non-NixOS linux)
  • Built on platform(s)
    • NixOS
    • macOS
    • other Linux distributions
  • Tested via one or more NixOS test(s) if existing and applicable for the change (look inside nixos/tests)
  • Tested compilation of all pkgs that depend on this change using nix-shell -p nixpkgs-review --run "nixpkgs-review wip"
  • Tested execution of all binary files (usually in ./result/bin/)
  • Determined the impact on package closure size (by running nix path-info -S before and after)
  • Ensured that relevant documentation is up to date
  • Fits CONTRIBUTING.md.

cc @andir @kolloch: I added you two as maintainers for obvious reasons -- if, for whatever reason, you'd rather not be added, let me know and I'll remove your name.

@bbigras
Copy link
Contributor

bbigras commented Nov 17, 2020

Result of nixpkgs-review pr 104027 1

1 package built:
  • crate2nix

Copy link
Member

@Mic92 Mic92 left a comment

Choose a reason for hiding this comment

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

Looks fine, waiting for @andir to confirm.

@ofborg ofborg bot requested a review from andir November 17, 2020 10:27
crate2nix is a tool that "generates nix build files for rust crates
using cargo".

Co-authored-by: Sandro <sandro.jaeckel@gmail.com>
@andir andir merged commit 48d4b84 into NixOS:master Nov 17, 2020
@cole-h cole-h deleted the crate2nix branch November 17, 2020 21:45
@shimunn
Copy link
Contributor

shimunn commented Nov 17, 2020

Wouldn't it make sense to include tools.nix as well to generate the build file on the fly?

@cole-h
Copy link
Member Author

cole-h commented Nov 17, 2020

Can't say I've ever used tools.nix. Feel free to open a PR adding the functionality you expect, but I'm totally unfamiliar with it / what it would be used for.

@cole-h cole-h mentioned this pull request Nov 17, 2020
10 tasks
@danieldk
Copy link
Contributor

danieldk commented Mar 25, 2021

Wouldn't it make sense to include tools.nix as well to generate the build file on the fly?

@shimunn You should be able to use ${crate2nix.src}/tools.nix in a string context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Add to nixpkgs?
7 participants