From mboxrd@z Thu Jan 1 00:00:00 1970 From: Andreas Enge Subject: Calibre Date: Sun, 15 Feb 2015 11:20:44 +0100 Message-ID: <20150215102044.GA15074@debian> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="4Ckj6UjgE2iN1+kY" Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:59570) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMwJr-0002Z1-7Y for guix-devel@gnu.org; Sun, 15 Feb 2015 05:21:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1YMwJl-00009N-J6 for guix-devel@gnu.org; Sun, 15 Feb 2015 05:20:54 -0500 Received: from mout.kundenserver.de ([212.227.126.130]:56202) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1YMwJl-000095-8O for guix-devel@gnu.org; Sun, 15 Feb 2015 05:20:49 -0500 Content-Disposition: inline List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: guix-devel@gnu.org --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hello, the attached file adds the e-book management program calibre. Eventually, I will put it into ebook.scm. Comments are welcome, in particular concerning the xdg issue. The program works for downloading and reading ebooks, but it has problems with mounting my attached e-reader. The problem seems to be that the guix calibre is not allowed to connect to my debian dbus: Udisks mount call failed: Traceback (most recent call last): File "/gnu/store/jdpva5h8jb5d9xirzya1ivsvbl2vnpps-calibre-2.19.0/lib/calibre/calibre/devices/usbms/device.py", line 600, in do_mount mount(node) File "/gnu/store/jdpva5h8jb5d9xirzya1ivsvbl2vnpps-calibre-2.19.0/lib/calibre/calibre/devices/udisks.py", line 180, in mount u.mount(node_path) File "/gnu/store/jdpva5h8jb5d9xirzya1ivsvbl2vnpps-calibre-2.19.0/lib/calibre/calibre/devices/udisks.py", line 133, in mount dbus_interface=self.FILESYSTEM)) File "/gnu/store/2f06bpk30myjx186f7mj86pc69k6jzi1-python2-dbus-1.2.0/lib/python2.7/site-packages/dbus/proxies.py", line 145, in __call__ **keywords) File "/gnu/store/2f06bpk30myjx186f7mj86pc69k6jzi1-python2-dbus-1.2.0/lib/python2.7/site-packages/dbus/connection.py", line 651, in call_blocking message, timeout) DBusException: org.freedesktop.UDisks2.Error.NotAuthorized: Not authorized to perform operation (polkit authority not available and caller is not uid 0) Do you have an idea how to solve this? In the meantime, one may mount the e-reader by hand. Andreas --4Ckj6UjgE2iN1+kY Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: attachment; filename="calibre.scm" Content-Transfer-Encoding: 8bit ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Andreas Enge ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages calibre) #:use-module ((guix licenses) #:select (gpl3)) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix build-system python) #:use-module (gnu packages databases) #:use-module (gnu packages ebook) #:use-module (gnu packages fontutils) #:use-module (gnu packages freedesktop) #:use-module (gnu packages glib) #:use-module (gnu packages icu4c) #:use-module (gnu packages image) #:use-module (gnu packages imagemagick) #:use-module (gnu packages libusb) #:use-module (gnu packages pdf) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) #:use-module (gnu packages qt) #:use-module (gnu packages xorg)) (define-public calibre (package (name "calibre") (version "2.19.0") (source (origin (method url-fetch) (uri (string-append "http://download.calibre-ebook.com/" version "/calibre-" version ".tar.xz")) (sha256 (base32 "1acj1i8hlbi99jjgcs9dl9ap7951m1p460srmkdyjmlljw1qhcbn")))) (build-system python-build-system) (native-inputs `(("pkg-config" ,pkg-config) ("qt" ,qt) ; for qmake ;; xdg-utils is supposed to be used for desktop integration, but it ;; also creates lots of messages ;; mkdir: cannot create directory '/homeless-shelter': Permission denied ("xdg-utils" ,xdg-utils))) ;; FIXME: The following are missing inputs according to the documentation, ;; but the package can apparently be used without them, ;; They may need to be added if a deficiency is detected. ;; BeautifulSoup >= 3.0.5 ;; dnspython >= 1.6.0 ;; poppler >= 0.20.2 ;; libwmf >= 0.2.8 ;; psutil >= 0.6.1 ;; python-pygments >= 2.0.1 ; used for ebook editing (inputs `(("chmlib" ,chmlib) ("fontconfig" ,fontconfig) ("glib" ,glib) ("icu4c" ,icu4c) ("imagemagick" ,imagemagick) ("libmtp" ,libmtp) ("libpng" ,libpng) ("libusb" ,libusb) ("libxrender" ,libxrender) ("podofo" ,podofo) ("python" ,python-2) ("python2-apsw" ,python2-apsw) ("python2-cssselect" ,python2-cssselect) ("python2-cssutils" ,python2-cssutils) ("python2-dateutil" ,python2-dateutil) ("python2-dbus" ,python2-dbus) ("python2-lxml" ,python2-lxml) ("python2-mechanize" ,python2-mechanize) ("python2-netifaces" ,python2-netifaces) ;; pil is unmaintained, but the maintained fork pillow does not work. ("python2-pil" ,python2-pil) ("python2-pyqt" ,python2-pyqt) ("python2-sip" ,python2-sip) ("qt" ,qt) ("sqlite" ,sqlite))) (arguments `(#:python ,python-2 #:test-target "check" #:tests? #f ; FIXME: enable once flake8 is packaged #:phases (alist-cons-before 'build 'configure (lambda* (#:key inputs #:allow-other-keys) (let ((podofo (assoc-ref inputs "podofo")) (pyqt (assoc-ref inputs "python2-pyqt"))) (substitute* "setup/build_environment.py" (("sys.prefix") (string-append "'" pyqt "'"))) (setenv "PODOFO_INC_DIR" (string-append podofo "/include/podofo")) (setenv "PODOFO_LIB_DIR" (string-append podofo "/lib")))) %standard-phases))) (home-page "http://calibre-ebook.com/") (synopsis "E-book library management software") (description "Calibre is an ebook library manager. It can view, convert and catalog ebooks in most of the major ebook formats. It can also talk to many ebook reader devices. It can go out to the Internet and fetch metadata for books. It can download newspapers and convert them into ebooks for convenient reading.") (license gpl3))) ; some files are under various other licenses, see COPYRIGHT --4Ckj6UjgE2iN1+kY--