Cannot use nix support on OSX

I am trying to combine language: nix and nix: 2.2.1 with os: osx , but the nix installer fails:

$ export NIX_CURL_FLAGS=-sS
0.46s$ wget --retry-connrefused --waitretry=1 -O /tmp/nix-install
--2019-04-06 12:37:44--
Resolving (
Connecting to (||:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: 2476 (2.4K) [text/plain]
Saving to: ‘/tmp/nix-install’
     0K ..                                                    100% 69.4M=0s
2019-04-06 12:37:45 (69.4 MB/s) - ‘/tmp/nix-install’ saved [2476/2476]
30.05s$ yes | sh /tmp/nix-install
downloading Nix 2.2.1 binary tarball for x86_64-darwin from '' to '/var/folders/nz/vv4_9tw56nv9k3tkvyszvwg80000gn/T/nix-binary-tarball-unpack.XXXXXXXXXX.yHmMTWj5'...
Note: a multi-user installation is possible. See
performing a single-user installation of Nix...
directory /nix does not exist; creating it by running 'mkdir -m 0755 /nix && chown travis /nix' using sudo
copying Nix to /nix/store...................................
initialising Nix database...
Nix: creating /Users/travis/.nix-profile
installing 'nix-2.2.1'
building '/nix/store/51rcrm2hazifzms7iiwswhajmvidkbh8-user-environment.drv'...
created 7 symlinks in user environment
installing 'nss-cacert-3.40.1'
building '/nix/store/9fhls7hrmwh4zrs3ipw55jkb669fyjc2-user-environment.drv'...
created 9 symlinks in user environment
unpacking channels...
created 2 symlinks in user environment
modifying /Users/travis/.bash_profile...
Installation finished!  To ensure that the necessary environment
variables are set, either log in again, or type
  . /Users/travis/.nix-profile/etc/profile.d/
in your shell.
0.01s$ source /nix/var/nix/profiles/default/etc/profile.d/
/Users/travis/.travis/functions: line 104: /nix/var/nix/profiles/default/etc/profile.d/ No such file or directory
The command "source /nix/var/nix/profiles/default/etc/profile.d/" failed and exited with 1 during .

Is this expected to work?


      os: osx
      language: generic
      - curl | sh
      - source /Users/travis/.nix-profile/etc/profile.d/
1 Like

iirc the old darwin installer was not multi-user by default, while Nix 2.2.1 is. So there’s some fiddling around to get that working with newer Nix I’m afraid (until someone fixes travis setup).