3 ms·
> I suspect Nix is smart enough to properly isolate derivatives That's not really relevant here, as carp itself seems to basically do code-gen and then compile
by tazjin 4y ago
> I suspect Nix is smart enough to properly isolate derivatives
That's not really relevant here, as carp itself seems to basically do code-gen and then compile stuff on its own (outside of any Nix build), so the environment in which you run carp must be set up such that the compiler and linker running in it can discover the needed libraries. Very often the mechanism used for that is pkg-config.
If you wanted a more "Nixy" way to do this, you could write a `buildCarp` suite of functions in Nix that correctly sets all this up inside of a derivation build and takes the Carp code you're compiling as an input, yielding the compiled one as a Nix store path.
For just playing around, it seems more reasonable to just add the needed dependencies to the runtime environment of carp.