Reputation: 1645
I usually wrap all my build logic inside a Makefile, so inside the comment a user noted that the following command was working nix develop --command go build -o foo cmd/main.go
However, when I run the make file I get the following error
$ make
go build -o foo cmd/main.go
# runtime/cgo
flag provided but not defined: -E
Go is a tool for managing Go source code.
Usage:
go <command> [arguments]
The specific target that the Makefile
is using is the following one:
CC=go
FMT=gofmt
NAME=go-nix
BASE_DIR=/script
OS=linux
ARCH=386
ARM=
default: fmt
$(CC) build -o $(NAME) cmd/main.go
fmt:
$(CC) fmt ./...
A minimal reproducible example is in there https://codeberg.org/vincenzopalazzo/go-nix
Upvotes: 0
Views: 26