8 # No need to workaround -trimpath: it's not used in goModules,
9 # but do download `go generate`'s dependencies nonetheless.
11 if [ -d ./loaders ]; then go generate ./loaders; fi
12 if [ -d ./graph ]; then go generate ./graph; fi
17 # Workaround this error:
18 # go: git.sr.ht/~emersion/go-emailthreads@v0.0.0-20220412093310-4fd792e343ba: module lookup disabled by GOPROXY=off
19 # tidy failed: go mod tidy failed: exit status 1
20 # graph/generate.go:10: running "go": exit status 1
23 nativeBuildInputs = [ unzip ];
25 # Workaround -trimpath in the package derivation:
26 # https://github.com/99designs/gqlgen/issues/1537
27 # This is to give `go generate ./graph` access to gqlgen's *.gotpl files
28 # If it fails, the gqlgenVersion may have to be updated.
30 unzip ''${GOPROXY#"file://"}/github.com/99designs/gqlgen/@v/v${gqlgenVersion}.zip
31 if [ -d ./loaders ]; then go generate ./loaders; fi
32 if [ -d ./graph ]; then go generate ./graph; fi