Skip to content

Instantly share code, notes, and snippets.

@jakobrs
Last active April 18, 2020 10:10
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jakobrs/c379fa2cab86b799aa692cc0abe50162 to your computer and use it in GitHub Desktop.
Save jakobrs/c379fa2cab86b799aa692cc0abe50162 to your computer and use it in GitHub Desktop.
Some notes on bootstrapping Nix

Some notes:

  • Make sure to install libssl-dev
  • Boost from apt might be too old
  • libeditline might be too old
  • When building bdwgc, remember --enable-cplusplus
  • libboost-all-dev
  • Add -lz to src/libutil/local.mk
  • When running configure, remember --prefix=$PWD/inst
  • If building the manual fails, try to remove 'src/manual/local.mk' from Makefile
  • Stage0 Nix's config file is $(prefix)/etc/nix/nix.conf
  • sudo nix-channel --add https://nixos.org/channels/nixpkgs-unstable nixpkgs
    • There should be a channel named nixpkgs, not nixos, because that is what profile.d/nix-daemon.sh expects
  • ./inst/bin/nix-env -iA nixpkgs.nix
    • Might need to specify the full path to the channel or set NIX_PATH explicitly
      ./inst/bin/nix-env -if /nix/var/nix/profiles/per-user/root/nixpkgs -A nix
  • Source /nix/var/nix/profiles/default/etc/profile.d/nix-daemon.sh and /nix/var/nix/profiles/default/etc/profile.d/nix.sh
  • If there's an error about failing to mount/remount /proc, disable the sandbox
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment