nix-community / crate2nix

rebuild only changed crates in CI with crate2nix and nix
https://nix-community.github.io/crate2nix/
Apache License 2.0
364 stars 86 forks source link

Add flake.nix #295

Closed bouk closed 11 months ago

bouk commented 1 year ago

This adds a flake.nix with an overlay and a package. The nixpkgs is pinned to the one used by the rest of the repository, so its nixpkgs version is not managed separately.

After this PR crate2nix can be run by calling nix run github:nix-community/crate2nix. Crate2nix can also be used via the overlay by using crate2nix.overlays.default

kolloch commented 1 year ago

Hi @bouk, thank you!

could you please reformat it with https://github.com/nix-community/crate2nix/blob/master/nixpkgs-fmt.sh?

while it is a quite minimal wrapper around existing config, it would be nice if this was checked in CI so that we don’t break it accidentally.

tilpner commented 1 year ago

It would be nice if this could export tools.nix in some way. Not sure where it fits in exactly, maybe that can wait until after flake-schemas is a thing, and you can make up attribute semantics.

kolloch commented 11 months ago

Thanks!