periklis has quit [Read error: Connection reset by peer]
psalm has joined #nix-darwin
psalm has quit [Remote host closed the connection]
psalm has joined #nix-darwin
<psalm>
Hello world... nix noob here.. anyone have experience with golang + gco on macOS Mojave?
<psalm>
This is the error I'm seeing: /nix/store/g72v3zdzn5m0i1bggk35shjvgyak9h6f-go-1.12/share/go/src/crypto/x509/root_cgo_darwin.go:16:10: fatal error: 'CoreFoundation/CoreFoundation.h' file not found
<psalm>
Despite having already run this, which should put the headers in the default place: /Library/Developer/CommandLineTools/Packages/macOS_SDK_headers_for_macOS_10.14.pkg
<LnL>
no we don't use the CommandLineTools from apple, is this in a nix build?
<psalm>
No, this is trying to compile a go program that relies on cgo using nix-installed go.
<LnL>
to build something with cgo you'll needa nix build environment otherwise no headers or libraries will be available
<LnL>
or any other compiler for that matter
<psalm>
OK, thanks for the hint. I am super new to this, so do you know of any docs on getting started creating nix build environment that would include macOS headers I specify?
<{^_^}>
#56348 (by robx, 6 weeks ago, open): go 1.11 fails with crypto/x509 and cgo
periklis has joined #nix-darwin
<LnL>
if it's for interactive use, nix-shell -p stdenv gives you a minimal build environment
<LnL>
but it you need other dependencies you also need to declare those, at which point it's usually easier to switch to a file with an expression so you don't have to remember
<psalm>
Then eventually fixed the issue, comments in the GH issue show exactly what I did. It's confusing because many Go programs "just build" even though they are relying on cgo and those same headers afaik, but others need this explicit config/declaration.
<LnL>
I think if you don't have the CLT installed nothing would work
psalm has quit [Read error: Connection reset by peer]
psalm has joined #nix-darwin
psalm has quit [Remote host closed the connection]
psalm has joined #nix-darwin
pxc has joined #nix-darwin
periklis has quit [Ping timeout: 264 seconds]
zmacs has joined #nix-darwin
pxc has quit [Ping timeout: 250 seconds]
zmacs has quit [Quit: My MacBook has gone to sleep. ZZZzzz…]