sb10q
My flake.nix looks like this:
{
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";
inputs.ThorlabsPM100.url = "git+https://github.com/clade/ThorlabsPM100";
outputs = { self, artiq, extrapkg,ThorlabsPM100 }:
let
pkgs = artiq.inputs.nixpkgs.legacyPackages.x86_64-linux;
aqmain = artiq.packages.x86_64-linux;
aqextra = extrapkg.packages.x86_64-linux;
in {
defaultPackage.x86_64-linux = pkgs.buildEnv {
name = "artiq-env";
paths = [
# ========================================
# EDIT BELOW
# ========================================
(pkgs.python3.withPackages(ps: [
# List desired Python packages here.
aqmain.artiq
ThorlabsPM100
#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";
};
}
I'm not able to develop the new nix file and my error message was:
Traceback (most recent call last):
File "/nix/store/ky5j6106mjc6qgf1l4607z3bpg3yclgl-python3.9-artiq-7.8173.ff97675/bin/.artiq_run-wrapped", line 9, in <module>
sys.exit(main())
File "/nix/store/j74mzbwqvf900r3ikdp6maxnzgspwhyn-python3-3.9.16-env/lib/python3.9/site-packages/artiq/frontend/artiq_run.py", line 224, in main
return run(with_file=True)
File "/nix/store/j74mzbwqvf900r3ikdp6maxnzgspwhyn-python3-3.9.16-env/lib/python3.9/site-packages/artiq/frontend/artiq_run.py", line 210, in run
raise exn
File "/nix/store/j74mzbwqvf900r3ikdp6maxnzgspwhyn-python3-3.9.16-env/lib/python3.9/site-packages/artiq/frontend/artiq_run.py", line 201, in run
exp_inst = _build_experiment(device_mgr, dataset_mgr, args)
File "/nix/store/j74mzbwqvf900r3ikdp6maxnzgspwhyn-python3-3.9.16-env/lib/python3.9/site-packages/artiq/frontend/artiq_run.py", line 176, in _build_experiment
module = file_import(args.file, prefix="artiq_run_")
File "/nix/store/j74mzbwqvf900r3ikdp6maxnzgspwhyn-python3-3.9.16-env/lib/python3.9/site-packages/artiq/tools.py", line 87, in file_import
spec.loader.exec_module(module)
File "/nix/store/j74mzbwqvf900r3ikdp6maxnzgspwhyn-python3-3.9.16-env/lib/python3.9/site-packages/artiq/compiler/import_cache.py", line 23, in hook_exec_module
im_exec_module(self, module)
File "<frozen importlib._bootstrap_external>", line 850, in exec_module
File "<frozen importlib._bootstrap>", line 228, in _call_with_frames_removed
File "/home/cjain/quant-net-dev-control/dev_control/polar_ctrl.py", line 6, in <module>
from ThorlabsPM100 import ThorlabsPM100, USBTMC
ModuleNotFoundError: No module named 'ThorlabsPM100'