Skip to content

Commit

Permalink
pkgs/cpu-vexriscv: don't error when source has no Verilog files
Browse files Browse the repository at this point in the history
Downstream users such as tock-litex may patch the `src` attribute of
this derivation, and point to a customized repository which does not
contain any pre-built CPU HDL files yet. Use the `-f` flag to avoid
having `rm` error when it is invoked without any files to delete.

Signed-off-by: Leon Schuermann <leon@is.currently.online>
  • Loading branch information
lschuermann committed Jan 10, 2024
1 parent d21cfc7 commit 82986dd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkgs/pythondata-cpu-vexriscv/generated.nix
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ mkSbtDerivation rec {
runHook preBuild
# delete old CPU variant sources
rm pythondata_cpu_vexriscv/verilog/*.v
#
# Depending on the `src` attribute, these might have already been cleaned,
# use `-f` to avoid generating an error.
rm -f pythondata_cpu_vexriscv/verilog/*.v
# rebuild all CPU variants
make -C pythondata_cpu_vexriscv/verilog
Expand Down

0 comments on commit 82986dd

Please sign in to comment.