Nickel OS / nixpkgs parsing / Nickel as a full replacement for Nix #2115
Replies: 1 comment 3 replies
-
Hello, Some work has been started toward this direction a long time ago, in #1067. The PR was stalled because the original author left and we had other priorities back then. His focus was to transpile Nix code (parse and convert to Nickel), which isn't insanely complicated for most of the Nix language, which is rather simple as a language. There are some corner cases of the semantics and subtelties around environments because of Nix However, this doesn't handle any Nix primop, such as Besides technicalities, one of our problem so far is that using Nickel just as an alternative Nix VM doesn't really leverage Nickel's strong points. Sure, there is some stuff we can make better, but in an ideal world a hypothetical Nickelpkgs would be architectured in a totally different way than Nixpkgs. Maintaining backward compatibility with Nixpkgs is a big weight. If the goal is to use Nickel for your own config, and to leverage Nixpkgs for the existing stuff but without adding Nickel code inside Nixpkgs, then I guess the constraints are more manageable. Organist is able to pull stuff from Nixpkgs from "within Nickel" (it's not entirely true, but it looks like it) by serializing data as JSON and having both a Nix lib and a Nickel lib managing the interop between the two worlds. It's far from being as powerful as being able to call arbitrary Nix from Nickel, but it's enough for the purpose of taking some packages out from Nixpkgs to put in a developer environment, keeping the Nickel part quite idiomatic. In general, there's been quite a lot of conversation around this in the RFC003 PR, that has been stalling for a while. I must also mention some contributor on the discord named Austin (it might be @ajbt200128 ? but I'm not sure - sorry for the unsolicited ping if it wasn't) has been working on taking up the work of Nix transpilation, and seemed to have made good progress. But unfortunately no PR has been opened and I don't know what's the current status of this effort. Maybe another interesting direction would be to explore the usage of Tvix, which is a re-implementation of Nix in Rust. Beside the fact that they could get rid of a lot of technical debts, Nickel being written in Rust as well, re-using entire part of Tvix could be much easier than interfacing with Nix directly or re-implementing everything on the Nickel side. Summary
For now this line of work is paused, and we are focused on delivering a bytecode virtual machine in order to fix performance issues. However, after this, I plan to dedicate a big chunk of time to going back to Nickel use-cases, including Nix. |
Beta Was this translation helpful? Give feedback.
-
Has there been any discussion of Nickel replacing
nix
as a backward-compatible parser for large repos likenixpkgs
, thus allowing it to become a more correctness-focused package manager alternative to Nix. I doubt we're there yet, but has any roadmap been discussed, or is this out of scope of Nickel for the moment?Beta Was this translation helpful? Give feedback.
All reactions