Skip to content
This repository has been archived by the owner on Aug 26, 2021. It is now read-only.

How to generate expressions for Hugo? #61

Open
kskyten opened this issue Jul 31, 2017 · 2 comments
Open

How to generate expressions for Hugo? #61

kskyten opened this issue Jul 31, 2017 · 2 comments

Comments

@kskyten
Copy link

kskyten commented Jul 31, 2017

I tried to generate the nix expression for Hugo without success. I ran

nix-env -p go git go2nix
mkdir hugobuild
cd hugobuild
export GOPATH=`pwd`
go get -v github.com/gohugoio/hugo
cd src/github.com/gohugoio/hugo
go2nix save

However, I dont't think that all of the dependencies are listed in deps.nix. It seems like the dependencies might be stored in vendor/vendor.json, but I'm not familiar with go at all. How do I generate the nix expressions for Hugo?

@kamilchm
Copy link
Owner

kamilchm commented Aug 1, 2017

It looks like hugo is using govendor https://github.com/gohugoio/hugo/blob/master/Makefile#L15
Try to govendor sync its dependencies and move it somehow under GOPATH/src before go2nix save

There will be easier way when govendor will be supported by golang/dep#815

@kskyten
Copy link
Author

kskyten commented Aug 2, 2017

I noticed that the unstable channel had an updated version of hugo. I wasn't able to generate the nix expressions, although I didn't try very hard. If I come across another similar go package I need to package, I will try again.

As an aside, it would be great if you could document how to package go apps to users unfamiliar with go. The example with writing your own code is a bit confusing. If I understood correctly, you can generate nix expressions for packages by running go get and go2nix save in the downloaded src directory.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants