Building soci for nixos #1085
seanrmurphy
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi,
I'm trying to experiment a little with soci and I want to build it for nixos as that's what I use.
I have been able to build the
soci
CLI and I guess I can build the grpc service (although I have not built it yet).I encountered a few issues and would appreciate some feedback from you guys on how to deal with them:
Makefile
fundamentally because the nix build process is quite strict on separating the vendoring process (where network access is required) from the compilation process (where network access is not permitted) - this is not a big issue as I was able to avoid using theMakefile
but I was a little confused that one of the build targets in theMakefile
is calledvendor
but it actually doesgo mod tidy
which is quite different fromgo mod vendor
- would it make sense to change the name of the build target totidy
?pkg-config
to link tozlib
, I had to change this line to// #cgo pkg-config: zlib
- I wonder have you guys considered using this?go.mod
in thecmd
directory contains a relative link here - this does not play nice with nix - for releases, would it be possible to make this absolute?My current (incomplete) solution is to pull my version of the repo with the above changes but I think I should be able to modify it to use this repo and apply a couple of changes using
sed
and perform the build with the standard go tools rather than theMakefile
- it's definitely suboptimal but so far has been the only solution that I've found. I think it would be nice if I could at least remove thesed
substitution as this feels v brittle obviously.Would be interested in any thoughts you might have on this.
Thanks, rgds,
Sean.
Beta Was this translation helpful? Give feedback.
All reactions