HomePhabricator
Diffusion Comm 264a7f504ba1

[Nix] Provide c-ares cmake config

Description

[Nix] Provide c-ares cmake config

Summary:
Nixpkgs provides just a file, however, this doesn't get picked up
automatically by cmake during the configuration step (e.g. cmake ..).
Installing the file at <store path>/lib/cmake/c-ares/c-ares-config.cmake makes
it readily available.

This fixes the issue where cmake will then try other locations to find the file
which causes it to pick up on other installed packages such as c-ares installed
install through homebrew. Similar to D5106.

Example failures: https://buildkite.com/comm/tunnelbroker-unittests/builds/1#01833852-6772-424a-9e9b-332fe70fce85
Example success with this fix: https://buildkite.com/comm/tunnelbroker-unittests/builds/2#_

Test Plan:
Build succeeds: https://buildkite.com/comm/tunnelbroker-unittests/builds/2#_

Or, test locally:

nix develop
cd services/tunnelbroker
rm -rf build && mkdir build && cd build && cmake ..
# should see "-- Found c-ares: /nix/store/.../c-ares-config.cmake (found version "1.18.1")"

Reviewers: atul, varun, abosh, O1 Nix

Reviewed By: atul, varun, O1 Nix

Subscribers: ashoat, tomek

Differential Revision: https://phab.comm.dev/D5128

Details

Provenance
jonAuthored on Sep 13 2022, 3:18 PM
Reviewer
Restricted Owners Package
Differential Revision
D5128: [Nix] Provide c-ares cmake config
Parents
rCOMMaaf7ffa5fafe: [native] add Rust gRPC client to XCode project
Branches
Unknown
Tags
Unknown