HACKER Q&A
📣 levzettelin

Is there a Nix without the functional programming bit


I really like the idea of Nix, but I never understood why it uses the functional programming approach. As a great fan of the procedural programming paradigm, I feel that a better version of Nix could be build around a more mainstream language. Surely, you'd need some ideas of functional programming, but I don't see why a package manager/OS of this type couldn't benefit from a language that looks much more like Python or C++.

Does such a thing/project exist (even if only in beta)?

(I last looked at Nix two years ago.)


  👤 atrniv Accepted Answer ✓
Yes, there's a package manager built by Chef called Habitat that is essentially based of the nix philosophy but with several simplifications to make it more approachable.

- Packages are written as plan files in bash or powershell (https://docs.chef.io/habitat/plan_writing/)

- Once built packages are gauranteed to run with the exact same dependencies it was built with.

- Packages are downloaded from a remote builder server by default not built locally from a derivation, similar to other package managers like apt, npm, etc.

- Each package is installed in a unique prefix of the form origin/name/version/release

- Packages are not content addressable, insteas public/private keys are used to verify package contents

- It supports packages on x86 windows and Linux at the moment, but there are plans for ARM and macos support in the future

It is used in production by several large enterprise customers.

Disclaimer: I'm one of the developers working on Habitat