unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* hplip: Add qt5 gui.
@ 2016-12-29 11:50 ng0
  2016-12-29 11:50 ` [PATCH] gnu: " ng0
  2016-12-29 13:27 ` ng0
  0 siblings, 2 replies; 14+ messages in thread
From: ng0 @ 2016-12-29 11:50 UTC (permalink / raw)
  To: guix-devel

We need to explicitly tell the configure to disable qt3 and qt4 to make it accept qt5 which is annoying.
Tested was just running hp-setup, worked for me.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH] gnu: hplip: Add qt5 gui.
  2016-12-29 11:50 hplip: Add qt5 gui ng0
@ 2016-12-29 11:50 ` ng0
  2016-12-29 11:56   ` Danny Milosavljevic
  2016-12-29 13:27 ` ng0
  1 sibling, 1 reply; 14+ messages in thread
From: ng0 @ 2016-12-29 11:50 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/cups.scm (hplip): Add gui.
[arguments](configure-flags): Add "--enable-gui-build", "--disable-qt3",
"--disable-qt4", "--enable-qt5", "--enable-dbus-build".
[inputs]: Add python-pyqt, python-pygobject and python-sip.
---
 gnu/packages/cups.scm | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index baa77f7aa..7069d6b66 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,7 +39,8 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages tls))
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages qt))
 
 ;; Delay to avoid module circularity problems.
 (define ghostscript/cups
@@ -346,6 +348,11 @@ device-specific programs to convert and print many types of files.")
          "--enable-new-hpcups"
          "--enable-cups_ppd_install"
          "--enable-cups_drv_install"
+         "--enable-gui-build"
+         "--disable-qt3"
+         "--disable-qt4"
+         "--enable-qt5"
+         "--enable-dbus-build"
          ;; TODO add foomatic drv install eventually.
          ;; TODO --enable-policykit eventually.
          ,(string-append "--with-cupsfilterdir="
@@ -420,6 +427,9 @@ device-specific programs to convert and print many types of files.")
               ("dbus" ,dbus)
               ("python-wrapper" ,python-wrapper)
               ("python" ,python)
+              ("python-pyqt" ,python-pyqt)
+              ("python-pygobject" ,python-pygobject)
+              ("python-sip" ,python-sip)
               ;; TODO: Make hp-setup find python-dbus.
               ("python-dbus" ,python-dbus)))
     (native-inputs `(("pkg-config" ,pkg-config)))))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH] gnu: hplip: Add qt5 gui.
  2016-12-29 11:50 ` [PATCH] gnu: " ng0
@ 2016-12-29 11:56   ` Danny Milosavljevic
  2016-12-29 12:29     ` ng0
  0 siblings, 1 reply; 14+ messages in thread
From: Danny Milosavljevic @ 2016-12-29 11:56 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

Hi,

> +         "--enable-dbus-build"
>                ;; TODO: Make hp-setup find python-dbus.

Does that mean that dbus now works in hp-setup?

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH] gnu: hplip: Add qt5 gui.
  2016-12-29 11:56   ` Danny Milosavljevic
@ 2016-12-29 12:29     ` ng0
  0 siblings, 0 replies; 14+ messages in thread
From: ng0 @ 2016-12-29 12:29 UTC (permalink / raw)
  To: Danny Milosavljevic; +Cc: guix-devel

Danny Milosavljevic <dannym@scratchpost.org> writes:

> Hi,
>
>> +         "--enable-dbus-build"
>>                ;; TODO: Make hp-setup find python-dbus.
>
> Does that mean that dbus now works in hp-setup?
>

I don't know. Before and afterwards I ran into the problem where
no user (in groups lp and lpadmin, even root) is authenticated
enough to finally add the printer (hp-setup -i -a -g).
I guess this is the source of this problem...?

I'm still looking into some problems with the gui, possibly
caused by some Guix specifics. The gui works in general, but what
doesn't work is adding your own ppd (you can select it in the
file-browser but it never gets displayed, therefore you can not
proceed beyond the first page), so I really assume this is dbus
or some other problem too. Nothing new, but the gui functionality
is expected by (some) users.
-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: hplip: Add qt5 gui.
  2016-12-29 11:50 hplip: Add qt5 gui ng0
  2016-12-29 11:50 ` [PATCH] gnu: " ng0
@ 2016-12-29 13:27 ` ng0
  2016-12-29 14:05   ` hplip: Add qt5 gui, try to fix policykit support ng0
  1 sibling, 1 reply; 14+ messages in thread
From: ng0 @ 2016-12-29 13:27 UTC (permalink / raw)
  To: guix-devel

ng0 <ng0@libertad.pw> writes:

> We need to explicitly tell the configure to disable qt3 and qt4 to make it accept qt5 which is annoying.
> Tested was just running hp-setup, worked for me.

I just fixed the policykit issue (in theory, no more errors in
the build), so I change this patch a bit and send in both patches
in series.

-- 
♥Ⓐ  ng0
PGP keys and more: https://n0is.noblogs.org/ http://ng0.chaosnet.org

^ permalink raw reply	[flat|nested] 14+ messages in thread

* hplip: Add qt5 gui, try to fix policykit support
  2016-12-29 13:27 ` ng0
@ 2016-12-29 14:05   ` ng0
  2016-12-29 14:05     ` [PATCH 1/2] gnu: hplip: Add qt5 gui ng0
                       ` (2 more replies)
  0 siblings, 3 replies; 14+ messages in thread
From: ng0 @ 2016-12-29 14:05 UTC (permalink / raw)
  To: guix-devel

[PATCH 1/2] gnu: hplip: Add qt5 gui.

Same as before, removed the --enable-dbus and ...

[PATCH 2/2] gnu: hplip: Add policykit support.

... moved it here, with the additional policykit stuff.
I really have no idea how hplip is supposed to be used in Guix after reading the note about the base service. So we are not supposed to run and install it as users in profiles? Will it be in the cups service where I would have no idea how to add it in there?
I have cups running but my printer absolutely requires hplip.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/2] gnu: hplip: Add qt5 gui.
  2016-12-29 14:05   ` hplip: Add qt5 gui, try to fix policykit support ng0
@ 2016-12-29 14:05     ` ng0
  2017-01-02 21:04       ` Ludovic Courtès
  2016-12-29 14:05     ` [PATCH 2/2] gnu: hplip: Add policykit support ng0
  2017-01-15 21:56     ` hplip: Add qt5 gui, try to fix " Andy Patterson
  2 siblings, 1 reply; 14+ messages in thread
From: ng0 @ 2016-12-29 14:05 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/cups.scm (hplip): Add gui.
[arguments](configure-flags): Add "--enable-gui-build", "--disable-qt4",
"--enable-qt5".
[inputs]: Add python-pyqt, python-pygobject and python-sip.
---
 gnu/packages/cups.scm | 10 +++++++++-
 1 file changed, 9 insertions(+), 1 deletion(-)

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index baa77f7aa..d264d6b12 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015, 2016 Ludovic Courtès <ludo@gnu.org>
 ;;; Copyright © 2015, 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Danny Milosavljevic <dannym@scratchpost.org>
+;;; Copyright © 2016 ng0 <ng0@libertad.pw>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -38,7 +39,8 @@
   #:use-module (gnu packages glib)
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages pkg-config)
-  #:use-module (gnu packages tls))
+  #:use-module (gnu packages tls)
+  #:use-module (gnu packages qt))
 
 ;; Delay to avoid module circularity problems.
 (define ghostscript/cups
@@ -346,6 +348,9 @@ device-specific programs to convert and print many types of files.")
          "--enable-new-hpcups"
          "--enable-cups_ppd_install"
          "--enable-cups_drv_install"
+         "--enable-gui-build"
+         "--disable-qt4"
+         "--enable-qt5"
          ;; TODO add foomatic drv install eventually.
          ;; TODO --enable-policykit eventually.
          ,(string-append "--with-cupsfilterdir="
@@ -420,6 +425,9 @@ device-specific programs to convert and print many types of files.")
               ("dbus" ,dbus)
               ("python-wrapper" ,python-wrapper)
               ("python" ,python)
+              ("python-pyqt" ,python-pyqt)
+              ("python-pygobject" ,python-pygobject)
+              ("python-sip" ,python-sip)
               ;; TODO: Make hp-setup find python-dbus.
               ("python-dbus" ,python-dbus)))
     (native-inputs `(("pkg-config" ,pkg-config)))))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/2] gnu: hplip: Add policykit support.
  2016-12-29 14:05   ` hplip: Add qt5 gui, try to fix policykit support ng0
  2016-12-29 14:05     ` [PATCH 1/2] gnu: hplip: Add qt5 gui ng0
@ 2016-12-29 14:05     ` ng0
  2017-01-15 21:56     ` hplip: Add qt5 gui, try to fix " Andy Patterson
  2 siblings, 0 replies; 14+ messages in thread
From: ng0 @ 2016-12-29 14:05 UTC (permalink / raw)
  To: guix-devel

* gnu/packages/cups.scm (hplip): Add policykit support.
[arguments](configure-flags): Add "--enable-dbus-build", "--enable-policykit".
[arguments](make-flags): Add "policykit_dbus_etcdir", "policykit_dir",
"policykit_dbus_sharedir".
(inputs): Add "polkit".
---
 gnu/packages/cups.scm | 20 ++++++++++++++++++--
 1 file changed, 18 insertions(+), 2 deletions(-)

diff --git a/gnu/packages/cups.scm b/gnu/packages/cups.scm
index d264d6b12..ae975504b 100644
--- a/gnu/packages/cups.scm
+++ b/gnu/packages/cups.scm
@@ -40,6 +40,7 @@
   #:use-module (gnu packages pdf)
   #:use-module (gnu packages pkg-config)
   #:use-module (gnu packages tls)
+  #:use-module (gnu packages polkit)
   #:use-module (gnu packages qt))
 
 ;; Delay to avoid module circularity problems.
@@ -351,8 +352,9 @@ device-specific programs to convert and print many types of files.")
          "--enable-gui-build"
          "--disable-qt4"
          "--enable-qt5"
+         "--enable-dbus-build"
+         "--enable-policykit"
          ;; TODO add foomatic drv install eventually.
-         ;; TODO --enable-policykit eventually.
          ,(string-append "--with-cupsfilterdir="
                          (assoc-ref %outputs "out") "/lib/cups/filter")
          ,(string-append "--with-cupsbackenddir="
@@ -362,6 +364,19 @@ device-specific programs to convert and print many types of files.")
          ,(string-append "--with-systraydir="
                          (assoc-ref %outputs "out") "/etc/xdg"))
 
+       #:make-flags
+       ;; Already set in 'fix-hard-coded-file-names phase:
+       ;; "rulesdir" and "halpredir".
+       `(,(string-append "policykit_dbus_etcdir="
+                         (assoc-ref %outputs "out")
+                         "/etc/dbus-1/system.d")
+         ,(string-append "policykit_dir="
+                         (assoc-ref %outputs "out")
+                         "/share/polkit-1/actions")
+         ,(string-append "policykit_dbus_sharedir="
+                         (assoc-ref %outputs "out")
+                         "/share/dbus-1/system-services"))
+
        #:imported-modules ((guix build python-build-system)
                            ,@%gnu-build-system-modules)
        #:modules ((guix build gnu-build-system)
@@ -429,5 +444,6 @@ device-specific programs to convert and print many types of files.")
               ("python-pygobject" ,python-pygobject)
               ("python-sip" ,python-sip)
               ;; TODO: Make hp-setup find python-dbus.
-              ("python-dbus" ,python-dbus)))
+              ("python-dbus" ,python-dbus)
+              ("polkit" ,polkit)))
     (native-inputs `(("pkg-config" ,pkg-config)))))
-- 
2.11.0

^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 1/2] gnu: hplip: Add qt5 gui.
  2016-12-29 14:05     ` [PATCH 1/2] gnu: hplip: Add qt5 gui ng0
@ 2017-01-02 21:04       ` Ludovic Courtès
  0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2017-01-02 21:04 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

Hi!

ng0 <ng0@libertad.pw> skribis:

> * gnu/packages/cups.scm (hplip): Add gui.
> [arguments](configure-flags): Add "--enable-gui-build", "--disable-qt4",
> "--enable-qt5".
> [inputs]: Add python-pyqt, python-pygobject and python-sip.

Seems like this would multiply the closure of ‘sane-backends’ by 5:

--8<---------------cut here---------------start------------->8---
$ guix size sane-backends|tail -1
total: 294.1 MiB
$ guix size sane-backends qt@5|tail -1
total: 1486.9 MiB
--8<---------------cut here---------------end--------------->8---

Could you try moving the GUI to a separate output or to a separate
package?

Thanks,
Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: hplip: Add qt5 gui, try to fix policykit support
  2016-12-29 14:05   ` hplip: Add qt5 gui, try to fix policykit support ng0
  2016-12-29 14:05     ` [PATCH 1/2] gnu: hplip: Add qt5 gui ng0
  2016-12-29 14:05     ` [PATCH 2/2] gnu: hplip: Add policykit support ng0
@ 2017-01-15 21:56     ` Andy Patterson
  2017-01-15 23:47       ` ng0
  2017-01-16  9:58       ` CUPS and HP printers Ludovic Courtès
  2 siblings, 2 replies; 14+ messages in thread
From: Andy Patterson @ 2017-01-15 21:56 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

Hey ng0,


On Thu, 29 Dec 2016 14:05:51 +0000
ng0 <ng0@libertad.pw> wrote:


> I really have no idea how hplip is supposed to be used in Guix after
> reading the note about the base service. So we are not supposed to
> run and install it as users in profiles? Will it be in the cups
> service where I would have no idea how to add it in there? 

I've been printing with an hp for a little while now, and in my system
configuration I have this:

(service cups-service-type
         (cups-configuration
          (web-interface? #t)
          (extensions
           (list cups-filters hplip))))

Maybe you've already done that, but I'm just guessing based on what you
wrote.

I've found that with that configuration, all of hplip's ppd files show
up when adding the printer via the web interface (which is how I added
my printer). hp-setup also seems to work ok, and will auto-detect your
ppd file, but can't print out the test page.

Anyway, I hope that helps.

--
Andy

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: hplip: Add qt5 gui, try to fix policykit support
  2017-01-15 21:56     ` hplip: Add qt5 gui, try to fix " Andy Patterson
@ 2017-01-15 23:47       ` ng0
  2017-01-16  9:58       ` CUPS and HP printers Ludovic Courtès
  1 sibling, 0 replies; 14+ messages in thread
From: ng0 @ 2017-01-15 23:47 UTC (permalink / raw)
  To: Andy Patterson; +Cc: guix-devel

Andy Patterson <ajpatter@uwaterloo.ca> writes:

> Hey ng0,
>
>
> On Thu, 29 Dec 2016 14:05:51 +0000
> ng0 <ng0@libertad.pw> wrote:
>
>
>> I really have no idea how hplip is supposed to be used in Guix after
>> reading the note about the base service. So we are not supposed to
>> run and install it as users in profiles? Will it be in the cups
>> service where I would have no idea how to add it in there? 
>
> I've been printing with an hp for a little while now, and in my system
> configuration I have this:
>
> (service cups-service-type
>          (cups-configuration
>           (web-interface? #t)
>           (extensions
>            (list cups-filters hplip))))
>
> Maybe you've already done that, but I'm just guessing based on what you
> wrote.
>
> I've found that with that configuration, all of hplip's ppd files show
> up when adding the printer via the web interface (which is how I added
> my printer). hp-setup also seems to work ok, and will auto-detect your
> ppd file, but can't print out the test page.
>
> Anyway, I hope that helps.
>
> --
> Andy
>

Hm! Okay, I will try this as soon as I can.
I've been a bit slow with splitting out the qt5 gui, but I will
update the patch soon.

Thanks!
-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* CUPS and HP printers
  2017-01-15 21:56     ` hplip: Add qt5 gui, try to fix " Andy Patterson
  2017-01-15 23:47       ` ng0
@ 2017-01-16  9:58       ` Ludovic Courtès
  2017-01-24  1:27         ` ng0
  1 sibling, 1 reply; 14+ messages in thread
From: Ludovic Courtès @ 2017-01-16  9:58 UTC (permalink / raw)
  To: Andy Patterson; +Cc: guix-devel

Hi Andy,

Andy Patterson <ajpatter@uwaterloo.ca> skribis:

> On Thu, 29 Dec 2016 14:05:51 +0000
> ng0 <ng0@libertad.pw> wrote:
>
>
>> I really have no idea how hplip is supposed to be used in Guix after
>> reading the note about the base service. So we are not supposed to
>> run and install it as users in profiles? Will it be in the cups
>> service where I would have no idea how to add it in there? 
>
> I've been printing with an hp for a little while now, and in my system
> configuration I have this:
>
> (service cups-service-type
>          (cups-configuration
>           (web-interface? #t)
>           (extensions
>            (list cups-filters hplip))))

Interesting.  Maybe we should document it somewhere or simply provide
this example in the manual, because it’s not necessarily obvious.

WDYT?

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: CUPS and HP printers
  2017-01-16  9:58       ` CUPS and HP printers Ludovic Courtès
@ 2017-01-24  1:27         ` ng0
  2017-01-27 23:14           ` Ludovic Courtès
  0 siblings, 1 reply; 14+ messages in thread
From: ng0 @ 2017-01-24  1:27 UTC (permalink / raw)
  To: Ludovic Courtès; +Cc: guix-devel

Ludovic Courtès <ludo@gnu.org> writes:

> Hi Andy,
>
> Andy Patterson <ajpatter@uwaterloo.ca> skribis:
>
>> On Thu, 29 Dec 2016 14:05:51 +0000
>> ng0 <ng0@libertad.pw> wrote:
>>
>>
>>> I really have no idea how hplip is supposed to be used in Guix after
>>> reading the note about the base service. So we are not supposed to
>>> run and install it as users in profiles? Will it be in the cups
>>> service where I would have no idea how to add it in there? 
>>
>> I've been printing with an hp for a little while now, and in my system
>> configuration I have this:
>>
>> (service cups-service-type
>>          (cups-configuration
>>           (web-interface? #t)
>>           (extensions
>>            (list cups-filters hplip))))
>
> Interesting.  Maybe we should document it somewhere or simply provide
> this example in the manual, because it’s not necessarily obvious.
>
> WDYT?
>
> Ludo’.
>

Ha! I just printed using GuixSD :)
The way Andy described worked. We should really add this to the
documentation.

Related to this thread, I see if I can apply the suggested
changes this week.

Thank you very much Andy :)
-- 
♥Ⓐ  ng0 -- https://www.inventati.org/patternsinthechaos/

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: CUPS and HP printers
  2017-01-24  1:27         ` ng0
@ 2017-01-27 23:14           ` Ludovic Courtès
  0 siblings, 0 replies; 14+ messages in thread
From: Ludovic Courtès @ 2017-01-27 23:14 UTC (permalink / raw)
  To: ng0; +Cc: guix-devel

ng0 <contact.ng0@cryptolab.net> skribis:

> Ludovic Courtès <ludo@gnu.org> writes:
>
>> Hi Andy,
>>
>> Andy Patterson <ajpatter@uwaterloo.ca> skribis:
>>
>>> On Thu, 29 Dec 2016 14:05:51 +0000
>>> ng0 <ng0@libertad.pw> wrote:
>>>
>>>
>>>> I really have no idea how hplip is supposed to be used in Guix after
>>>> reading the note about the base service. So we are not supposed to
>>>> run and install it as users in profiles? Will it be in the cups
>>>> service where I would have no idea how to add it in there? 
>>>
>>> I've been printing with an hp for a little while now, and in my system
>>> configuration I have this:
>>>
>>> (service cups-service-type
>>>          (cups-configuration
>>>           (web-interface? #t)
>>>           (extensions
>>>            (list cups-filters hplip))))
>>
>> Interesting.  Maybe we should document it somewhere or simply provide
>> this example in the manual, because it’s not necessarily obvious.

Done!

Ludo’.

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2017-01-27 23:14 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-12-29 11:50 hplip: Add qt5 gui ng0
2016-12-29 11:50 ` [PATCH] gnu: " ng0
2016-12-29 11:56   ` Danny Milosavljevic
2016-12-29 12:29     ` ng0
2016-12-29 13:27 ` ng0
2016-12-29 14:05   ` hplip: Add qt5 gui, try to fix policykit support ng0
2016-12-29 14:05     ` [PATCH 1/2] gnu: hplip: Add qt5 gui ng0
2017-01-02 21:04       ` Ludovic Courtès
2016-12-29 14:05     ` [PATCH 2/2] gnu: hplip: Add policykit support ng0
2017-01-15 21:56     ` hplip: Add qt5 gui, try to fix " Andy Patterson
2017-01-15 23:47       ` ng0
2017-01-16  9:58       ` CUPS and HP printers Ludovic Courtès
2017-01-24  1:27         ` ng0
2017-01-27 23:14           ` Ludovic Courtès

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).