[Nix-dev] new user / FreeBSD notes

James Cook james.cook at utoronto.ca
Thu May 15 08:47:38 CEST 2008


I've just set up Nix for my first time, on FreeBSD.  Here are some notes.


- My root partition was too small to hold nix, so I created /usr/nix and
  ran the FreeBSD equivalent of mount --bind:
  $ mount_nullfs /usr/nix /nix
  The man page says mount_nullfs doesn't work, but apparantly it does.
  I might try to port the chroot functionality to work on FreeBSD, since
  the claimed reason that it only works on Linux is the lack of
  mount --bind.

- On FreeBSD, you must install bash and symlink /bin/bash to it.  Is
  there some way of bootstrapping bash on Linux?  Since bash isn't part
  of FreeBSD's base system, it might make sense to do the same thing on
  FreeBSD.

- A lot of things won't build properly on FreeBSD.  Some of the problems
  look easy to fix.  Are there any (other) active FreeBSD Nix users
  right now?

- Operations like "nix-env -qa '*'" are slow (take several minutes) if
  you use a recent set of expressiosn, like the unstable channel.  By
  digging through the mailing archive, I found out about the "-A" option:
  for example,
  $ nix-env -i -A bash
  instead of
  $ nix-env -i bash
  Unfortunately, this doesn't work if my default expression is a channel.
  It took me a long time to figure out that you have to prepend something like
  "nixpkgs_unstable" to the attribute string in this case:
  $ nix-env -i -A nixpkgs_unstable.bash

- There aren't many FreeBSD binary packages.  Is this because there isn't a
  build farm that can produce FreeBSD packages, or is there some other
  reason that might be easier to fix?


On the whole, I really like Nix so far!  Thanks Nix team.

James



More information about the nix-dev mailing list