all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Nils Gillmann <ng0@n0.is>
To: Marius Bakke <mbakke@fastmail.com>
Cc: guix-devel@gnu.org
Subject: Re: Updating librsvg
Date: Wed, 9 May 2018 18:28:39 +0000	[thread overview]
Message-ID: <20180509182839.cqeadst4nd4oupfv@abyayala> (raw)
In-Reply-To: <87sh70g4se.fsf@fastmail.com>

Marius Bakke transcribed 5.2K bytes:
> Hello!
> 
> Our current version of librsvg is officially unmaintained, and the
> latest version requires Rust.
> 
> I've succeeded in making the latest version build, but there are a
> couple of problems.
> 
> * Module dependency cycle: <https://bugs.gnu.org/31392>.
> * librsvg requires Cairo 1.15, which is not a "stable" release branch.
> * It bundles 59 Rust libraries.
> 
> Here are the Rust libs:
> 
> aho-corasick/                bitflags/
> bitflags-0.9.1/              cairo-rs/
> cairo-sys-rs/                cssparser/
> cssparser-macros/            c_vec/
> downcast-rs/                 dtoa/
> dtoa-short/                  either/
> float-cmp/                   fuchsia-zircon/
> fuchsia-zircon-sys/          glib/
> glib-sys/                    gobject-sys/
> itertools/                   itoa/
> lazy_static/                 libc/
> matches/                     memchr/
> num-traits/                  pango/
> pangocairo/                  pangocairo-sys/
> pango-sys/                   phf/
> phf_codegen/                 phf_generator/
> phf_shared/                  pkg-config/
> procedural-masquerade/       proc-macro2/
> quote/                       quote-0.3.15/
> rand/                        rand-0.3.22/
> regex/                       regex-syntax/
> siphasher/                   smallvec/
> syn/                         syn-0.11.11/
> synom/                       thread_local/
> ucd-util/                    unicode-xid/
> unicode-xid-0.0.4/           unreachable/
> utf8-ranges/                 void/
> winapi/                      winapi-0.2.8/
> winapi-i686-pc-windows-gnu/  winapi-x86_64-pc-windows-gnu/
> 
> Have anyone packaged any of these?  Or made a Rust importer?

I think if Chris has the same amount of crates as I have, we have half
of them ready to be packaged. The remaining issues with the rust build-system
felt so obvious (since I have the email on guix-devel bookmarked) that I never
reported the list of things to be fixed, but I would not try anything above
0 dependency crates before crates can build properly.

I'll try and open tickets tomorrow.


> Here is a package definition for librsvg (use with guix package -f).
> 

> (use-modules (guix packages)
>              (guix download)
>              (guix utils)
>              (gnu packages)
>              (gnu packages gnome)
>              (gnu packages gtk)
>              (gnu packages rust)
>              (srfi srfi-1))
> 
> ;; XXX: Cairo 1.15 is a development branch, yet recent librsvg depends on it.
> (define-public cairo-1.15
>   (package
>     (inherit cairo)
>     (version "1.15.12")
>     (source (origin
>               (method url-fetch)
>               (uri (string-append "https://cairographics.org/snapshots/cairo-"
>                                   version ".tar.xz"))
>               (sha256
>                (base32
>                 "1jcl0mnqq6j2xip8p506g2cj54sfycm339rrd3p4g2jljhdhh8vn"))
>               ))))
> 
> (define pango-for-librsvg
>   (package
>     (inherit pango)
>     (propagated-inputs
>      `(("cairo" ,cairo-1.15)
>        ,@(alist-delete "cairo" (package-propagated-inputs pango))))))
> 
> (define-public librsvg-2.42
>   (package
>     (inherit librsvg)
>     (name "librsvg")
>     (version "2.42.4")
>     (source (origin
>               (method url-fetch)
>               (uri (string-append "mirror://gnome/sources/" name "/"
>                                   (version-major+minor version)  "/"
>                                   name "-" version ".tar.xz"))
>               (sha256
>                (base32
>                 "1qsd0j7s97ab5fzy5b5gix5b7hbw57cr46ia8pkcrr4ylsi80li2"))))
>     (native-inputs
>      `(("cargo" ,rust "cargo")
>        ("rust" ,rust)
>        ,@(package-native-inputs librsvg)))
>     (inputs
>      `(("pango" ,pango-for-librsvg)
>        ,@(alist-delete "pango" (package-inputs librsvg))))
>     (propagated-inputs
>      `(("cairo" ,cairo-1.15)
>        ,@(alist-delete "cairo" (package-propagated-inputs librsvg))))
>     (arguments
>      (substitute-keyword-arguments (package-arguments librsvg)
>        ((#:phases phases)
>         `(modify-phases ,phases
>            (add-after 'remove-failing-tests 'disable-yet-another-test
>              (lambda _
>                ;; FIXME: This fails since the update to 2.42.4.
>                (delete-file "tests/fixtures/reftests/svg1.1/coords-viewattr-02-b.svg")
>                #t))
>            ;; XXX: Shebang patching causes Cargo to error out due to checksum
>            ;; mismatches.  Luckily we don't need it until the check phase.
>            ;; This can be removed once all vendored libs are in Guix proper.
>            (delete 'patch-source-shebangs)
>            (delete 'patch-generated-file-shebangs)
>            (add-before 'check 'patch-shebangs
>              (assoc-ref %standard-phases 'patch-source-shebangs))))))))
> 
> librsvg-2.42

> 
> Feedback welcome.  I'd like to get this into the next 'staging' cycle
> and will attempt to package some of the Rust libs separately.
> 
> Propagating this Cairo variant is unfortunate however, perhaps we should
> make it a regular input for now?

      parent reply	other threads:[~2018-05-09 18:28 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-05-09 16:41 Updating librsvg Marius Bakke
2018-05-09 17:14 ` Pierre Neidhardt
2018-05-10 12:00   ` Marius Bakke
2018-05-09 17:38 ` Ricardo Wurmus
2018-05-10 12:01   ` Marius Bakke
2018-05-10 16:53     ` Mark H Weaver
2018-05-09 18:23 ` Danny Milosavljevic
2018-05-09 18:28 ` Nils Gillmann [this message]

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

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

  git send-email \
    --in-reply-to=20180509182839.cqeadst4nd4oupfv@abyayala \
    --to=ng0@n0.is \
    --cc=guix-devel@gnu.org \
    --cc=mbakke@fastmail.com \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.