jetify-com / devbox

Instant, easy, and predictable development environments
https://www.jetify.com/devbox/
Apache License 2.0
7.84k stars 188 forks source link

pkg-config is broken #2047

Closed pawlowskialex closed 1 month ago

pawlowskialex commented 1 month ago

What happened?

pkg-config installed through devbox doesn't find any packages.

Steps to reproduce

  1. Run pkg-config --libs --cflags-only-I opus
    Perhaps you should add the directory containing `opus.pc'
    to the PKG_CONFIG_PATH environment variable
    No package 'opus' found

Same shell built with nix-shell works:

> nix-shell -p libopus pkg-config
> pkg-config --libs --cflags-only-I opus
-I/nix/store/6fq8qm00dfs85b94hf6ynvwcfijlqd3b-libopus-1.5.2-dev/include/opus -L/nix/store/s528j3f1c3x7hw3j0w43zm1wxi23c4qw-libopus-1.5.2/lib -lopus

Command

shell

devbox.json

{
  ...
  "packages": [
    "pkg-config@latest",
    "libopus@latest",
  ],
  ...
}

Devbox version

0.10.6

Nix version

nix (Nix) 2.18.2

What system does this bug occur on?

macOS (Apple Silicon)

Debug logs

No response

gcurtis commented 1 month ago

Hi @pawlowskialex, could you try adding libopus with devbox add libopus -o out,dev? I think this might be because nix-shell is automatically adding the dev output to the environment.

pawlowskialex commented 1 month ago

That worked, thank you! Feel free to close!