Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

nix is starting to replace all my build tools, building c code is as easy as putting together a small nix file like this: https://github.com/jb55/polyadvent/blob/master/default.nix

The nixpkgs community is then responsible for making sure that the build compiles on all platforms. It's not just for C code either, nix files can be used to declare any kind of dependency. It's a full blown declarative, functional, domain specific programming language for packages. So your project can depend on haskell or python code and everything just works.

There's a heavy linux focus right now but there's a whole group of people making the packages work nicely on osx and cygwin. Check it out: http://nixos.org/nix/



But it still looks like you have a Makefile (although a rather simple one). Are you relying on nix to install the "build-depends" for your app?


Yup, it works in conjunction with other build tools. nix knows how to build make projects, cmake projects, cabal, etc. This is what allows you to depend on pretty much anything. Then I just use nix-build and it will build all the dependencies in a virtual environment and symlink the result when its finished.


So a bit like virtualenv + pip for anything. That sounds fun.


Except it also handles system dependencies as well.


Nix is neat, but doesn't that nix file depend on a Makefile being present? This doesn't seem to replace make...


I don't think we need another build system, what we really want is a package manager that knows how to fetch and build dependencies and gets out of your way. This is why people like npm. This is why nix is awesome.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: