chessai / nix-std

no-nixpkgs standard library for the nix expression language
105 stars 7 forks source link

question: copying nixpkgs pure eval codes #69

Open dzmitry-lahoda opened 6 months ago

dzmitry-lahoda commented 6 months ago

Recently I used nix as template engine (called it from bash with nix eval --expr --impure).

So really it was nix flake app -> bash -> nix impure. So i used nix as programming(scripting) shell language kind of.

To generate JSON from curled data.

I needed to convert string to integer, found here https://github.com/NixOS/nixpkgs/blob/master/lib/strings.nix .

What is problem?

nixpkgs is huge and I do not want light scripts like this to download and big nixpkgs.

So ideal solution for m if nixpkgs actually will have some std/core with pure evals. How it can be made? nixpkgs rexports that some repo.

So there are 2 questions, one if nixpkgs are going to split, and second, should std/core repo contain copies of nixpkgs code for starter?

At least fixed point is copied now.

chessai commented 3 months ago

This project is not affiliated with nixpkgs, so we have no control over what the nixpkgs maintainers choose to do.

However, we can incorporate code here that we find useful from there.

@kanwren actually wrote a parser combinators library using this one, I'm not sure if it still works, I will have to check.