kamilchm / go2nix

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

Help generating a package for Leanote #63

Closed pjones closed 7 years ago

pjones commented 7 years ago

I'm unfamiliar with Go development but would like to create a Nix package for leanote.

From what I gather it's a web application using the Revel framework. Running the application involves installing the revel binary and then executing it, providing it the path to leanote:

revel run github.com/leanote/leanote

In this case, I'm not really sure if go2nix can generate a package for me. Or perhaps I need to generate two packages, one for revel and one for leanote. Either way, I'm confused how to create a package that would allow someone to ultimately run the command above (or some wrapped variation of it).

Any help would be greatly appreciated. Thank you.

pjones commented 7 years ago

Hmm, perhaps I need a postInstall that does this.

orivej commented 7 years ago

You should import revel and leanote with go2nix as two separate packages, and alter buildPhase of leanote to use ${revel.bin}/bin/revel build instead of go build.

pjones commented 7 years ago

Thanks for the suggestion @orivej, I'll give that a try.

pjones commented 7 years ago

Breaking things up into two packages does appear to be the best solution. Thank you.