I have a python package tree-sitter-languages that I am trying to build for the sake of using it ultimately in aider.
There is a somewhat nasty build script that calls git manually a bunch of times to clone tree sitter grammars and then runs a build action over them. I may attempt to patch or coax upstream at some point to get this fixed properly, but for the time being I'd just like to get the damn thing to build so I can actually use it on my NixOS machine.
So as a stop-gap I am using a fixed-output derivation, but I am arriving at an impass of Nix giving me the "illegal path reference" error and in order to debug it and find the path I've had to build the derivations enough times that I have now been rate limited by github due to all the cloning.
Thinking I could get around this problem by using a PAT to clone. So with all that useless context out of the way (in case anyone wants to help with any of those problems as well :sweat_smile:) my immediate question is if anyone has found a simple way to pass auth creds (either PAT or SSH) into a fixed-output derivation for the git cli to consume?
It is a general enough question that I figured we could use an answer for posterity anyway.
I haven't personally tried it out but maybe this can help.
No that's if you are using Nix properly and fetching them with the building or FoD fetchers.
In this case the builder calls git directly. I already know how to fix it more or less, just didn't know if a more elegant solution than the one I will attempt already existed possibly.
Shelving it til Monday though
Last updated: Nov 15 2024 at 11:45 UTC