Boost includes missing in FHS environment

Hello,

i have troubles getting a project of mine to work in nixos, so as a last resort I wanted to use a FHS-User environment for that project.
Since it is a cuda project, I used the FHSUserEnvironment example from here:
https://nixos.wiki/wiki/Nvidia

But in addition, i also need the boost library, so i added it to the targetPkgs set

targetPkgs = pkgs: with pkgs; [ ... boost167 ...];

This puts the libboost_*.so libraries under /usr/lib,
but the header files are missing !

I read about boost being a split package, and maybe it has something to do with that,
but I can’t figure out how I could fix that.

Does anybody has an idea ?
Thanks!

Nice! That was it!
Where did you find that piece of information ?
I thought I went carefully enough through the nixpkgs manual :confused:

Thanks anyway!

The fact that only some parts of the package are included pointed out it is likely caused by multiple outputs.

I usually prefer looking at the source code since I often find it easier to scan through than human writing so I looked at the source for fhs userenv (greping for buildFHSUserEnv =) and noticed:

https://github.com/NixOS/nixpkgs/blob/3cc42af71fab4695324d08b8b866a12ffb16a400/pkgs/build-support/build-fhs-userenv/env.nix#L6

looking at how it is used

https://github.com/NixOS/nixpkgs/blob/3cc42af71fab4695324d08b8b866a12ffb16a400/pkgs/build-support/build-fhs-userenv/env.nix#L125

lead me to buildEnv, which confirmed my suspicion:

https://github.com/NixOS/nixpkgs/blob/3cc42af71fab4695324d08b8b866a12ffb16a400/pkgs/build-support/buildenv/default.nix#L59-L69

Thought the argument is actually mentioned in the manual: NixOS - Nixpkgs 21.05 manual

Thanks for describing the process to me!