@@ -432,6 +432,7 @@ def is_single(self):
432432)
433433@click .option ("--rust/--no-rust" , default = False , help = "Install the Rust toolchain." )
434434@click .option ("--tex/--no-tex" , default = False , help = "Install LaTeX and related tools." )
435+ @click .option ("--verilog/--no-verilog" , default = False , help = "Install the Icarus Verilog simulation tool." )
435436def build (
436437 passthrough : Tuple ,
437438 build_config_name : str ,
@@ -442,6 +443,7 @@ def build(
442443 pic24 : bool ,
443444 rust : bool ,
444445 tex : bool ,
446+ verilog : bool ,
445447) -> None :
446448 """
447449 When executed outside a Docker build, build a Docker container for the Runestone webservers.
@@ -467,10 +469,11 @@ def build(
467469 pic24 ,
468470 rust ,
469471 tex ,
472+ verilog ,
470473 )
471474 # Phase 1 -- build the container.
472475 elif phase == "1" :
473- _build_phase_1 (build_config , arm , pic24 , rust , tex )
476+ _build_phase_1 (build_config , arm , pic24 , rust , tex , verilog )
474477 # Phase 2 - run the startup script for container.
475478 if phase == "2" :
476479 base_ready_text = dedent (
@@ -483,7 +486,7 @@ def build(
483486 )
484487 get_ready_file ().write_text (base_ready_text )
485488 try :
486- _build_phase_2_core (build_config , arm , pic24 , rust , tex )
489+ _build_phase_2_core (build_config , arm , pic24 , rust , tex , verilog )
487490 except Exception :
488491 msg = SERVER_START_FAILURE_MESSAGE
489492 print_exc ()
@@ -514,6 +517,7 @@ def _build_phase_0(
514517 pic24 : bool ,
515518 rust : bool ,
516519 tex : bool ,
520+ verilog : bool ,
517521) -> None :
518522 # If the ``clone-all`` flag is set, override the other ``clone-xxx`` flags.
519523 if clone_all :
@@ -672,6 +676,7 @@ def _build_phase_1(
672676 pic24 : bool ,
673677 rust : bool ,
674678 tex : bool ,
679+ verilog : bool ,
675680):
676681 assert in_docker ()
677682
@@ -808,6 +813,9 @@ def _build_phase_1(
808813 if rust :
809814 xqt (f"{ apt_install } cargo" )
810815
816+ if verilog :
817+ xqt (f"{ apt_install } iverilog" )
818+
811819 # Install web2py and Poetry
812820 # ^^^^^^^^^^^^^^^^^^^^^^^^^
813821 xqt (
@@ -894,6 +902,7 @@ def _build_phase_2_core(
894902 pic24 : bool ,
895903 rust : bool ,
896904 tex : bool ,
905+ verilog : bool ,
897906):
898907 # Check the environment.
899908 assert env .POSTGRES_PASSWORD , "Please export POSTGRES_PASSWORD."
0 commit comments