Ludovic Courtès writes: > David Thompson skribis: > >> * guix/build-system/ruby.scm: New file. >> * guix/build/ruby-build-system: New file. >> * Makefile.am (MODULES): Add new files. > > Nice! Some comments: > >> +(define build >> + (lambda _ >> + (system "ls -la") > > Debugging leftover? > Yup. :) >> + (let ((gemspec (car (find-files "." "\\.gemspec$")))) >> + (zero? (system* "gem" "build" gemspec))))) > > Rather (match (find-files ...) ...). > >> +(define* (install #:key source inputs outputs #:allow-other-keys) >> + (let* ((ruby-version >> + (match:substring (string-match "ruby-(.*)$" >> + (assoc-ref inputs "ruby")) >> + 1)) >> + (gem-home (string-append (assoc-ref outputs "out") >> + "/lib/ruby/gems/" >> + ruby-version))) >> + (setenv "GEM_HOME" gem-home) >> + (mkdir-p gem-home) >> + (let ((gem (car (find-files "." "\\.gem$")))) >> + (zero? (system* "gem" "install" "--local" gem))))) > > Ditto. Might be worth defining ‘first-gem-file’ for that. > Wrote a 'first-matching-file' procedure. > Could you also add a few lines in guix.texi under “Build Systems”? > Done. Updated patch attached. Thanks for the review.