go2nix icon indicating copy to clipboard operation
go2nix copied to clipboard

Support for gb manifest files

Open chris-martin opened this issue 7 years ago • 2 comments

For gb projects, we should be able to produce deps.nix directly from the manifest, right?

A question, though: How do you express in deps.nix packages that aren't based in a repo's root? For example: https://github.com/stellar/horizon/blob/94a9f35d93f33e365e3a154d6dce08b0e15df608/vendor/manifest#L78

chris-martin avatar Jan 03 '17 21:01 chris-martin

I didn't use gb, so the path in its manifest is something new for me. It looks like optimization that can make vendor dir cleaner https://github.com/constabulary/gb/blob/master/cmd/gb-vendor/restore.go#L62 We can't download repo subdirectory in nix, so I don't think that could optimize anything in nix.

kamilchm avatar Jan 08 '17 22:01 kamilchm

Here's the project I'm building that uses gb: https://github.com/chris-martin/home/blob/009949930514872337a01ac1b20bba041d75e8a8/nix/pkgs/stellar-horizon/default.nix I had to change the GOPATH assembly process to accommodate dependencies that use path, and the project's difference in directory structure from typical Go projects.

And a quick script I threw together to convert the manifest: https://github.com/chris-martin/gb2nix

chris-martin avatar Jan 09 '17 20:01 chris-martin