Nix-playground - Command line tools for patching nixpkgs package source code easily

9 Likes

Interesting idea. Is there any interest in making the project usable from within nix, i.e. without pip?

4 Likes

within nix

did you mean making it part of a flake (nix lang)? Or built in into the nix command?

I am trying to make it support more edge cases, like support any flake_ref#frag syntax, but I realized the logic of just even parsing it is a bit complex. A PR working in progress:

I read nix li source code, I think things would be much much easier if I build this feature right into nix command.

Is that what you meant?

I meant a flake or some sort of nix code that can be consumed by the end users without using pip.

1 Like

I think that’s a good idea actually. I guess it would be nice to have a way to bake this as part of the workflow in a flake. I think it’s more nature that way from nix’s perspective.

But I am currently building this tool mostly for patching library to address a problem I encountered. Making it a simple stanealone command line tool also making it much user firendly to those who are not super familiar with nix (like myself).

So yeah, I will think about it and if it makes sense, I might implement when I have time.

2 Likes

This PR has been merged and released. Now with 1.0.1, one can checkout source code from any flake output, like:

np checkout github:NixOS/nixpkgs/11415c7ae8539d6292f2928317ee7a8410b28bb9#libnvidia-container