The purpose of this workshop is to give you enough context and information to enable you to
build packages from the nixpkgs-tungsten
repository - especially the vrouter kernel modules.
In this workshop we will:
- Install & Configure Nix
- Learn basic commands for building and installing packages
- Build & Install packages from nixpkgs-tungsten
curl https://nixos.org/nix/install | sh
- Add
source ~/.nix-profile/etc/profile.d/nix.sh
to.bashrc
- Restart terminal and try
nix doctor
- Check if
bash-completion
is installed:dpkg -l | grep bash-completion
nix-env -i nix-bash-completions
: install nix bash completions- Add
export XDG_DATA_DIRS="$XDG_DATA_DIRS:$HOME/.nix-profile/share"
to.bashrc
- Start a new terminal session and try
nix-env -i<TAB>
git clone https://github.com/cloudwatt/nixpkgs-tungsten.git
nix-channel --add https://hydra.nix.corp.cloudwatt.com/jobset/nixpkgs-tungsten/trunk/channel/latest contrail
nix-channel --update
nix-env -qa '.*contrail.*'
should work now- Update
.config/nix/nix.conf
with cache settings
nix repl .
-->contrail<TAB>
-- here we can discover everything providednix-env -f default.nix -iA contrailApiCliWithExtra
-->nix-env -q
-->nix-env -e <TAB>
nix-build default.nix -A contrail50.vrouterModuleCentos7_3_10
-->ls ./result