2
0
mirror of https://github.com/m-labs/artiq.git synced 2025-01-14 12:58:56 +08:00

flake: clean up devShells

Move both devShells into devshells.<...>,
switch from buildInputs to packages
This commit is contained in:
Charlie Root 2024-12-01 00:58:34 +01:00 committed by Sébastien Bourdeauducq
parent 3db8d2310c
commit 2508ff4812

104
flake.nix
View File

@ -423,52 +423,66 @@
packages.x86_64-linux.default = pkgs.python3.withPackages(_: [ packages.x86_64-linux.artiq ]); packages.x86_64-linux.default = pkgs.python3.withPackages(_: [ packages.x86_64-linux.artiq ]);
# Main development shell with everything you need to develop ARTIQ on Linux. devShells.x86_64-linux = {
# The current copy of the ARTIQ sources is added to PYTHONPATH so changes can be tested instantly. # Main development shell with everything you need to develop ARTIQ on Linux.
# Additionally, executable wrappers that import the current ARTIQ sources for the ARTIQ frontends # The current copy of the ARTIQ sources is added to PYTHONPATH so changes can be tested instantly.
# are added to PATH. # Additionally, executable wrappers that import the current ARTIQ sources for the ARTIQ frontends
devShells.x86_64-linux.default = pkgs.mkShell { # are added to PATH.
name = "artiq-dev-shell"; default = pkgs.mkShell {
buildInputs = [ name = "artiq-dev-shell";
(pkgs.python3.withPackages(ps: with packages.x86_64-linux; [ migen misoc ps.paramiko microscope ps.packaging ] ++ artiq.propagatedBuildInputs )) packages = with pkgs; [
rust git
pkgs.llvmPackages_15.clang-unwrapped lit
pkgs.llvm_15 lld_15
pkgs.lld_15 llvm_15
pkgs.git llvmPackages_15.clang-unwrapped
artiq-frontend-dev-wrappers outputcheck
# To manually run compiler tests: pdf2svg
pkgs.lit
pkgs.outputcheck
libartiq-support
# use the vivado-env command to enter a FHS shell that lets you run the Vivado installer
packages.x86_64-linux.vivadoEnv
packages.x86_64-linux.vivado
packages.x86_64-linux.openocd-bscanspi
pkgs.python3Packages.sphinx pkgs.python3Packages.sphinx_rtd_theme pkgs.pdf2svg
pkgs.python3Packages.sphinx-argparse pkgs.python3Packages.sphinxcontrib-wavedrom latex-artiq-manual
pkgs.python3Packages.sphinxcontrib-tikz
];
shellHook = ''
export LIBARTIQ_SUPPORT=`libartiq-support`
export QT_PLUGIN_PATH=${qtPaths.QT_PLUGIN_PATH}
export QML2_IMPORT_PATH=${qtPaths.QML2_IMPORT_PATH}
export PYTHONPATH=`git rev-parse --show-toplevel`:$PYTHONPATH
'';
};
# Lighter development shell optimized for building firmware and flashing boards. python3Packages.sphinx
devShells.x86_64-linux.boards = pkgs.mkShell { python3Packages.sphinx-argparse
name = "artiq-boards-shell"; python3Packages.sphinxcontrib-tikz
buildInputs = [ python3Packages.sphinxcontrib-wavedrom
(pkgs.python3.withPackages(ps: with packages.x86_64-linux; [ migen misoc artiq ps.packaging ps.paramiko ])) python3Packages.sphinx_rtd_theme
rust
pkgs.llvmPackages_15.clang-unwrapped (python3.withPackages(ps: [ migen misoc microscope ps.packaging ps.paramiko ] ++ artiq.propagatedBuildInputs ))
pkgs.llvm_15 ] ++
pkgs.lld_15 [
packages.x86_64-linux.vivado latex-artiq-manual
packages.x86_64-linux.openocd-bscanspi rust
]; artiq-frontend-dev-wrappers
# To manually run compiler tests:
libartiq-support
# use the vivado-env command to enter a FHS shell that lets you run the Vivado installer
packages.x86_64-linux.vivadoEnv
packages.x86_64-linux.vivado
packages.x86_64-linux.openocd-bscanspi
];
shellHook = ''
export LIBARTIQ_SUPPORT=`libartiq-support`
export QT_PLUGIN_PATH=${qtPaths.QT_PLUGIN_PATH}
export QML2_IMPORT_PATH=${qtPaths.QML2_IMPORT_PATH}
export PYTHONPATH=`git rev-parse --show-toplevel`:$PYTHONPATH
'';
};
# Lighter development shell optimized for building firmware and flashing boards.
boards = pkgs.mkShell {
name = "artiq-boards-shell";
packages = [
rust
pkgs.llvmPackages_15.clang-unwrapped
pkgs.llvm_15
pkgs.lld_15
packages.x86_64-linux.vivado
packages.x86_64-linux.openocd-bscanspi
(pkgs.python3.withPackages(ps: [ migen misoc artiq ps.packaging ps.paramiko ]))
];
};
}; };
packages.aarch64-linux = { packages.aarch64-linux = {