Pkg-config, pcre, ocaml, opam install conf-libpcre

Any advice on how to install this? I think problem has to do with pkg-config libpcre being empty.

[y@c240:~]$ nix-shell -p pcre pcre.dev --run "ocaml --version; echo '=='; pkg-config libpcre; echo '=='; opam install conf-libpcre  -y"
The OCaml toplevel, version 5.0.0
==
==
[NOTE] External dependency handling not supported for OS family 'nixos'.
       You can disable this check using 'opam option --global depext=false'
The following actions will be performed:
  ∗ install conf-libpcre 1

<><> Processing actions <><><><><><><><><><><><><><><><><><><><><><><><><><><><>
[ERROR] The compilation of conf-libpcre.1 failed at "pkg-config libpcre".

#=== ERROR while compiling conf-libpcre.1 =====================================#
# context     2.1.3 | linux/x86_64 | ocaml-base-compiler.5.0.0 | https://opam.ocaml.org#21f454ea
# path        ~/.opam/default/.opam-switch/build/conf-libpcre.1
# command     ~/.opam/opam-init/hooks/sandbox.sh build pkg-config libpcre
# exit-code   1
# env-file    ~/.opam/log/conf-libpcre-3444292-a9f8a2.env
# output-file ~/.opam/log/conf-libpcre-3444292-a9f8a2.out



<><> Error report <><><><><><><><><><><><><><><><><><><><><><><><><><><><><><><>
┌─ The following actions failed
│ λ build conf-libpcre 1
└─ 
╶─ No changes have been performed

[y@c240:~]$ cat .opam/log/conf-libpcre-3444292-a9f8a2.out 

[y@c240:~]$ 

Where comes pkg-config from?

As it’s not part of the shell itself, it’s hooks aren’t run which discover the pc files, and therefore it is unaware of libpcre.

Please try it with a self contained shell.nix that defines your shell.