-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: use pkg-config to discover pcsclite #75
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm. mind squashing then I'll merge? :)
Co-authored-by: Philip Potter <[email protected]>
@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-go
to be used successfully as a dependency on Nix builds; as well as being generally more predictable.