artiq/nix/README.rst

41 lines
1.8 KiB
ReStructuredText
Raw Normal View History

2019-01-01 22:25:56 +08:00
Use ARTIQ via the Nix Package Manager
=====================================
2018-08-17 12:19:16 +08:00
These instructions provide an alternative route to install ARTIQ for people who do not wish to use conda.
2018-08-17 12:27:17 +08:00
This sets up an environment suitable for using ARTIQ, including the ARTIQ-Python compiler, device drivers, and the graphical user interfaces. This works correctly on Linux, and partially works (but not to a level that we would consider usable) with WSL introduced in Windows 10.
2018-08-17 12:19:16 +08:00
* Install the Nix package manager
2018-08-17 12:19:16 +08:00
* many Linux distros already have a package for the `Nix package manager <http://nixos.org/nix/>`_
2018-08-17 12:19:16 +08:00
* for example: ``$ apt-get install nix``
2018-08-17 12:19:16 +08:00
* if you would like to install via sh
2019-02-10 01:04:28 +08:00
* ``$ wget https://nixos.org/nix/install``
2018-08-17 12:19:16 +08:00
2019-02-10 01:04:28 +08:00
* ``$ sh install``
2018-08-17 12:19:16 +08:00
2019-02-10 01:04:28 +08:00
* ``$ source ~/.nix-profile/etc/profile.d/nix.sh``
2018-08-17 12:19:16 +08:00
2019-02-10 01:04:28 +08:00
* ``$ nix-channel --add https://nixbld.m-labs.hk/project/artiq/channel/latest m-labs``
* ``$ nix-channel --update``
* create the file ``~/.config/nix/nix.conf`` with the following content:
::
2019-02-10 01:07:55 +08:00
substituters = https://cache.nixos.org https://nixbld.m-labs.hk
trusted-public-keys = cache.nixos.org-1:6NCHdD59X431o0gWypbMrAURkbJ16ZPMQFGspcDShjY= nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc=\
2019-02-10 01:04:28 +08:00
* ``$ nix-env -i python3.6-artiq``
2019-01-01 22:25:56 +08:00
ARTIQ development environment with Nix
======================================
Run ``nix-shell shell-dev.nix`` to obtain an environment containing Migen, MiSoC, Microscope, jesd204b, Clang, Rust, Cargo, and OpenOCD in addition to the user environment above.
2019-01-01 22:25:56 +08:00
This creates a FHS chroot environment in order to simplify the installation and patching of Xilinx Vivado (it needs to be installed manually e.g. in your home folder).
You can then build the firmware and gateware with a command such as ``python -m artiq.gateware.targets.kasli --gateware-toolchain-path ~/Xilinx/Vivado``.