By default, Nim stores intermediate object files in ~/.cache/nim. patch moves the nimcache into the working directory of the guix build. This should not be needed past version 0.4.4 of Chawan. diff --git a/Makefile b/Makefile index 8f538522..6ffc8149 100644 --- a/Makefile +++ b/Makefile @@ -227,7 +227,7 @@ $(OUTDIR_LIBEXEC)/urldec: $(OUTDIR_LIBEXEC)/urlenc # Do not add FLAGS here, because that breaks cross-compilation. $(OBJDIR)/chac: src/chac.nim lib/monoucha0/monoucha/* lib/monoucha0/monoucha/qjs/* - $(NIMC) -o:$@ $< + $(NIMC) --nimcache:"$(OBJDIR)/chac_cache" -o:$@ $< $(OUTDIR_LIBEXEC)/%.jsb: src/%.js $(OBJDIR)/chac $(OBJDIR)/chac $(chac_flags) $< $@ @@ -314,7 +314,7 @@ uninstall: for f in $(manpages1); do rm -f "$(DESTDIR)$(MANPREFIX1)/$$f"; done test/net/run: test/net/run.nim - $(NIMC) test/net/run.nim + $(NIMC) --nimcache:"$(OBJDIR)/test_net" test/net/run.nim .PHONY: map map: @@ -351,12 +351,12 @@ test_flags = --verbosity:0 .PHONY: test_charset test_charset: test/charset/run.sh $(OBJDIR)/chagashi_test (cd test/charset && ./run.sh) - $(NIM) r $(test_flags) test/charset/basic.nim - CGS_TESTDIR=$(OBJDIR)/chagashi_test $(NIM) r $(test_flags) test/charset/data.nim + $(NIM) r $(test_flags) --nimcache:"$(OBJDIR)/test_charset" test/charset/basic.nim + CGS_TESTDIR=$(OBJDIR)/chagashi_test $(NIM) r --nimcache:"$(OBJDIR)/test_charset_data" $(test_flags) test/charset/data.nim .PHONY: test_nim test_nim: test/nim/ttwtstr.nim - (cd test/nim && $(NIM) r $(test_flags) ttwtstr.nim) + (cd test/nim && $(NIM) r --nimcache:"$(OBJDIR)/test_twtstr" $(test_flags) ttwtstr.nim) .PHONY: test test: test_js test_layout test_net test_md test_pager test_charset test_nim