Using other languages for nix expressions?

Are there any other languages that can be used besides nix expression language to create nix expressions?

I found one for JavaScript (for which TypeScript type definitions could be made) by @sander: Sander van der Burg's blog: NiJS: An internal DSL for Nix in JavaScript. Git repo: GitHub - svanderburg/nijs: NiJS: An internal DSL for Nix in JavaScript

nix is technically just a DSL (domain specific lanugage) for creating drv’s. The guix community uses guille scheme based EDSL (embedded domain specific lanugage) as an alternative.

Recommended video: Nix: Under the hood by Gabriel Gonzalez

Is Guix just generating Nix Expressions and passing them to Nix under the hood?

There is dhall-nix, also by Gabriel Gonzales, that allows generating Nix expressions from Dhall language: Haskell for all: Typed Nix programming using Dhall

1 Like

Also related discussion, and a great read: Alternative language - #10 by zimbatm

1 Like

No, it just uses a different front end. Think of more like a typescript situation.

Nix expression —evaluation—> Derivation —instantiation—> build output
Guix/guille expression —evaluation—> Derivation —instantiation—> build output

There’s probably a lot of context that I’m leaving out, I would highly recommend watching the video i linked earlier

1 Like