unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: "Nicolò Balzarotti" <anothersms@gmail.com>
To: Pierre Neidhardt <mail@ambrevar.xyz>, 41134@debbugs.gnu.org
Subject: [bug#41134] [PATCH 2/2] gnu: Add libappindicator.
Date: Mon, 11 May 2020 13:46:57 +0200	[thread overview]
Message-ID: <87a72epuby.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me> (raw)
In-Reply-To: <87lfm3sz9v.fsf@ambrevar.xyz>

[-- Attachment #1: Type: text/plain, Size: 274 bytes --]


Hi Pierre,

I packaged some time ago dbus-test-runner (libappindicator-12.10.1,
sligthly newer than yours, with all dependencies with all tests) but
never had the time to submit it.

If you want to take ownership of the patch and enable tests, here's the
file I was using


[-- Attachment #2: blueman.scm --]
[-- Type: application/octet-stream, Size: 9313 bytes --]

(define-module (guixpkgs blueman)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix build-system gnu)
  #:use-module (guix build-system meson)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix git-download)
  #:use-module (guix utils)
  #:use-module (gnu packages autotools)
  #:use-module (gnu packages cmake)
  #:use-module (gnu packages glib)
  #:use-module (gnu packages gnome)
  #:use-module (gnu packages gtk)
  #:use-module (gnu packages linux)
  #:use-module (gnu packages python)
  #:use-module (gnu packages python-xyz)
  #:use-module (gnu packages pulseaudio)
  #:use-module (gnu packages pkg-config)
  #:use-module (gnu packages xorg))

(define-public dbus-test-runner
  (package
    (name "dbus-test-runner")
    (version "19.04.0")
    (source (origin
	      (method url-fetch)
	      (uri (string-append
		    "https://launchpad.net/dbus-test-runner/"
		    (version-major+minor version) "/" version
		    "/+download/dbus-test-runner-" version ".tar.gz"))
	      (sha256
	       (base32
		"0xnbay58xn0hav208mdsg8dd176w57dcpw1q2k0g5fh9v7xk4nk4"))))
    (build-system gnu-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
    	 (add-before 'configure 'fix-test-paths
    	   ;; add missing space
    	   (lambda* (#:key outputs #:allow-other-keys)
	     (substitute* "Makefile.in"
    	       (("#!/bin/bash") (string-append "#!" (which "bash"))))
    	     (substitute* "tests/Makefile.in"
    	       (("/bin/sh") (which "sh"))
	       (("#!/bin/bash") (string-append "#!" (which "bash")))
	       (("echo cat") (string-append "echo " (which "cat")))
	       (("/bin/true") (which "true")))
    	     #t)))))
    (inputs
     `(("gtk+" ,gtk+)
       ("glib" ,glib)
       ("dbus-glib" ,dbus-glib)))
    (native-inputs
     `(("glib:bin" ,glib "bin")
       ("intltool" ,intltool)
       ("pkg-config" ,pkg-config)
       ;; following used for tests
       ("python" ,python)
       ("python-dbusmock" ,python-dbusmock)
       ("xvfb" ,xorg-server-for-tests)))
    (home-page "https://launchpad.net/dbus-test-runner")
    (synopsis "Run a executables under a new DBus session for testing")
    (description "A small little utility to run a couple of executables under a
new DBus session for testing.")
    (license license:gpl3)))

(define-public libindicator
  (package
    (name "libindicator")
    (version "12.10.1")
    (source (origin
	      (method url-fetch)
	      (uri (string-append
		    "https://launchpad.net/libindicator/"
		    (version-major+minor version) "/" version
		    "/+download/libindicator-" version ".tar.gz"))
	      (sha256
	       (base32
		"0zs4z7l9b57jldwz0ban77f3c2zq43ambd0dssf5qg9i216f9lmj"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags '("CFLAGS=-Wno-error")
       #:phases
       (modify-phases %standard-phases
	 (add-before 'configure 'fix-libm
	   ;; add missing space
	   (lambda* (#:key outputs #:allow-other-keys)
	     (substitute* "configure"
	       (("LIBM=\"-lm\"") "LIBM=\" -lm\""))
	     #t))
	 (add-before 'configure 'fix-test-paths
	   (lambda* (#:key inputs #:allow-other-keys)
	     (substitute* "tests/Makefile.in"
	       (("/bin/sh") (which "sh"))
	       (("#!/bin/bash") (string-append "#!" (which "bash")))
	       (("/usr/share")
		(string-append (assoc-ref inputs "dbus-test-runner") "/share")))
	     #t)))))
    (inputs
     `(("gtk+" ,gtk+)
       ("glib" ,glib)
       ("python" ,python)))
    (native-inputs
     `(("pkg-config" ,pkg-config)
       ("dbus-test-runner" ,dbus-test-runner)
       ("glib:bin" ,glib "bin")
       ("xvfb" ,xorg-server-for-tests)))
    (home-page "https://launchpad.net/libindicator")
    (synopsis "Ayatana indicators symbols and functions")
    (description "A set of symbols and convenience functions for Ayatana indicators.")
    (license license:gpl3)))

(define-public libappindicator
  (package
    (name "libappindicator")
    (version "12.10.0")
    (source
     (origin
       (method url-fetch)
       (uri
	(string-append "https://launchpad.net/libappindicator/"
		       (version-major+minor version) "/" version
		       "/+download/libappindicator-" version ".tar.gz"))
       (sha256
	(base32
	 "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
    (build-system gnu-build-system)
    (arguments
     `(#:configure-flags
       `("CFLAGS=-Wno-error"
	 ;; FIXME: do not hardcode gtk version
	 "--with-gtk=3")
       #:phases
       (modify-phases %standard-phases
	 (delete 'check) 		;there's still one not passing It passes when it should fail 
	 (add-before 'configure 'fix-paths
	   (lambda* (#:key inputs #:allow-other-keys)
	     (substitute* "docs/reference/Makefile.in"
	       (("/bin/sh") (which "sh")))
	     (substitute* "tests/Makefile.in"
	       (("/bin/sh") (which "sh"))
	       (("#!/bin/bash") (string-append "#!" (which "bash")))
	       (("/usr") (string-append (assoc-ref inputs "dbus-test-runner"))))
	     (substitute* "bindings/python/Makefile.in"
	       (("-lappindicator") "-lappindicator3"))
	     #t))
	 (add-after 'unpack 'fix-codegen-path
	   (lambda* (#:key inputs #:allow-other-keys)
	     (substitute* "configure.ac"
	       (("codegendir pygtk-2.0`")
		;; pygobject` is not found. FIXME: This is a bad hack to 
		(string-append "codegendir pygobject`"
			       (assoc-ref inputs "python2-pygobject-2")
			       "/share/pygobject/2.0/codegen/")))
	     #t))
	 (add-after 'build 'build-bindings
	   (lambda _
	     (invoke "make" "-C" "bindings/python")
	     #t))
	 (add-after 'install 'install-bindings
	   (lambda _
	     (invoke "make" "-C" "bindings/python" "install")
	     #t)))))
    (inputs
     `(("dbus-glib" ,dbus-glib)
       ("gtk+" ,gtk+)
       ("libdbusmenu" ,libdbusmenu)
       ("libindicator" ,libindicator)
       ("python@2" ,python-2)
       ("python2-pygtk" ,python2-pygtk)
       ("python2-pygobject-2" ,python2-pygobject-2)
       ;; ("mono" ,mono) ; requires non-packaged gapi
       ("vala" ,vala)))
    (native-inputs
     `(("autoconf" ,autoconf)
       ("automake" ,automake)
       ("dbus-test-runner" ,dbus-test-runner)
       ("glib:bin" ,glib "bin")
       ("gobject-introspection" ,gobject-introspection)
       ("pkg-config" ,pkg-config)
       ("xvfb" ,xorg-server-for-tests)))
    (home-page "https://launchpad.net/libappindicator")
    (synopsis "Allow applications to export a menu into the Unity Menu bar.")
    (description "A library to allow applications to export a menu into the
Unity Menu bar.  Based on KSNI it also works in KDE and will fallback to generic
Systray support if none of those are available.")
    (license  license:lgpl2.1+)))

(define-public blueman
  (package
    (name "blueman")
    (version "2.1.2-git")
    (source
     (origin
       (method git-fetch)
       (uri (git-reference
	     (url "https://github.com/blueman-project/blueman")
	     ;; add meson
	     (commit "a0ab19f5bb6a9c4f290604960856b3f3949bcf1f")))
       (sha256
	(base32
	 "06nc2qxgk8p9q2sfggmi9x5d47mxz4bnl6yfpddj7b2afmai6902"))))
    (arguments
     `(#:phases
       (modify-phases %standard-phases
	 (add-after 'unpack 'fix-ldopen
	   (lambda* (#:key inputs #:allow-other-keys)
	     (substitute* "blueman/main/PulseAudioUtils.py"
	       (("CDLL\\(\"libpulse")
		(string-append "CDLL(\""
			       (assoc-ref inputs "pulseaudio") "/lib/libpulse"))
	       (("self.connect_rfcomm") "self.connect_pulseaudio"))
	     #t)
	   )
	 (add-after 'install 'wrap-programs
	   (lambda* (#:key outputs #:allow-other-keys)
	     (let* ((out  (assoc-ref outputs "out"))
		    (python-path (getenv "PYTHONPATH"))
		    (gi-path (getenv "GI_TYPELIB_PATH")))
	       (for-each (lambda (file)
			   (wrap-program (string-append out "/bin/" file)
			     `("PYTHONPATH" ":" prefix
			       (,python-path ,(string-append out
							     "/lib/python"
							     "3.7" ;FIXME
							     "/site-packages/"
							     )))
			     `("GI_TYPELIB_PATH" ":" prefix
			       (,gi-path))))
			 '("blueman-adapters"
			   "blueman-applet"
			   "blueman-assistant"
			   "blueman-manager"
			   "blueman-sendto"
			   "blueman-services"
			   "blueman-tray"))
	       (for-each (lambda (file)
			   (wrap-program (string-append out "/libexec/" file)
			     `("PYTHONPATH" ":" prefix
			       (,python-path ,(string-append out
							     "/lib/python"
							     "3.7" ;FIXME
							     "/site-packages/"
							     )))
			     `("GI_TYPELIB_PATH" ":" prefix
			       (,gi-path))))
			 '("blueman-mechanism" "blueman-rfcomm-watcher")))
	     #t)))))
    (inputs
     `(("bluez" ,bluez)
       ("libappindicator" ,libappindicator)
       ("python" ,python)
       ("python-pycairo" ,python-pycairo)
       ("python-pygobject" ,python-pygobject)
       ("gobject-introspection" ,gobject-introspection)
       ("pulseaudio" ,pulseaudio)
       ("gtk+" ,gtk+)))
    ;; gio-launch-desktop is required, but I can't find where it is called to
    ;; patch it directly
    (propagated-inputs `(("glib:bin" ,glib "bin")))
    (native-inputs `(("cmake" ,cmake)
		     ("pkg-config" ,pkg-config)
		     ("intltool" ,intltool)
		     ("python-cython" ,python-cython)))
    (build-system meson-build-system)
    (home-page "")
    (synopsis "")
    (description "")
    (license license:gpl2+)))

blueman

[-- Attachment #3: Type: text/plain, Size: 6428 bytes --]


Thanks, Nicolò


Pierre Neidhardt <mail@ambrevar.xyz> writes:

> * gnu/packages/freedesktop.scm (libappindicator): New variable.
> ---
>  gnu/packages/freedesktop.scm | 58 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
>
> diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
> index d88c151df7..20e4024dfb 100644
> --- a/gnu/packages/freedesktop.scm
> +++ b/gnu/packages/freedesktop.scm
> @@ -1801,3 +1801,61 @@ useful with system integration.")
>      (description "A set of symbols and convience functions that all indicators
>  would like to use.  Originally from the Ayatana indicators project.")
>      (license license:gpl3+)))
> +
> +(define-public libappindicator
> +  (package
> +    (name "libappindicator")
> +    (version "12.10.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append
> +             "https://launchpad.net/libappindicator/"
> +             (version-major+minor version) "/" version
> +             "/+download/libappindicator-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
> +    (build-system gnu-build-system)
> +    (native-inputs
> +     `(("glib:bin" ,glib "bin")
> +       ("gobject-introspection" ,gobject-introspection)
> +       ("pkg-config" ,pkg-config)))
> +    (inputs
> +     `(("gtk+" ,gtk+)
> +       ("dbus-glib" ,dbus-glib)
> +       ("python" ,python-2)
> +       ("python2-pygtk" ,python2-pygtk)
> +       ("python2-pygobject" ,python2-pygobject)
> +       ("libdbusmenu" ,libdbusmenu)
> +       ("libindicator" ,libindicator)))
> +    (arguments
> +     `(#:configure-flags '("--with-gtk=3")
> +       #:make-flags '("CFLAGS=-Wno-error=deprecated-declarations")
> +       #:tests? #f              ; FIXME: Require the dbus-test-runner package.
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'fix-codegen-path
> +           (lambda _
> +             (substitute* "configure"
> +               (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
> +             #t))
> +         (add-after 'unpack 'disable-fail-on-error
> +           (lambda _
> +             (substitute* "src/Makefile.in"
> +               (("-Werror") ""))
> +             #t))
> +         (add-after 'unpack 'fix-test
> +           (lambda _
> +             (substitute* "tests/Makefile.in"
> +               (("/bin/bash") (which "bash"))
> +               (("/bin/sh") (which "sh")))
> +             (substitute* "docs/reference/Makefile.in"
> +               (("/bin/sh") (which "sh")))
> +             #t)))))
> +    (home-page "https://launchpad.net/libappindicator")
> +    (synopsis "Library to export a menu into the system tray")
> +    (description "A library to allow applications to export a menu, originally
> +into the Unity menu bar.  Based on KSNI, it also works in KDE and will
> +fallback to generic system tray support if none of those are available.")
> +    (license license:gpl3+)))
> -- 
> 2.25.1
> From a82ab4f66aed111c07358a238de3fc1e369799c0 Mon Sep 17 00:00:00 2001
> From: Pierre Neidhardt <mail@ambrevar.xyz>
> Date: Thu, 7 May 2020 11:24:09 +0200
> Subject: [PATCH 2/2] gnu: Add libappindicator.
>
> * gnu/packages/freedesktop.scm (libappindicator): New variable.
> ---
>  gnu/packages/freedesktop.scm | 58 ++++++++++++++++++++++++++++++++++++
>  1 file changed, 58 insertions(+)
>
> diff --git a/gnu/packages/freedesktop.scm b/gnu/packages/freedesktop.scm
> index d88c151df7..20e4024dfb 100644
> --- a/gnu/packages/freedesktop.scm
> +++ b/gnu/packages/freedesktop.scm
> @@ -1801,3 +1801,61 @@ useful with system integration.")
>      (description "A set of symbols and convience functions that all indicators
>  would like to use.  Originally from the Ayatana indicators project.")
>      (license license:gpl3+)))
> +
> +(define-public libappindicator
> +  (package
> +    (name "libappindicator")
> +    (version "12.10.0")
> +    (source
> +     (origin
> +       (method url-fetch)
> +       (uri (string-append
> +             "https://launchpad.net/libappindicator/"
> +             (version-major+minor version) "/" version
> +             "/+download/libappindicator-" version ".tar.gz"))
> +       (sha256
> +        (base32
> +         "17xlqd60v0zllrxp8bgq3k5a1jkj0svkqn8rzllcyjh8k0gpr46m"))))
> +    (build-system gnu-build-system)
> +    (native-inputs
> +     `(("glib:bin" ,glib "bin")
> +       ("gobject-introspection" ,gobject-introspection)
> +       ("pkg-config" ,pkg-config)))
> +    (inputs
> +     `(("gtk+" ,gtk+)
> +       ("dbus-glib" ,dbus-glib)
> +       ("python" ,python-2)
> +       ("python2-pygtk" ,python2-pygtk)
> +       ("python2-pygobject" ,python2-pygobject)
> +       ("libdbusmenu" ,libdbusmenu)
> +       ("libindicator" ,libindicator)))
> +    (arguments
> +     `(#:configure-flags '("--with-gtk=3")
> +       #:make-flags '("CFLAGS=-Wno-error=deprecated-declarations")
> +       #:tests? #f              ; FIXME: Require the dbus-test-runner package.
> +       #:phases
> +       (modify-phases %standard-phases
> +         (add-after 'unpack 'fix-codegen-path
> +           (lambda _
> +             (substitute* "configure"
> +               (("PYGTK_CODEGEN=.*") "PYGTK_CODEGEN=pygtk-codegen-2.0\n"))
> +             #t))
> +         (add-after 'unpack 'disable-fail-on-error
> +           (lambda _
> +             (substitute* "src/Makefile.in"
> +               (("-Werror") ""))
> +             #t))
> +         (add-after 'unpack 'fix-test
> +           (lambda _
> +             (substitute* "tests/Makefile.in"
> +               (("/bin/bash") (which "bash"))
> +               (("/bin/sh") (which "sh")))
> +             (substitute* "docs/reference/Makefile.in"
> +               (("/bin/sh") (which "sh")))
> +             #t)))))
> +    (home-page "https://launchpad.net/libappindicator")
> +    (synopsis "Library to export a menu into the system tray")
> +    (description "A library to allow applications to export a menu, originally
> +into the Unity menu bar.  Based on KSNI, it also works in KDE and will
> +fallback to generic system tray support if none of those are available.")
> +    (license license:gpl3+)))
> -- 
> 2.25.1

  reply	other threads:[~2020-05-11 11:48 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-05-08  6:34 [bug#41134] [PATCH 1/2] gnu: Add libindicator Pierre Neidhardt
     [not found] ` <handler.41134.B.158891966521951.ack@debbugs.gnu.org>
2020-05-08  6:42   ` [bug#41134] [PATCH 2/2] gnu: Add libappindicator Pierre Neidhardt
2020-05-11 11:46     ` Nicolò Balzarotti [this message]
2020-05-11 12:14       ` Pierre Neidhardt
2020-05-11 14:18         ` Raghav Gururajan
2020-05-11 15:07           ` Nicolò Balzarotti
2020-05-11 15:10             ` Raghav Gururajan
2020-05-14 17:14               ` Pierre Neidhardt
2020-05-11 11:38 ` [bug#41134] LibAppIndicator Raghav Gururajan

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

  List information: https://guix.gnu.org/

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

  git send-email \
    --in-reply-to=87a72epuby.fsf@guixSD.i-did-not-set--mail-host-address--so-tickle-me \
    --to=anothersms@gmail.com \
    --cc=41134@debbugs.gnu.org \
    --cc=mail@ambrevar.xyz \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).