David Thompson <dthomps...@worcester.edu> 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?

> +    (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.

Could you also add a few lines in guix.texi under “Build Systems”?

Thanks,
Ludo’.

Reply via email to