Hi all,

Dropping this here as a quick workaround, since I'm unsure whether this
is an upstream or guix issue. When using libreoffice to convert
documents into pdf it crashes with a not so helpful issue:

>> libreoffice --headless --convert-to test.pdf empty.odt
convert /home/user/empty.odt as a Writer document -> /home/user/empty.test.pdf 
using filter : writer_pdf_Export
Assertion failure: rv == SECSuccess, at sechash.c:140
Unspecified Application Error

It seems that libreoffice fails when trying to load the new NSS
package. It can be easily downgraded in your personal packages. Dropping
the example:

```
(define-module (packages nss)
  #:use-module (gnu packages libreoffice)
  #:use-module (gnu packages nss)
  #:use-module (gnu packages)
  #:use-module (guix download)
  #:use-module (guix packages)
  #:use-module (guix utils))

(define-public nss-new
  (package
   (inherit nss)
   (name "nss")
   (version "3.101.4")                 ;update to latest ESR release
   (source (origin
            (method url-fetch)
            (uri (let ((version-with-underscores
                        (string-join (string-split version #\.) "_")))
                   (string-append
                    "https://ftp.mozilla.org/pub/mozilla.org/security/nss/";
                    "releases/NSS_" version-with-underscores "_RTM/src/"
                    "nss-" version ".tar.gz")))
            (sha256
             (base32
              "1sqvh49qi9vq55sbg42c5n0kz6w6ni383hgiyhaym6drsmbzb86a"))
            ;; Create nss.pc and nss-config.
            (patches (search-patches "nss-3.56-pkgconfig.patch"
                                     "nss-getcwd-nonnull.patch"
                                     "nss-increase-test-timeout.patch"
                                     ;; "nss-3.115-disable-broken-tests.patch"
                                     "nss-3.115-disable-pkix-ocsp-tests.patch"))
            (modules '((guix build utils)))
            (snippet
             '(begin
                ;; Delete the bundled copy of these libraries.
                (delete-file-recursively "nss/lib/zlib")
                (delete-file-recursively "nss/lib/sqlite")))))
   (arguments
    (substitute-keyword-arguments (package-arguments nss)
                                  ((#:tests? #t) #f))) ))


(define-public libreoffice-new
  (package
   (inherit libreoffice)
   (name "libreoffice-new")
   (inputs
    (modify-inputs (package-inputs libreoffice)
                   (replace "nss" nss-new)))))
```

After that you can use the edited libreoffice like

guix shell libreoffice-new -- libreoffice --headless --convert-to test.pdf 
empty.odt 

-- 
Hope that helps
Ignas Lapėnas

Reply via email to