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

View File

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