easy-purescript-nix icon indicating copy to clipboard operation
easy-purescript-nix copied to clipboard

Missing git runtime dependency

Open MichaelXavier opened this issue 5 years ago • 3 comments

I'm new to nix so this may be off base but I think spago has an implicit dependency on git since it will clone dependency repositories for building. I was trying to use this package to write a derivation for a nix project and I kept getting Installation failed. Upon upgrading easy-purescript-nix to the newest version that displays the underlying error, it was because git was missing from the nix-build environment. I think this might be a use case for adding it to propagatedBuildInputs in the derivation, which I understand to be where you put dependencies that aren't required directly but will be needed downstream.

MichaelXavier avatar Mar 25 '19 16:03 MichaelXavier

Also probably cacert since most git repos you'd clone from will fail with an SSL certificate error without it.

MichaelXavier avatar Mar 25 '19 16:03 MichaelXavier

Ah, yeah, and this would be another case where I just don't know enough about what spago tries to do since I only use it in some limited ways. Have you had any luck with trying these? I think you also might even manually use wrapProgram with git in the PATH, but I hope what you suggested works out.

justinwoo avatar Mar 25 '19 20:03 justinwoo

I think I may have tripped this by having a dependency from git in spago. I'm assuming if the package is in the package set it just pulls it in as a tarball or something. I can confirm that adding pkgs.cacert and pkgs.git to my derivation's built inputs resolved the issue and I was able to build the whole project. I'm fairly sure adding it to the propagatedBuildInputs of easy-purescript-nix is the right move, since they aren't really build inputs to any of the tools but more like peer dependencies.

MichaelXavier avatar Mar 25 '19 23:03 MichaelXavier