Subject: Re: bug#25991: [PATCH] gnu: surf: Add 'dmenu' and 'xprop' to 'inputs'.

From: Kei Kebreau <[email-masked]>
Date: Sun, 05 Mar 2017 22:20:09 -0500

Mekeor Melire <[email-masked]> writes:

> This is meant to fix bug#25759 “Should 'surf' depend on 'xprop' and
> 'dmenu'?“:
>
> https://lists.gnu.org/archive/html/bug-guix/2017-02/msg00054.html
>
> I'm not sure if we really want this patch to be merged because there was
> not much of a discussion on this proposal on the mailing list.
>

This patch concerns basic functionality of the software, so I don't
think we'll hear objections.

> Also, I hope I'm sending it to the right mailing-list. I'm quite
> confused by all the mailing-lists and bug-trackers.
>

I'm seeing this in my debbugs interface, so you must be doing something
correctly.

>>>From 4f11e27908987cc8d607809785726fceadc0535f Mon Sep 17 00:00:00 2001
> From: Mekeor Melire <[email-masked]>
> Date: Mon, 6 Mar 2017 02:36:47 +0100
> Subject: [PATCH] gnu: surf: Add 'dmenu' and 'xprop' to 'inputs'.
>
> * gnu/packages/suckless.scm (surf)[inputs]: Add dmenu and xprop.
> ---
>  gnu/packages/suckless.scm | 6 ++++--
>  1 file changed, 4 insertions(+), 2 deletions(-)
>
> diff --git a/gnu/packages/suckless.scm b/gnu/packages/suckless.scm
> index e30a0883a..c845a0c72 100644
> --- a/gnu/packages/suckless.scm
> +++ b/gnu/packages/suckless.scm
> @@ -257,9 +257,11 @@ drawing.")
>         (modify-phases %standard-phases
>           (delete 'configure))))
>      (inputs
> -     `(("glib-networking" ,glib-networking)
> +     `(("dmenu" ,dmenu)
> +       ("glib-networking" ,glib-networking)
>         ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)
> -       ("webkitgtk" ,webkitgtk/gtk+-2)))
> +       ("webkitgtk" ,webkitgtk/gtk+-2)
> +       ("xprop" ,xprop)))
>      (native-inputs
>       `(("pkg-config" ,pkg-config)))
>      (home-page "http://surf.suckless.org/")

This patch doesn't work as-is, but it's halfway done. The next step
would be to replace the "dmenu" and "xprop" instances in surf's source
code with the path to the two binaries you just included. For example:

(let ((libc (assoc-ref inputs "libc")))
  (substitute* "lib/nscd.c"
    (("/usr/sbin/nscd")
     (string-append libc "/sbin/nscd"))))

This code was taken from line 296 of gnu/packages/admin.scm in the Guix
source tree.