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

> Addressing common use-cases should be a simple matter.

Fully agree, but the given example isn't such a case but rather incorrect code.

The example is somewhat akin to writing the following Python code and expecting it to print "hello".

    def main():
        print 'hello'
It wouldn't work because you need to call the main function. It's not a problem of Python not addressing common use cases.



You're right but just to explain where I came from there were a lot of "just use this default.nix" that had arguments and could not "just be used".

I understood that an argument was needed, that error was clear and when I googled it I found the solution that I wrote.

I supposed it's meant to plug in to something bigger maybe and that's why there are arguments without import everywhere.. maybe? But I've given up now, so I'll never know, we're just gonna suck it up and keep using brew and try to make it idiot-proof somehow.

It just feels like a shame that nix is so unapproachable. It's just as much apple's fault though - if xcode has some open command line tools I'm sure there would have been ready-made formulas for everything we needed. At least I got to vent.


You might want to read "Nix Pills" if you ever want to look into Nix again. It's the best introductory material for Nix that I'm aware of, and it gave me a better picture of the basics required to get comfortable with Nix.

It's on the NixOS website, but IMO it's worth making it more visible to newcomers:

https://nixos.org/guides/nix-pills/

From my experience, it became considerably more easier to figure out or search for solutions once I've grasped the basics from "Nix Pills." Once I became comfortable enough, I also relied heavily on the Nixpkgs repository[1] as a great source of information. It has an approachable codebase and some quick grepping gave me many examples when trying to figure out how to write packages for a particular language.

[1]: https://github.com/NixOS/nixpkgs


> You're right but just to explain where I came from there were a lot of "just use this default.nix" that had arguments and could not "just be used".

> I understood that an argument was needed, that error was clear and when I googled it I found the solution that I wrote.

So in this case the advise was worst than useless? Had you been figuring things out on your own, would it have been less bad?

> It's just as much apple's fault though - if xcode has some open command line tools I'm sure there would have been ready-made formulas for everything we needed.

Yes that is too true. Keeping things working with apple is so draining it's hard to have energy left over to do other things right.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: