acowley / cabbage

A tool for caching cabal builds in a Nix store
33 stars 1 forks source link

local system libs #4

Open cocreature opened 9 years ago

cocreature commented 9 years ago

Sometimes you want to depend on a system library that is not yet on nixpkgs. That would require writing a .nix file for it, but I am not sure how to pass that lib to cabbage after having done that.

acowley commented 9 years ago

Yeah, I lucked out in that there is already support for OS X frameworks. I'm pretty new to Nix, but I think this would be referred to as adding an impurity. What I'm not clear on yet is exactly how to plumb it through to the build environment of the package that needs it.

cocreature commented 9 years ago

I don't think you need an impurity for that. The lib could still be managed by nix and not by your system. You just need a way to build system libs from a .nix file.

acowley commented 9 years ago

Oh, sorry, I misunderstood. I thought you wanted to avoid writing the Nix file and just wanted to pull in a .a from somewhere. Okay, right, this is definitely solveable. It just has to get pulled into the generated shell.nix, and passed on through like anything else. It will require a tweak to the way systemDeps are handled, but I think it will fit in that mechanism.