feat: use pkg-config to discover pcsclite#75
feat: use pkg-config to discover pcsclite#75ericchiang merged 1 commit intogo-piv:masterfrom rawkode:feat/use-pkg-config
Conversation
|
To echo @FiloSottile, please only make changes to platforms you're able to test this on. This doesn't build on MacOS :) Is it possible to specify pkg-config and fallback to CFLAGS/LDFLAGS if that's not available? |
|
Yeah, it seems According to https://github.com/golang/go/blob/master/src/go/internal/srcimporter/srcimporter.go#L219-L232, these directives should be additive, and all their outputs are passed to the compiler - So it shouldn't hurt to just add the
|
|
@rawkode can you update the PR? |
|
As per feedback, I've updated the PR so that Linux uses |
|
I’m not sure this works on macOS yet. See NixOS/nixpkgs#93769 (comment) Is there a way to ensure pkg-config is only tried on Linux? |
Mea culpa: in NixOS#92936, I did originally test on macOS but I forgot to retest after adding the piv-go patch. Unfortunately, the piv-go patch was broken on macOS. This pulls in the latest version of go-piv/piv-go#75 which works on macOS now.
ericchiang
left a comment
There was a problem hiding this comment.
lgtm. mind squashing then I'll merge? :)
Co-authored-by: Philip Potter <philip.g.potter@gmail.com>
|
@ericchiang Sorted Thanks for everyone's help, @flokli @philandstuff @FiloSottile |
Among other things, this pulls in go-piv/piv-go#75 which makes packaging easier on NixOS (and probably other linux distros).
Among other things, this pulls in go-piv/piv-go#75 which makes packaging easier on NixOS (and probably other linux distros).
This was already mentioned in the comments, but not implemented. This allows for
piv-goto be used successfully as a dependency on Nix builds; as well as being generally more predictable.