How to use nix in a legacy development environment?

Just thought about this a bit and was curious, how does one use nix or nixos in an environment using an EoL OS? I have a Fedora 20 dev VM for work, and was wondering how to port it to a nix shell if that is even possible.

Very curious what you all think!

You’ll have to figure out what parts of the “legacy OS” the project needs. I.e. compilers, libraries, build tooling etc. and which exact versions are permissible.

My first step would however be testing whether you actually need any old stuff and it’s not just simply a case of nobody having bothered to see whether a newer version of the OS would work the same in the past decade.
Try a modern Fedora version first. If that works, you could likely just replicate the dev env in Nix.

If not, you’d have to build expressions to build tools compatible with what is required. Perhaps an older release of NixOS/Nixpkgs happens to fulfill all of the version constraints and you could simply use that.

Perhaps all of this is also just not worth the effort and you’d be better of containerising a Fedora 20 environment for something that’s at least a bit more ergonomical than a VM. It’s sounds to me like it’s legacy crap that you should be looking to replace within the next years anyways.

1 Like