A nix expression to host this website. Follow these Nix notes for installing Nix.
After installing Nix and cloning this repository, run
$ nix-shell
in the base directory. At that point, you should be able to run all
the functionality as outlined in the PFHub travis.yml
file
including
$ jekyll serve
to view the website locally.
If using OS X run
$ nix-shell shell-osx.nix
instead. This install does not install Jupyter or Bokeh which are not essential for running the website. Both of these packages have proved problematic when installing with Nix on OS X.
The dependencies are all fixed in the above installation. To update
the Python, Ruby and Javascript dependencies use the following. First
change directory to the _nix
directory.
Using Bundix.
Update the Gemfile
if necessary and then
$ nix-shell -p bundler
[nix-shell]$ bundler package --no-install --path vendor
[nix-shell]$ rm -rf .bundler vendor
[nix-shell]$ exit
$ $(nix-build '<nixpkgs>' -A bundix)/bin/bundix
$ rm result
This updates the installed gems.
Instlal pypi2nix and then,
$ pypi2nix -V "3.6" -r requirements.txt
Install node2nix.
$ nix-env -f '<nixpkgs>' -iA nodePackages.node2nix
Then run
$ node2nix --input node-packages.json --output node-packages.nix --composition node.nix
Edit node.nix
and replace nodejs-4_x
with nodejs
in the 5th
line.
$ nix-env -iA cachix -f https://cachix.org/api/v1/install
$ cachix authtoken <TOKEN>
$ nix_build -E '(import ./shell-surge.nix {}).nativeBuildInputs' | cachix push pfhub-surge