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