Subject: [bug#32031] [PATCH] gnu: Add keynav.

From: [email-masked] (Ludovic Courtès)
Date: Mon, 02 Jul 2018 17:47:24 +0200

Oleg Pykhalov <[email-masked]> skribis:

> * gnu/packages/xorg.scm (keynav): New variable.

[...]

> +    (arguments
> +     `(#:tests? #f

Could you leave a comment explaining why tests are skipped?  If an X
server is needed, we can launch Xvfb before the ‘check’ phase, as many
packages do.

> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'setenv
> +           (lambda _
> +             (setenv "CC" (which "gcc"))))
> +         (add-after 'unpack 'patch-keynav
> +           (lambda _
> +             (substitute* "keynav.c"
> +               (("xdo_symbol_map") "xdo_get_symbol_map")
> +               (("xdo_window_setclass") "xdo_set_window_class")
> +               (("xdo_window_get_active") "xdo_get_window_at_mouse")
> +               (("xdo_click") "xdo_click_window")
> +               (("xdo_mouseup") "xdo_mouse_up")
> +               (("xdo_mousedown") "xdo_mouse_down")
> +               (("xdo_mousemove") "xdo_move_mouse")
> +               (("xdo_mousemove_relative") "xdo_move_mouse_relative")
> +               (("xdo_mouselocation") "xdo_get_mouse_location")
> +               (("xdo_mouse_wait_for_move_to") "xdo_wait_for_mouse_move_to")
> +               (("xdo_keysequence_up") "xdo_send_keysequence_window_up")
> +               (("xdo_keysequence_down") "xdo_send_keysequence_window_down"))))
> +         (delete 'configure)
> +         (replace 'install
> +           (lambda* (#:key outputs #:allow-other-keys)
> +             (let ((out (assoc-ref outputs "out")))
> +               (install-file "keynav" (string-append out "/bin"))
> +               (install-file "keynavrc" (string-append out "/etc"))))))))

Please return #t in each of these phases.

Thanks,
Ludo’.