guix-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH 2/3] build: Add ruby build system.


From: Ludovic Courtès
Subject: Re: [PATCH 2/3] build: Add ruby build system.
Date: Sun, 28 Sep 2014 17:50:28 +0200
User-agent: Gnus/5.130011 (Ma Gnus v0.11) Emacs/24.3 (gnu/linux)

David Thompson <address@hidden> 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

[Prev in Thread] Current Thread [Next in Thread]