> > Hi, > > I’m having problems with a piece of code. > > ;; Retrieve git commit date > (define get-commit-date (lambda _ > (let* ((out (open-input-pipe (format #f "curl --silent '~a'" %api-url))) > (str (get-string-all out)) > (queryResults (json-string->scm str)) > (date (cdr (hash-get-handle (cdr (hash-get-handle (cdr > (hash-get-handle queryResults "commit")) "author")) "date")))) > (display "Contacting github for commit date...\n") > (close-pipe out) > date))) > > This code sits above my package code and I use it to dynamically populate my > some values when building my package. > > Everything works great and I can install the package locally without any > problems. > > My issue occurs if I try to issue a guix pull to bring this in through a > separate channel. > > When I do that I always get /gnu/store/…-bash-minimal-4.4.23/bin/bash: curl: > command not found. > > Any help would be greatly appreciated. > > Thanks. >
So I’ve worked on this further and I was able to get the curl command to run. In the end, it turns out that the networking service is not available when building a package. It’s probably not worth the trouble to make it work.