all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de>
Cc: guix-devel@gnu.org
Subject: Re: [PATCH 5/6] gnu: Add lua5.2-lpeg.
Date: Thu, 26 Jan 2017 19:01:06 +0100	[thread overview]
Message-ID: <878tpxwvj1.fsf@gnu.org> (raw)
In-Reply-To: <20170124144015.24473-5-ricardo.wurmus@mdc-berlin.de> (Ricardo Wurmus's message of "Tue, 24 Jan 2017 15:40:14 +0100")

Ricardo Wurmus <ricardo.wurmus@mdc-berlin.de> skribis:

> * gnu/packages/lua.scm (lua5.2-lpeg): New variable.

I think you didn’t get feedback on this one.

> +(define-public lua5.2-lpeg
> +  (package (inherit lua-lpeg)
> +    (name "lua5.2-lpeg")
> +    (arguments
> +     `(#:phases
> +       (modify-phases %standard-phases
> +         (delete 'configure)
> +         ;; `make install` isn't available, so we have to do it manually
> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out"))
> +                   (lua-version ,(version-major+minor (package-version lua-5.2))))
> +               (install-file "lpeg.so"
> +                             (string-append out "/lib/lua/" lua-version))
> +               (install-file "re.lua"
> +                             (string-append out "/share/lua/" lua-version))

It would be best to avoid duplicating this phase since the only
difference is the version number.  However, this is currently
inconvenient, so it’s probably fine to keep it, with an “XXX” comment.

To fix it, we’d have to arrange for the phase to stand alone as opposed
to getting the Lua version number from the “host side”.  So it would be
written along the lines of:

  (lambda …
    (let* ((lua (assoc-ref inputs "lua"))
           (lua-version (extract-version lua)))
      …))

The Python stuff uses a similar pattern.  The ‘extract-version’ thing is
necessarily hacky and brittle though.

Alternately, we could pass the info as an environment variable,
something that’s not done anywhere yet.

Ludo’.

  reply	other threads:[~2017-01-26 18:01 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-01-24 14:40 [PATCH 1/6] gnu: Add libmpack Ricardo Wurmus
2017-01-24 14:40 ` [PATCH 2/6] gnu: Add lua-libmpack Ricardo Wurmus
2017-01-24 18:51   ` Leo Famulari
2017-01-25  9:18     ` Ricardo Wurmus
2017-01-24 14:40 ` [PATCH 3/6] gnu: Add lua5.2-libmpack Ricardo Wurmus
2017-01-24 14:40 ` [PATCH 4/6] gnu: Add lua5.2-bitop Ricardo Wurmus
2017-01-24 18:52   ` Leo Famulari
2017-01-25  9:17     ` Ricardo Wurmus
2017-01-24 14:40 ` [PATCH 5/6] gnu: Add lua5.2-lpeg Ricardo Wurmus
2017-01-26 18:01   ` Ludovic Courtès [this message]
2017-01-31 19:41     ` Ricardo Wurmus
2017-01-24 14:40 ` [PATCH 6/6] gnu: Add neovim Ricardo Wurmus
2017-01-24 21:31   ` Ludovic Courtès
2017-01-31 20:04     ` Ricardo Wurmus

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=878tpxwvj1.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=guix-devel@gnu.org \
    --cc=ricardo.wurmus@mdc-berlin.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.