Skip to content
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

add instructions to extend the pkg-config search path to the "Embedding the Nix Evaluator" c api example #10629

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

prednaz
Copy link
Contributor

@prednaz prednaz commented Apr 30, 2024

Motivation

the Embedding the Nix Evaluator example fails to build after building
Nix
because nix-expr-c cannot be found in the pkg-config search path yet.

This work is sponsored by Antithesis

Context

Priorities and Process

Add 👍 to pull requests you find important.

The Nix maintainer team uses a GitHub project board to schedule and track reviews.

@github-actions github-actions bot added the c api Nix as a C library with a stable interface label Apr 30, 2024
Comment on lines +85 to +93
You might need to add the directory containing `nix-expr-c.pc` to the
`PKG_CONFIG_PATH` environment variable. For example after [building
Nix](https://github.com/NixOS/nix/blob/master/doc/manual/src/contributing/hacking.md#building-nix-with-flakes)
by executing the following.

```ShellSession
$ export PKG_CONFIG_PATH=$(realpath outputs/out/lib/pkgconfig):$PKG_CONFIG_PATH
```

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think ideally we'd use nix develop --redirect to hook into the things Nixpkgs setup.sh does, but to be fair, so far I've preferred the robustness of just doing a full build on a fast machine.

Copy link
Contributor Author

@prednaz prednaz May 16, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

good point, thanks for the review! but this looks tricky and i do not think i can do this at the moment. so i will split this pull request so the other parts, #10723 and #10725, can already be merged.

@prednaz prednaz changed the title improvements to the c api documentation add instructions to extend the pkg-config search path to the "Embedding the Nix Evaluator" c api example May 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
c api Nix as a C library with a stable interface
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants