unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Help required: packaging Foliate
@ 2020-02-06  9:30 Alexandru-Sergiu Marton
  2020-02-06 19:51 ` Efraim Flashner
  0 siblings, 1 reply; 3+ messages in thread
From: Alexandru-Sergiu Marton @ 2020-02-06  9:30 UTC (permalink / raw)
  To: guix-devel

Hi,

I'm trying to package the ebook reader called Foliate [1].

I managed to write a recipe that installs it, but it has problems at
runtime. If you click anything that is supposed to open up a dialog,
such as the "Open file" or "Preferences" buttons, the whole thing
freezes. I'm not good at (read: I don't know a single thing about) GTK
and GNOME stuff, so I'm putting this out here hoping that someone
might know what's happening.

Here's the package definition (the use-modules part is written by hand
in this email cause I had this in a module of it's own):

(use-modules (gnu packages)
                       (guix build-system meson)
                       ((guix licenses) #:prefix license:)
                       (guix download)
                       (guix packages)
                       (guix utils))
(use-package-modules gnome gettext webkit pkg-config glib gtk freedesktop)

(package
 (name "foliate")
 (version "1.5.3")
 (source (origin
      (method url-fetch)
      (uri (string-append
"https://github.com/johnfactotum/foliate/archive/" version ".tar.gz"))
      (sha256
       (base32
        "1mz27qj9zwkn978yd4sdswha4laq5gf9s6cs5xrkqfj9242mrx4m"))))
 (build-system meson-build-system)
 (inputs
  `(("gettext" ,gnu-gettext)
    ("pkg-config" ,pkg-config)
    ("glib:bin" ,glib "bin")
    ("gtk+:bin" ,gtk+ "bin")
    ("desktop-file-utils" ,desktop-file-utils)))
 (propagated-inputs
  `(("gjs" ,gjs)
    ("webkitgtk" ,webkitgtk)
    ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
 (synopsis "Simple and modern GTK eBook viewer, built with GJS and Epub.js")
 (description "")
 (home-page "https://johnfactotum.github.io/foliate/")
 (license license:gpl3+))


[1]: https://github.com/johnfactotum/foliate

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

* Re: Help required: packaging Foliate
  2020-02-06  9:30 Help required: packaging Foliate Alexandru-Sergiu Marton
@ 2020-02-06 19:51 ` Efraim Flashner
  2020-02-06 20:35   ` Alexandru-Sergiu Marton
  0 siblings, 1 reply; 3+ messages in thread
From: Efraim Flashner @ 2020-02-06 19:51 UTC (permalink / raw)
  To: Alexandru-Sergiu Marton; +Cc: guix-devel

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

On Thu, Feb 06, 2020 at 09:30:04AM +0000, Alexandru-Sergiu Marton wrote:
> Hi,
> 
> I'm trying to package the ebook reader called Foliate [1].
> 
> I managed to write a recipe that installs it, but it has problems at
> runtime. If you click anything that is supposed to open up a dialog,
> such as the "Open file" or "Preferences" buttons, the whole thing
> freezes. I'm not good at (read: I don't know a single thing about) GTK
> and GNOME stuff, so I'm putting this out here hoping that someone
> might know what's happening.
> 
> Here's the package definition (the use-modules part is written by hand
> in this email cause I had this in a module of it's own):
> 
> (use-modules (gnu packages)
>                        (guix build-system meson)
>                        ((guix licenses) #:prefix license:)
>                        (guix download)
>                        (guix packages)
>                        (guix utils))
> (use-package-modules gnome gettext webkit pkg-config glib gtk freedesktop)
> 
> (package
>  (name "foliate")
>  (version "1.5.3")
>  (source (origin
>       (method url-fetch)
>       (uri (string-append
> "https://github.com/johnfactotum/foliate/archive/" version ".tar.gz"))
>       (sha256
>        (base32
>         "1mz27qj9zwkn978yd4sdswha4laq5gf9s6cs5xrkqfj9242mrx4m"))))
>  (build-system meson-build-system)
>  (inputs
>   `(("gettext" ,gnu-gettext)
>     ("pkg-config" ,pkg-config)
>     ("glib:bin" ,glib "bin")
>     ("gtk+:bin" ,gtk+ "bin")
>     ("desktop-file-utils" ,desktop-file-utils)))
>  (propagated-inputs
>   `(("gjs" ,gjs)
>     ("webkitgtk" ,webkitgtk)
>     ("gsettings-desktop-schemas" ,gsettings-desktop-schemas)))
>  (synopsis "Simple and modern GTK eBook viewer, built with GJS and Epub.js")
>  (description "")
>  (home-page "https://johnfactotum.github.io/foliate/")
>  (license license:gpl3+))
> 
> 
> [1]: https://github.com/johnfactotum/foliate
> 

I built it but I wasn't able to get it to run:
$ com.github.johnfactotum.Foliate

(.com.github.johnfactotum.Foliate-real:16928): Gjs-WARNING **: 21:50:01.247: JS ERROR: ImportError: No JS module 'main' found in search path
@/gnu/store/ghbd2isjs02445c390xv90l0p3bbla5v-foliate-1.5.3/bin/.com.github.johnfactotum.Foliate-real:9:1

Script /gnu/store/ghbd2isjs02445c390xv90l0p3bbla5v-foliate-1.5.3/bin/.com.github.johnfactotum.Foliate-real threw an exception

I tried adding (arguments '(#:glib-or-gtk? #t)) to the package
definition, which I think should solve your problem.

-- 
Efraim Flashner   <efraim@flashner.co.il>   אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D  14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

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

* Re: Help required: packaging Foliate
  2020-02-06 19:51 ` Efraim Flashner
@ 2020-02-06 20:35   ` Alexandru-Sergiu Marton
  0 siblings, 0 replies; 3+ messages in thread
From: Alexandru-Sergiu Marton @ 2020-02-06 20:35 UTC (permalink / raw)
  To: Efraim Flashner; +Cc: guix-devel

> I built it but I wasn't able to get it to run:
> $ com.github.johnfactotum.Foliate
>
> (.com.github.johnfactotum.Foliate-real:16928): Gjs-WARNING **: 21:50:01.247: JS ERROR: ImportError: No JS module 'main' found in search path
> @/gnu/store/ghbd2isjs02445c390xv90l0p3bbla5v-foliate-1.5.3/bin/.com.github.johnfactotum.Foliate-real:9:1
>
> Script /gnu/store/ghbd2isjs02445c390xv90l0p3bbla5v-foliate-1.5.3/bin/.com.github.johnfactotum.Foliate-real threw an exception
>
> I tried adding (arguments '(#:glib-or-gtk? #t)) to the package
> definition, which I think should solve your problem.

Something weird happens. I get the same error you sent when I add the
code you say it's supposed to fix it. For some reason, it seems that
(arguments '(#:glib-or-gtk? #t)) doesn't work for me?

I'll investigate this further when I get a bit more time. If you (or
anyone else) sends a working definition upstream in the meanwhile I
would be grateful if you would ping me.

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

end of thread, other threads:[~2020-02-06 20:29 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-02-06  9:30 Help required: packaging Foliate Alexandru-Sergiu Marton
2020-02-06 19:51 ` Efraim Flashner
2020-02-06 20:35   ` Alexandru-Sergiu Marton

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