Cpp4You / CppLangNet

The modern website for C++ language to make it more accessible.
https://cpp-lang.net
Apache License 2.0
154 stars 39 forks source link

Make the repo a flake #204

Closed Dich0tomy closed 1 year ago

Dich0tomy commented 1 year ago

This is a meta-change to discuss.

Nix is a package manager that allows for reproducible builds, isolated environments and much more. It gains more and more popularity and I think it's worth to make the repo easier to work with for Nix and NixOS users.

A flake is a folder with a flake.nix file and often also a flake.lock file. First one defining the inputs and outputs of a flake (development environments, packages, etc.), second one ensuring builds, environments and such remain reproducible.

This pull request adds the flake.nix, flake.lock and .envrc files. The third file is just a utility for people also using direnv, which automatically loads the development shell defined in flake.nix when entering the directory (it is not intrusive, as users have to direnv allow the file first).

Just to underline it - this change doesn't have any benefits for the CppLangNet project itself, rather it's a niceity for people using Nix.