NIX_PATH used to be enough to select the channel to use, but as Travis
add the nixpkgs-unstable channel we can get unexpected results when
nix decides to push a new unstable version out there in the public.
language: nix
nix: 2.3.4
env:
- - NIX_PATH=nixpkgs=channel:nixos-20.03
+ - CUSTOM_NIX_PATH=nixpkgs=channel:nixos-20.03
+
+# Travis nix integration will install nix AFTER the environment variables are set
+# and the nix installer will overide NIX_PATH variable thus we need to re-export it
+before_install:
+ - export NIX_PATH="$CUSTOM_NIX_PATH"
install:
- nix-env -i -f ./default.nix