Live data from Hacker News

Devenv.sh: Fast and reproducible developer environments using Nix

devenv.sh

141–150 of 171 posts

Re: Devenv.sh: Fast and reproducible developer environments using Nix

#141

Earlier quoted context omitted.

> the build and configure steps may change over time. Unless the original maintainers start building for nix, would not this be too hard to maintain? This is indeed very hard, but Nix's deep locking makes this a tractable problem: if a version of a package builds once, it will keep building for as long as the source code is available. So in some ways, this Nix has an easier job compared to traditional distribution me…

but new versions may need new steps to build?

Yes, at which point you'll have to update the build script... but until you do that, the current build script will still pull in the previous version of the software and all of its dependencies, including system-level ones, so you won't have incidental breakage from the surrounding environment changing out from under you.

This works going backwards, too. If you need an older version of some software, Nix can happily install it for you in a way that won't conflict with other software on your system. The only requirement is that you can still get the original sources and you can get a copy of the nixpkgs repo at the time the older version of that software was initially committed.

Re: Devenv.sh: Fast and reproducible developer environments using Nix

#142

Earlier quoted context omitted.

but new versions may need new steps to build?

Yes, at which point you'll have to update the build script... but until you do that, the current build script will still pull in the previous version of the software and all of its dependencies, including system-level ones, so you won't have incidental breakage from the surrounding environment changing out from under you. This works going backwards, too. If you need an older version of some software, Nix can happily…

My point was that for every update, nixpkgs will have to be fixed if the build steps were changed. Currently, it is done by the actual software maintainers. Unless they all start building nixpkgs, it will be too much work to maintain.

Re: Devenv.sh: Fast and reproducible developer environments using Nix

#143
post #97

I think it is an overkill to have your dev environment different from your deploy environments. This would mean you maintain dev environments separately than deploy environments. It would mean you are debugging something other than you are testing and deploying. About reproducibility, unless nix promises to fix all upstreams (apt, pypi ??), I don't see how it can fix reproducibility on the client side only.

You're right, we should work on everyone using NixOS, that way dev and deploy is the same :)

well in that case, the easy way to understand nix is : "A new linux variant and package manager that can compile all packages from source". Why confuse users it has anything to do with dev environments. If your initial product is for development spaces only, it will only complicate things and nobody would use.

Re: Devenv.sh: Fast and reproducible developer environments using Nix

#144

Earlier quoted context omitted.

Yes, at which point you'll have to update the build script... but until you do that, the current build script will still pull in the previous version of the software and all of its dependencies, including system-level ones, so you won't have incidental breakage from the surrounding environment changing out from under you. This works going backwards, too. If you need an older version of some software, Nix can happily…

My point was that for every update, nixpkgs will have to be fixed if the build steps were changed. Currently, it is done by the actual software maintainers. Unless they all start building nixpkgs, it will be too much work to maintain.

The easy way to understand nix is : "A package manager that can compile all packages from source", this functional mumbo-jumbo is just confusing. If apt could compile all its packages from source with an option to do so and a cache, it would be as reproducible.

Re: Devenv.sh: Fast and reproducible developer environments using Nix

#146
post #58
post #44

Earlier quoted context omitted.

Do you use NixOS? I've found it a little too clunky for my taste, as a Gentoo Linux user. But maybe Nix is still worthwhile for me as a standalone tool.

Can you elaborate on what about it is clunky? I've used it as my daily driver for the past year so maybe I can help elaborate too.

I felt like I could never find the docs for what I wanted to do. I had a constant feeling that I was doing stupid stuff that's not considered best practices. I've also tried to use it to manage my home dir with some third party tool recommended by the community, but it felt very hacksish compared to the rest of NixOS.

Re: Devenv.sh: Fast and reproducible developer environments using Nix

#150
post #25

Earlier quoted context omitted.

Containers are way too slow, and take too much space (they don’t share dependencies). Also doesn’t necessarily play well with tools AND is hard to setup for dev environments (what do you mount?)

Containers run nearly identical to native performance and best VMs in practically every category. In what way are they slow?

On my mac it’s really slow to use docker. Maybe I should increase the ram it uses
Post reply on HN