zehome / MLVPN

Multi-link VPN (ADSL/SDSL/xDSL/Network aggregation / bonding)
http://www.mlvpn.fr/
BSD 2-Clause "Simplified" License
520 stars 126 forks source link

add nix flake for reproducible builds #150

Closed DavHau closed 3 years ago

DavHau commented 3 years ago

With this, the project can be built reproducibly on any linux system which has the nix package manager installed, using a single command:

nix-shell -p nixFlakes --run "nix build github:zehome/MLVPN"

Besides the reproducibility aspect, the benefit of this is, that any kind of build instructions become obsolete. No build dependencies need to be installed by the user, etc...

zehome commented 3 years ago

Could you add the help / info on NIX inside the README ?

DavHau commented 3 years ago
zehome commented 3 years ago

Thank you for the contribution. I've tried to build using nix, but without success. I'm stuck with

error: experimental Nix feature 'nix-command' is disabled; use '--experimental-features nix-command' to override

I've not investigated that much, as I'm not a nix user myself..

-> % nix --version
nix (Nix) 2.3.10

Is there an other step to get this thing working?

DavHau commented 3 years ago

Sorry, I forgot about the fact that some nix features we use here are not yet enabled by default. I edited the readme now, to set the correct config option via environment variable. Before you start the build, use this commend to enter the shell with all necessary features enabled: NIX_CONFIG="experimental-features = flakes nix-command" nix-shell -p nixFlakes