Created
May 3, 2024 09:17
-
-
Save bodokaiser/426f198f4af1a3a659dfcfe2fa7738bf to your computer and use it in GitHub Desktop.
Docker development environment for building gatewares using artiq
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM nixos/nix:2.21.2 | |
RUN mkdir -p /root/.config/nix | |
COPY nix.conf /root/.config/nix | |
WORKDIR /app | |
COPY flake.nix . | |
RUN nix develop . | |
CMD nix develop . |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
inputs.artiq.url = "git+https://github.com/m-labs/artiq.git?ref=release-7"; | |
inputs.extrapkg.url = "git+https://git.m-labs.hk/M-Labs/artiq-extrapkg.git?ref=release-7"; | |
inputs.extrapkg.inputs.artiq.follows = "artiq"; | |
outputs = { self, artiq, extrapkg }: | |
let | |
pkgs = artiq.inputs.nixpkgs.legacyPackages.x86_64-linux; | |
aqmain = artiq.packages.x86_64-linux; | |
aqextra = extrapkg.packages.x86_64-linux; | |
in { | |
devShells.x86_64-linux.default = pkgs.mkShell { | |
name = "artiq-env"; | |
buildInputs = [ | |
# ======================================== | |
# EDIT BELOW | |
# ======================================== | |
(pkgs.python3.withPackages(ps: [ | |
# List desired Python packages here. | |
aqmain.artiq | |
#ps.paramiko # needed if and only if flashing boards remotely (artiq_flash -H) | |
#aqextra.flake8-artiq | |
# The NixOS package collection contains many other packages that you may find | |
# interesting. Here are some examples: | |
#ps.pandas | |
#ps.numpy | |
#ps.scipy | |
#ps.numba | |
#ps.matplotlib | |
# or if you need Qt (will recompile): | |
#(ps.matplotlib.override { enableQt = true; }) | |
#ps.bokeh | |
#ps.cirq | |
#ps.qiskit | |
])) | |
#aqextra.korad_ka3005p | |
#aqextra.novatech409b | |
# List desired non-Python packages here | |
#aqmain.openocd-bscanspi # needed if and only if flashing boards | |
# Other potentially interesting packages from the NixOS package collection: | |
#pkgs.gtkwave | |
#pkgs.spyder | |
#pkgs.R | |
#pkgs.julia | |
# ======================================== | |
# EDIT ABOVE | |
# ======================================== | |
]; | |
}; | |
}; | |
nixConfig = { # work around https://github.com/NixOS/nix/issues/6771 | |
extra-trusted-public-keys = "nixbld.m-labs.hk-1:5aSRVA5b320xbNvu30tqxVPXpld73bhtOeH6uAjRyHc="; | |
extra-substituters = "https://nixbld.m-labs.hk"; | |
}; | |
} |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
accept-flake-config = true | |
experimental-features = nix-command flakes |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment