kamilchm / go2nix

Reproducible builds and development environment for Go
MIT License
94 stars 17 forks source link

... is outside of GOPATH #38

Closed qknight closed 7 years ago

qknight commented 7 years ago

i'm not really sure how to use the go2nix. i made it work with leaps some time ago but can't remember how i managed it. can you please advice?

preparations

in my project dir, as you describe in the 'brief' manual, i do:
export GOPATH=`pwd`

go build is working btw but i used go get github.com/fatih/structs to get the dependency

go2nix

[nix-shell:~/Desktop/projects/fablab/robin/github.com/qknight/selenium_crawler]$ go2nix save
2016/10/25 10:05:02 Current dir /home/joachim/Desktop/projects/fablab/robin/github.com/qknight/selenium_crawler is outside of GOPATH(/home/joachim/Desktop/projects/fablab/robin/github.com/qknight/selenium_crawler). Can't get current package name
qknight commented 7 years ago

oh, got it working:

cd /home/joachim/Desktop/projects/fablab/robin/github.com/qknight/selenium_crawler
mkdir src/inject_into_fluxdb/
mv inject_into_fluxdb.go src/inject_into_fluxdb/
cd  src/inject_into_fluxdb/
go2nix save