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

Consider not requiring checking in generated code #105

Open
CobaltCause opened this issue Nov 26, 2024 · 3 comments
Open

Consider not requiring checking in generated code #105

CobaltCause opened this issue Nov 26, 2024 · 3 comments

Comments

@CobaltCause
Copy link

Currently, npins/default.nix is generated by npins for projects using it. I wonder if it would be possible to fetch npins itself as a library from npins/sources.json in default.nix with a small amount of code and call into the fetched library to do the work instead. flake-compat works this way, for example.

@Janik-Haag
Copy link

The npins/default.nix is already relatively small and only implements the fetching of the sources.json. What benefit would you get from special casing a npins source fetch?

@CobaltCause
Copy link
Author

I would like this pretty much entirely for aesthetic reasons:

  • Less noise in the git history
  • Less chance for bugs relating to the exact format of npins/default.nix (e.g. if the format were to be changed by an autoformatter)
  • It would probably make it possible to choose the name of npins/sources.json, which is currently required to be sources.json by npins/default.nix

To be clear, I don't think these things are a big deal, and I think it would be reasonable to not attempt to implement this and just close this issue.

@piegamesde
Copy link
Collaborator

Basically all you need is #48 and then implement the desired Nix code yourself. In theory one could provide the code as lib code on the Nixpkgs npins package, but that has an obvious bootstrapping problem

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

No branches or pull requests

3 participants