Closed Chiiruno closed 5 years ago
What's the working directory?
I used this: https://github.com/kamilchm/go2nix#example-leaps, so I cd
into src/github.com/bakape/meguca
(the package I was attempting to save) and used go2nix save
.
Is src/github.com/bakape/meguca
inside /run/user/1000/tmp.pY8OMnWUi5/
(the $GOPATH
)?
Did you run go build
in src/github.com/bakape/meguca
before go2nix save
?
Indirectly, yes. https://github.com/bakape/meguca/blob/master/Makefile#L29
/run/user/1000/tmp.pY8OMnWUi5/
is in fact the $GOPATH
.
Is
src/github.com/bakape/meguca
inside/run/user/1000/tmp.pY8OMnWUi5/
(the$GOPATH
)?
Misread, the answer is no, /run/user/1000/tmp.pY8OMnWUi5/
is the $GOPATH
, however the makefile may modify it.
Edit: ...or not, that's old behavior, makefile shouldn't be messing it up.
go2nix
requires the package you save
and all its dependencies to reside inside the GOPATH
As far as I'm aware, that is the case, and this used to work in the past, but I believe @bakape changed to go modules and is requiring the v2 branch of thumbnailer now instead of master.
Seeing the go.mod
in the repo I would suggest to try the new https://nixos.org/nixpkgs/manual/#ssec-go-modules or https://github.com/adisbladis/vgo2nix
For the first link, can I assume that means I could just convert the entire meguca derivation to buildGoModule
, or is it something else? Also thank you for referring me to those two links.
Converting the meguca derivation would be a move in the right direction, although I'm not sure if there's no corner cases in maguca not handled in buildGoModule
.
Well I think I have enough information to fix this now. Is this something planned to be implemented or fixed in this project, or should the issue be closed?
This project will not support go modules in any way so I would close it.
Thank you for the help.
@Chiiruno I'm still using the master branch of thumbnailer. The difference is master being properly marked as the v2 branch now as required by the Go module system.
go2nix save
I'm not really familiar with how this works, so if more information is needed, I'll try to provide it.