3 ms·
Sounds like a bug with the Nix package, it should be bundling SDL2 as a buildInput if Carp depends on it. I'd open a issue at nixos/nixpkgs. As the other commen
by xcdzvyn 4y ago
Sounds like a bug with the Nix package, it should be bundling SDL2 as a buildInput if Carp depends on it. I'd open a issue at nixos/nixpkgs.
As the other comment mentions, installing pkg-config and sdl2 alongside carp might work, but I suspect Nix is smart enough to properly isolate derivatives such that it wont.
- 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.