all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Updating librsvg
@ 2018-05-09 16:41 Marius Bakke
  2018-05-09 17:14 ` Pierre Neidhardt
                   ` (3 more replies)
  0 siblings, 4 replies; 8+ messages in thread
From: Marius Bakke @ 2018-05-09 16:41 UTC (permalink / raw)
  To: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 1683 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?

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


[-- Attachment #1.2: librsvg.scm --]
[-- Type: text/plain, Size: 2582 bytes --]

(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

[-- Attachment #1.3: Type: text/plain, Size: 240 bytes --]


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?

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

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

* Re: Updating librsvg
  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
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 8+ messages in thread
From: Pierre Neidhardt @ 2018-05-09 17:14 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

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


Marius Bakke <mbakke@fastmail.com> writes:

> Have anyone packaged any of these?  Or made a Rust importer?

I know nothing about Rust, but "(guix) Invoking 'guix import'" mentions
'crate':

--8<---------------cut here---------------start------------->8---
‘crate’
     Import metadata from the crates.io Rust package repository
     crates.io (https://crates.io).
--8<---------------cut here---------------end--------------->8---

-- 
Pierre Neidhardt

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

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

* Re: Updating librsvg
  2018-05-09 16:41 Updating librsvg Marius Bakke
  2018-05-09 17:14 ` Pierre Neidhardt
@ 2018-05-09 17:38 ` Ricardo Wurmus
  2018-05-10 12:01   ` Marius Bakke
  2018-05-09 18:23 ` Danny Milosavljevic
  2018-05-09 18:28 ` Nils Gillmann
  3 siblings, 1 reply; 8+ messages in thread
From: Ricardo Wurmus @ 2018-05-09 17:38 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel


Hi Marius,

thanks for working on this!

> Our current version of librsvg is officially unmaintained, and the
> latest version requires Rust.
[…]
> * librsvg requires Cairo 1.15, which is not a "stable" release branch.

Is there a maintained version of librsvg that depends on a stable
release version of Cairo?

-- 
Ricardo

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

* Re: Updating librsvg
  2018-05-09 16:41 Updating librsvg Marius Bakke
  2018-05-09 17:14 ` Pierre Neidhardt
  2018-05-09 17:38 ` Ricardo Wurmus
@ 2018-05-09 18:23 ` Danny Milosavljevic
  2018-05-09 18:28 ` Nils Gillmann
  3 siblings, 0 replies; 8+ messages in thread
From: Danny Milosavljevic @ 2018-05-09 18:23 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel


[-- Attachment #1.1: Type: text/plain, Size: 150 bytes --]

Hi Marius,

I've started on it back in May 2017 - but resolving reference cycles in rust libs is difficult.

Attached my attempt from back then.

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: crates.scm --]
[-- Type: text/x-scheme, Size: 39093 bytes --]

(define-module (wip crates)
  #:use-module ((guix licenses) #:prefix license:)
  #:use-module (guix packages)
  #:use-module (guix download)
  #:use-module (guix git-download)
  #:use-module (guix utils)
  #:use-module (guix build-system cargo)
  #:use-module (guix gexp)
  #:use-module (gnu packages)
  #:use-module (gnu packages linux) ; strace
  #:use-module (gnu packages rust)
  #:use-module (gnu packages pkg-config))

;;; FIXME websocket crate, tokio, slack-rs.

(define-public rust-rand-bootstrap
  (package
    (name "rust-rand-bootstrap")
    (version "0.3.15")
    (source (origin
              (method url-fetch)
              (uri (string-append "https://github.com/daym/nonrand/archive/v" version ".tar.gz"))
              (file-name (string-append name "-" version ".tar.gz"))
              (sha256
               (base32
                "0m59msxrxwgwn7sissm6df1ly9zgyy1i53r6n98ajp3ch51myx21"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    ;(propagated-inputs
    ; `(("rust-libc" ,rust-libc)))
    ;(native-inputs
    ; `(("rust-log" ,rust-log)))
    (home-page "https://github.com/rust-lang/rand")
    (synopsis "Random number generators")
    (description "Random number generator that yields non-random numbers.")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

(define-public rust-tempdir-bootstrap
 (package
  (name "rust-tempdir-bootstrap")
  (version "0.3.5")
  (source
    (origin
      (method url-fetch)
      (uri (crate-uri "tempdir" version))
      (file-name
        (string-append name "-" version ".tar.gz"))
      (sha256
        (base32
          "1mij45kgzflkja0h8q9avrik76h5a0b60m9hfd6k9yqxbiplm5w7"))
      (modules '((guix build utils)))
      (snippet
       '(substitute* "Cargo.toml"
          (("^rand") "nonrand")))))
  (build-system cargo-build-system)
  (propagated-inputs `(("rust-rand" ,rust-rand-bootstrap)))
  (home-page
    "https://github.com/rust-lang/tempdir")
  (synopsis
    "Library for managing a temporary directory in Rust")
    (description "This package provides a library for managing a temporary directory
and deleting all contents when it's dropped.
")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

(define-public rust-gcc-bootstrap
  (package
    (name "rust-gcc-bootstrap")
    (version "0.3.40")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "gcc" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0l6rnf3b7vaxhcs7yg9nyv7brqidy2g0xhg8z0a2pvw6jkjvjbc7"))
        (modules '((guix build utils)))
        (snippet
         '(substitute* "Cargo.toml"
            (("^rayon.*") "
")
            (("^tempdir.*") "
")
            (("\"rayon\"") ""))))) ; TODO be nicer about it
    (build-system cargo-build-system)
    ;(arguments
    ; `(#:cargo-build-flags '("--features" "")))
    (native-inputs
     `(("rust-tempdir" ,rust-tempdir-bootstrap "src")))
    ; (inputs `(("rust-rayon" ,rust-rayon "src"))) ; optional
    (home-page "FIXME")
    (synopsis "Invoke the native C compiler to compile native C code into a static archive")
    (description "This package provides a build-time dependency for Cargo build scripts to
assist in invoking the native C compiler to compile native C code into a static
archive to be linked into Rust code.
")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

(define-public rust-bitflags
  (package
    (name "rust-bitflags")
    (version "0.7.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "bitflags" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0v8hh6wdkpk9my8z8442g4hqrqf05h0qj53dsay6mv18lqvqklda"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    (home-page "https://github.com/rust-lang/bitflags")
    (synopsis "Macro to generate structures which behave like bitflags,
in Rust")
    (description "@code{bitflags} provides a macro to generate structures
which behave
like bitflags, in Rust.")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

;;; TODO syntex-errors remove libc dependency again (isatty).

(define-public rust-syntex-syntax-bootstrap ; FIXME test whether it works with a very old syntex-syntax
  (package
    (name "rust-syntex-syntax-bootstrap")
    (version "0.3.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "syntex_syntax" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "05rahy6vlr82nvf8fx1y8a6qzbspymhh1ja06lwi3b0kv26jrshn"))
        (modules '((guix build utils)))
        (snippet
         '(begin
           (substitute* "src/lib.rs"
            (("^#![[]feature.*") "
")
            (("^extern crate libc;") "
"))
           (substitute* "Cargo.toml"
            (("^libc.*") "
"))
           (substitute* "src/parse/mod.rs"
            ;; Only used on Windows
            (("libc::consts::os::extra::O_BINARY") "0"))))))
    (build-system cargo-build-system)
    (propagated-inputs
     `(("rust-bitflags" ,rust-bitflags "src")))
    (home-page "FIXME")
    (synopsis "Export of libsyntax for code generation")
    (description "Export of libsyntax for code generation")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

(define-public rust-ctest-bootstrap
  (package
    (name "rust-ctest-bootstrap")
    (version "0.1.1")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "ctest" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0wlsw2ab36jqdcdzwxd58pir782449b937kljhxl49y7jzf2ssqm"))))
    (build-system cargo-build-system)
    (propagated-inputs
     `(("rust-gcc-bootstrap" ,rust-gcc-bootstrap "src") ; sometimes cycle because of rust-gcc - rust-tempdir - rust-rand - rust-libc; note: also because of rust-rayon as well.
       ("rust-syntex-syntax-bootstrap" ,rust-syntex-syntax-bootstrap "src")))
    (home-page "https://github.com/alexcrichton/ctest")
    (synopsis "Automated tests of FFI bindings.")
    (description "Automated tests of FFI bindings.")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

(define-public rust-libc
  (package
    (name "rust-libc")
    (version "0.2.18")
    (source
     (origin
       (method url-fetch)
       ;; (crate-uri "libc" version) doesn't contain libc-test.
       (uri (string-append "https://github.com/rust-lang/libc/archive/" version ".tar.gz"))
       (file-name (string-append name "-" version ".tar.gz"))
       (sha256
        (base32
         "1mh62gfm91aypbr830m2qklwgscgb0pcfpxzi3a6k60faamlrndf"))))
    (build-system cargo-build-system)
    ;(native-inputs
    ; `(("rust-ctest-bootstrap" ,rust-ctest-bootstrap "src")))
    (arguments
     `(#:tests? #f
       #:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'delete-lock
           (lambda _
             (delete-file "Cargo.lock")
             #t))
         (delete 'build))))
    (home-page "https://github.com/rust-lang/libc")
    (synopsis "Raw bindings to platform APIs for Rust")
    (description
     "Libc provides a library for types and bindings to native
C functions often found in libc or other common platform libraries.")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

(define-public rust-c-vec
  (package
    (name "rust-c-vec")
    (version "1.2.0")
    (source
      (origin
        ;(method git-fetch)
        ;(uri (git-reference
        ;       (url "https://github.com/GuillaumeGomez/c_vec-rs.git")
        ;       (commit "ee4ccb4ecb092926175ec58c60434ee153190aa8")))
        (method url-fetch)
        (uri (crate-uri "c_vec" version))
        (file-name
          (string-append name "-" version "-checkout"))
        (sha256
          (base32
            "01y5rllqclky30mskrycfm5i9nng5k2xsyksjg9lnapnb2kgan80"))))
    (build-system cargo-build-system)
    (arguments
     `(#:tests? #f
       #:phases
       (modify-phases %standard-phases
         (add-after 'build 'delete-lock
           (lambda _
             (delete-file "Cargo.lock")
             #t)))))
    (native-inputs `(("rust-libc" ,rust-libc "src")))
    (home-page "https://github.com/GuillaumeGomez/c_vec-rs") ; FIXME fixed manually. It said ()
    (synopsis "Structures to wrap C arrays")
    (description "Structures to wrap C arrays")
    ;; Choose either license.
    (license (list license:asl2.0 license:expat))))

;; Requires inline assembly and so doesn't work on Rust stable.
(define-public rust-spin
  (package
    (name "rust-spin")
    (version "0.4.5")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "spin" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0lvyyxg646wl67b41655p2z25s725sw1rsfvpnm8d7vq5dpa45hx"))))
    (build-system cargo-build-system)
    (arguments
     `(#:tests? #f
       #:phases
       (modify-phases %standard-phases
         ;; Spin doesn't actually work - so don't build it.
         (delete 'build))))
    (home-page "https://github.com/mvdnes/spin-rs.git")
    (synopsis "Synchronization primitives based on spinning, for Rust")
    (description
    "@code{spin} provides synchronization primitives based on spinning.
They don't work in Rust stable, however. This is a dummy package to make
Cargo find (and hopefully not use) it.")
    (license license:expat)))

(define-public rust-lazy-static
  (package
    (name "rust-lazy-static")
    (version "0.2.4")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "lazy_static" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1p30qiivkkg1d43s10pj3g07zpriqbdxy0hbc99gfcfkjzfv34bj"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch
           (lambda _
;             (substitute* "Cargo.toml"
;               (("^[[]dependencies[.]spin[]]") "")
;               (("^version = \"0.4\"") "") ; spin
;               (("^optional = true") "") ; spin
;               (("^spin_no_std.*") "
;"))
             #t))
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    (inputs
     `(;; Even though rust-spin doesn't work on Rust stable,
       ;; Cargo requires it to be there.
       ("rust-spin" ,rust-spin "src")))
    (home-page "https://github.com/rust-lang-nursery/lazy-static.rs")
    (synopsis "Macro for declaring lazily evaluated statics in Rust")
    (description "@code{lazy_static} provides a macro for declaring lazily
evaluated statics in Rust.")
    (license license:expat)))

(define-public rust-pkg-config
  (package
    (name "rust-pkg-config")
    (version "0.3.9")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "pkg-config" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "00x9vc7667m4r8sn8idgpmj9yf1ih6bj1cdrshf1mkb5h5mlr2rs"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    (native-inputs
     `(("rust-lazy-static" ,rust-lazy-static "src")))
    (home-page "https://github.com/alexcrichton/pkg-config-rs")
    (synopsis "Library to run the @code{pkg-config} system tool at build
time in Rust")
    (description "@code{pkg-config} provides a library that invokes the
@code{pkg-config} system tool at build time in Rust (to be used in Cargo
build scripts).")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

(define-public rust-log
  (package
    (name "rust-log")
    (version "0.3.6")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "log" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0m40hgs3cg57dd5kk1mabfk6gk8z6l1cihar8akx4kmzz1xlk0xb"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    (home-page "https://github.com/rust-lang/log")
    (synopsis "Logging interface for Rust")
    (description "@code{log} provides a logging facade for Rust.  Libraries
can use the provided logging API, and the consumer of those libraries can
choose the logging implementation that is most suitable for its use case.")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

;; Contains broken members
(define-public rust-futures
  (package
    (name "rust-futures")
    (version "0.1.10")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "futures" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0hdwwbwld2af0g53rlgawxgz7sjmv9zinqzrrfxv2h1q12vkx4f1"))))
    (build-system cargo-build-system)
    (inputs `(("rust-log" ,rust-log "src")))
    (home-page
      "https://github.com/alexcrichton/futures-rs")
    (synopsis
      "An implementation of futures and streams featuring zero allocations,
composability, and iterator-like interfaces.
")
    (description
    "An implementation of futures and streams featuring zero allocations,
composability, and iterator-like interfaces.
")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

(define-public rust-rand
  (package
    (name "rust-rand")
    (version "0.3.15")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "rand" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "178qgglinqawwsw6l8imgnplxkmxcj404jqm92pds695xhv0cbh2"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    (native-inputs
     `(("rust-log" ,rust-log "src")))
    (propagated-inputs
     `(("rust-libc" ,rust-libc "src")))
    (home-page "https://github.com/rust-lang/rand")
    (synopsis "Random number generators for Rust")
    (description "@code{rand} provides random number generators and other randomness functionality for Rust.")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

;; Error: unused imports (WTF). Dependency: rust-byteorder, which requires quickcheck, which is broken.
(define-public rust-bytes
  (package
    (name "rust-bytes")
    (version "0.4.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "bytes" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "12m10gdkvlwrn7d5p1j102sf3fy3gq5rs3izwvvbsz4kpf2knl46"))))
    (build-system cargo-build-system)
    (propagated-inputs
     `(("rust-rand" ,rust-rand "src")
       ("rust-byteorder" ,rust-byteorder "src")))
    (home-page "https://github.com/carllerche/bytes")
    (synopsis
      "Types and traits for working with bytes")
    (description
      "Types and traits for working with bytes.")
    (license license:expat)))

;; Reference cycle
(define-public rust-quickcheck
  (package
    (name "rust-quickcheck")
    (version "0.4.2")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "quickcheck" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "16symxywrj4qh431wjhl7zvzv4n9hp111dmn9qnj1kqq830r9wiy"))))
    (build-system cargo-build-system)
    (inputs
     `( ; FIXME fix loop ("rust-env-logger" ,rust-env-logger "src")
       ("rust-log" ,rust-log "src")
       ("rust-rand" ,rust-rand "src")))
    (home-page
      "https://github.com/BurntSushi/quickcheck")
    (synopsis
      "Automatic property based testing with shrinking.")
    (description
      "Automatic property based testing with shrinking.")
    (license (list license:unlicense license:expat))))

(define-public rust-regex-syntax
  (package
    (name "rust-regex-syntax")
    (version "0.4.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "regex-syntax" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0ms4s2zdr9lr79isjphqqg2wkc8rblvpwcax21ghj0vnynqr349g"))))
    (build-system cargo-build-system)
    (native-inputs
     `(("rust-quickcheck" ,rust-quickcheck "src")
       ("rust-rand" ,rust-rand "src")))
    (home-page "https://github.com/rust-lang/regex")
    (synopsis "A regular expression parser.")
    (description
      "This package provides a regular expression parser.")
    (license (list license:expat license:asl2.0))))

;; Broken because quickcheck is broken.
(define-public rust-utf8-ranges
  (package
    (name "rust-utf8-ranges")
    (version "1.0.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "utf8-ranges" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "08j129anwcbdwvcx1izb4nsf0nbxksin2zqxjbrfz2x94mjsnbv6"))))
    (build-system cargo-build-system)
    (native-inputs
     `(("rust-quickcheck" ,rust-quickcheck "src")))
    (home-page
      "https://github.com/BurntSushi/utf8-ranges")
    (synopsis
      "Convert ranges of Unicode codepoints to UTF-8 byte ranges.")
    (description
      "Convert ranges of Unicode codepoints to UTF-8 byte ranges.")
    (license (list license:unlicense license:expat))))

;; Broken because quickcheck is broken
(define-public rust-memchr
  (package
    (name "rust-memchr")
    (version "1.0.1")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "memchr" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1d27b8kk2zijj6f9qlcwa4q71lkbm72nfvbyy6wlgspi8q7crg0x"))))
    (build-system cargo-build-system)
    (native-inputs
     `(("rust-quickcheck" ,rust-quickcheck "src")))
    (inputs `(("rust-libc" ,rust-libc "src")))
    (home-page "https://github.com/BurntSushi/rust-memchr")
    (synopsis "Safe interface to memchr.")
    (description "Safe interface to memchr.")
    (license (list license:unlicense license:expat))))

;; Fails because of quickcheck
(define-public rust-byteorder
  (package
    (name "rust-byteorder")
    (version "1.0.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "byteorder" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1j0qvrvpmk01v5qkmp5l7gmjvlpxxygivm1w074qb63bxsq7f2f4"))))
    (build-system cargo-build-system)
    (native-inputs
      `(("rust-quickcheck" ,rust-quickcheck "src")
        ("rust-rand" ,rust-rand "src")))
    (home-page
      "https://github.com/BurntSushi/byteorder")
    (synopsis
      "Library for reading/writing numbers in big-endian and little-endian.")
    (description
      "Library for reading/writing numbers in big-endian and little-endian.")
    (license (list license:unlicense license:expat))))

;; Reference cycle
(define-public rust-csv
  (package
    (name "rust-csv")
    (version "0.15.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "csv" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "173dv65zmmm4kfqnjk66vhgj4w82vh9c14jq6r55c755qwvjpwky"))))
    (build-system cargo-build-system)
    (native-inputs
      `(("rust-regex" ,rust-regex "src")))
    (inputs
      `(("rust-byteorder" ,rust-byteorder "src")
        ("rust-memchr" ,rust-memchr "src")
        ; FIXME ("rust-rustc-serialize" ,rust-rustc-serialize "src")
))
    (home-page
      "https://github.com/BurntSushi/rust-csv")
    (synopsis
      "CSV parsing with automatic type based decoding and encoding.")
    (description
      "CSV parsing with automatic type based decoding and encoding.")
    (license (list license:unlicense license:expat))))

(define-public rust-strsim
  (package
    (name "rust-strsim")
    (version "0.6.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "strsim" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "151ngha649cyybr3j50qg331b206zrinxqz7fzw1ra8r0n0mrldl"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    (home-page "https://github.com/dguo/strsim-rs")
    (synopsis
      "String similarity metrics")
    (description
      "@code{strsim} contains implementations of string similarity metrics.
Includes Hamming, Levenshtein, Damerau-Levenshtein, Jaro, and Jaro-Winkler.")
    (license license:expat)))

;; Reference cycle
(define-public rust-docopt
  (package
    (name "rust-docopt")
    (version "0.7.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "docopt" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1n6gbhsks2w9y0b4bwqyawh4ghbkka09w6pjcrq9i1sd51pflcmb"))))
    (build-system cargo-build-system)
    (inputs
     `(("rust-lazy-static" ,rust-lazy-static "src")
       ("rust-regex" ,rust-regex "src")
       ; FIXME ("rust-rustc-serialize" ,rust-rustc-serialize "src")
       ("rust-strsim" ,rust-strsim "src")))
    (home-page "https://github.com/docopt/docopt.rs")
    (synopsis "Command line argument parsing.")
    (description "Command line argument parsing.")
    (license (list license:unlicense license:expat))))

;; #![cfg_attr(test, feature(test))] is unstable. So it breaks.
(define-public rust-fs2
  (package
    (name "rust-fs2")
    (version "0.4.1")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "fs2" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1bsb3x8mkffsnr4xd5ac6v8b8sv80npfd1x37k0rv1amfphaxv9l"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-after 'unpack 'patch
           (lambda _
             (substitute* "src/lib.rs"
               (("#[!][[]cfg_attr[(]test, feature[(]test[)][)][]]") ""))
             #t)))))
    (native-inputs
     `(("rust-tempdir" ,rust-tempdir "src")))
    (inputs
     `(("rust-libc" ,rust-libc "src")))
    (home-page "https://github.com/danburkert/fs2-rs")
    (synopsis "Cross-platform file locks and file duplication.")
    (description "Cross-platform file locks and file duplication.")
    (license (list license:expat license:asl2.0))))

(define-public rust-memmap
  (package
    (name "rust-memmap")
    (version "0.5.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "memmap" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1lmbkx92xlqb5yqh4cj2k4qfrm3x4jkbs04i84nfl60wyfdfap06"))))
    (build-system cargo-build-system)
    (native-inputs
     `(("rust-tempdir" ,rust-tempdir "src")))
    (inputs
     `(("rust-fs2" ,rust-fs2 "src")
       ("rust-libc" ,rust-libc "src")))
    (home-page
      "https://github.com/danburkert/memmap-rs")
    (synopsis
      "Cross-platform Rust API for memory-mapped file IO in Rust")
    (description
      "@code{memmap} provides a cross-platform Rust API for memory-mapped
file IO in Rust.")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

;; Reference cycle
(define-public rust-aho-corasick
  (package
    (name "rust-aho-corasick")
    (version "0.6.1")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "aho-corasick" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1gymiyg646qyfzb0abqhmpxpd5smpcv4nyzhr5b9p5v24ya0nrjg"))))
    (build-system cargo-build-system)
    (native-inputs
      `(("rust-csv" ,rust-csv "src")
        ("rust-docopt" ,rust-docopt "src")
        ("rust-memmap" ,rust-memmap "src")
        ("rust-quickcheck" ,rust-quickcheck "src")
        ("rust-rand" ,rust-rand "src")
;        ("rust-rustc-serialize" ,rust-rustc-serialize "src")
))
    (inputs `(("rust-memchr" ,rust-memchr "src")))
    (home-page "https://github.com/BurntSushi/aho-corasick")
    (synopsis "Fast multiple substring searching with finite state machines.")
    (description "Fast multiple substring searching with finite state machines.")
    (license (list license:unlicense license:expat))))

;(define-public rust-simd
;  (package
;    (name "rust-simd")
;    (version "0.2.0")
;    (source
;      (origin
;        (method url-fetch)
;        (uri (crate-uri "simd" version))
;        (file-name
;          (string-append name "-" version ".tar.gz"))
;        (sha256
;          (base32
;            "183vwg7c5z4pl0wifzhw31h2adwlwilzprbxjc8g3wg1595d353s"))))
;    (build-system cargo-build-system)
;    (native-inputs
;     `(("rust-cfg-if" ,rust-cfg-if "src")))
;    (inputs
;     `(("rust-serde" ,rust-serde "src")
;       ("rust-serde-derive" ,rust-serde-derive "src")))
;    (home-page "https://github.com/rust-lang-nursery/simd")
;    (synopsis "SIMD instructions")
;    (description "@code{simd} offers limited cross-platform access to SIMD
;instructions on CPUs, as well as raw interfaces to platform-specific
;instructions.")
;  (license (list license:expat license:asl2.0))))

;; Dependency cycle
(define-public rust-regex
  (package
    (name "rust-regex")
    (version "0.2.1")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "regex" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "008cl7l1pssf8xihgy23508d5msvnkz2h05h1bpxyqkd1xyw2y22"))))
    (build-system cargo-build-system)
    (native-inputs
      `(("rust-lazy-static" ,rust-lazy-static "src")
        ("rust-quickcheck" ,rust-quickcheck "src")
        ("rust-rand" ,rust-rand "src")))
    (inputs
      `(("rust-aho-corasick" ,rust-aho-corasick "src")
        ("rust-memchr" ,rust-memchr "src")
        ("rust-regex-syntax" ,rust-regex-syntax "src")
        ;("rust-simd" ,rust-simd "src")
        ; FIXME ("rust-thread-local" ,rust-thread-local "src")
        ("rust-utf8-ranges" ,rust-utf8-ranges "src")))
    (home-page "https://github.com/rust-lang/regex")
    (synopsis
    "An implementation of regular expressions for Rust. This implementation uses
finite automata and guarantees linear time matching on all inputs.
")
    (description
    "An implementation of regular expressions for Rust.  This implementation uses
finite automata and guarantees linear time matching on all inputs.
")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

;; Dependency cycle
(define-public rust-env-logger
  (package
    (name "rust-env-logger")
    (version "0.4.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "env_logger" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0i21vvjyr49kc6si6mivla0clg5rbf26bl64wc77mzimnsqiz5wr"))))
    (build-system cargo-build-system)
    (inputs
      `(("rust-log" ,rust-log "src")
        ("rust-regex" ,rust-regex "src")))
    (home-page "https://github.com/rust-lang/log")
    (synopsis
    "A logging implementation for `log` which is configured via an environment
variable.
")
    (description
    "This package provides a logging implementation for `log` which is configured via an environment
variable.
")
    (license (list license:expat license:asl2.0))))

;; Required dependency clippy is missing
(define-public rust-lazycell
  (package
    (name "rust-lazycell")
    (version "0.5.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "lazycell" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "0cb3h771aqnq753krx6f6vpxw3nn41b8gaj24q6y7wqy5z1aaf7c"))))
    (build-system cargo-build-system)
    ; FIXME why? (inputs `(("rust-clippy" ,rust-clippy "src")))
    (home-page "https://github.com/indiv0/lazycell")
    (synopsis "Library providing a lazily filled Cell struct in Rust")
    (description "@code{lazycell} provides a library for lazily filled Cell
structs in Rust.")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

(define-public rust-cfg-if
  (package
    (name "rust-cfg-if")
    (version "0.1.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "cfg-if" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "137qikjcal4h75frzcn6mknygqk8vy5bva7w851aydb5gc6pc7ny"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    (home-page "https://github.com/alexcrichton/cfg-if")
    (synopsis "Ergonomically define an item depending on a large number of
@code{#[cfg]} parameters in Rust")
    (description
    "@code{cfg-if} provides a macro to ergonomically define an item depending
on a large number of #[cfg] parameters in Rust.  Structured like an if-else
chain, the first matching branch is the item that gets emitted.")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

(define-public rust-net2
  (package
    (name "rust-net2")
    (version "0.2.26")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "net2" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1qp3q6xynb481rsp3ig1nmqb6qlxfba3shfrmqij88cppsv9rpsy"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    (inputs
     `(("rust-cfg-if" ,rust-cfg-if "src")
       ;("rust-kernel32-sys" ,rust-kernel32-sys "src")
        ("rust-libc" ,rust-libc "src")
       ;("rust-winapi" ,rust-winapi "src")
       ;("rust-ws2-32-sys" ,rust-ws2-32-sys "src")
))
  (home-page
    "https://github.com/rust-lang-nursery/net2-rs")
  (synopsis
    "Extensions to the standard library's networking types as proposed in RFC 1158.
")
  (description
    "Extensions to the standard library's networking types as proposed in RFC 1158.
")
  (license (list license:expat license:asl2.0))))

(define-public rust-slab
  (package
    (name "rust-slab")
    (version "0.3.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "slab" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "08xw8w61zdfn1094qkq1d554vh5wmm9bqdys8gqqxc4sv2pgrd0p"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    (home-page "https://github.com/carllerche/slab")
    (synopsis "Simple slab allocator")
    (description "@code{slab} provides a SLAB allocator for Rust.  It
preallocates memory for values of a given type.")
    (license license:expat)))

(define-public rust-epoll
  (package
    (name "rust-epoll")
    (version "2.1.0")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "epoll" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1al3bcaqwgdq9kfk9xhkdg4nhjbhjz64r51y4v89qc02bbgz8f7l"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    (inputs
     `(("rust-bitflags" ,rust-bitflags "src")
       ("rust-libc" ,rust-libc "src")))
    (home-page
      "https://github.com/nathansizemore/epoll")
    (synopsis "Safe epoll interface.")
    (description "Safe epoll interface.")
    (license license:mpl2.0)))

(define-public rust-tempdir
  (package
    (name "rust-tempdir")
    (version "0.3.5")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "tempdir" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1mij45kgzflkja0h8q9avrik76h5a0b60m9hfd6k9yqxbiplm5w7"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    (propagated-inputs
     `(("rust-rand" ,rust-rand "src")))
    (home-page "https://github.com/rust-lang/tempdir")
    (synopsis "Manages a temporary directory in Rust")
    (description"@code{tempdir} provides a library for managing a temporary
directory and deleting all contents when it's dropped, in Rust.")
    ;; Choose either license.
    (license (list license:expat license:asl2.0))))

;; Dependency cycle
(define-public rust-mio
  (package
    (name "rust-mio")
    (version "0.6.4")
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "mio" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "10g65mhc82mf4q01m4sibgxjqalpi4f04gs5ggkkd4w4kbabvkgf"))))
    (build-system cargo-build-system)
    (native-inputs
      `(("rust-bytes" ,rust-bytes "src")
        ("rust-env-logger" ,rust-env-logger "src")
        ("rust-tempdir" ,rust-tempdir "src")))
    (inputs
      `(("rust-lazycell" ,rust-lazycell "src")
        ("rust-libc" ,rust-libc "src")
        ("rust-log" ,rust-log "src")
        ("rust-net2" ,rust-net2 "src")
        ("rust-slab" ,rust-slab "src")))
    (home-page "https://github.com/carllerche/mio")
    (synopsis "Lightweight non-blocking IO")
    (description "This package provides lightweight non-blocking IO.")
    (license license:expat)))

(define-public rust-tokio
  (package
    (name "rust-tokio")
    (version "0.0.0") ; FIXME 0.1
    (source
      (origin
        (method url-fetch)
        (uri (crate-uri "tokio" version))
        (file-name
          (string-append name "-" version ".tar.gz"))
        (sha256
          (base32
            "1qpyb5ncs57cb7g6m37m9ybxiwq22dzh8k22n39ifqc654hql05d"))))
    (build-system cargo-build-system)
    (arguments
     `(#:phases
       (modify-phases %standard-phases
         (add-before 'install 'delete-lock
           (lambda _
             (delete-file "Cargo.lock") ; Otherwise "cargo install" fails.
             #t)))))
    (home-page "")
    (synopsis "A fast, async, IO framework")
    (description "This package provides a fast, async, IO framework.")
    (license license:expat)))

;; Test failure.
(define-public rust-glob
 (package
  (name "rust-glob")
  (version "0.2.11")
  (source
    (origin
      (method url-fetch)
      (uri (crate-uri "glob" version))
      (file-name
        (string-append name "-" version ".tar.gz"))
      (sha256
        (base32
          "1ysvi72slkw784fcsymgj4308c3y03gwjjzqxp80xdjnkbh8vqcb"))))
  (build-system cargo-build-system)
  (propagated-inputs
   `(("rust-tempdir" ,rust-tempdir "src")))
  (home-page "https://github.com/rust-lang/glob")
  (synopsis "Matching file paths against Unix shell style patterns")
  (description "This package provides support for matching file paths against
Unix shell style patterns.")
  ;; Choose either license.
  (license (list license:expat license:asl2.0))))

; TODO mioco
; TOOD https://intermezzos.github.io/
; TODO http://os.phil-opp.com/ [!!!]
; good Rust: https://github.com/google/xi-editor
; good Rust: https://github.com/jwilm/alacritty
; good Rust: https://github.com/BurntSushi/ripgrep

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

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

* Re: Updating librsvg
  2018-05-09 16:41 Updating librsvg Marius Bakke
                   ` (2 preceding siblings ...)
  2018-05-09 18:23 ` Danny Milosavljevic
@ 2018-05-09 18:28 ` Nils Gillmann
  3 siblings, 0 replies; 8+ messages in thread
From: Nils Gillmann @ 2018-05-09 18:28 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

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?

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

* Re: Updating librsvg
  2018-05-09 17:14 ` Pierre Neidhardt
@ 2018-05-10 12:00   ` Marius Bakke
  0 siblings, 0 replies; 8+ messages in thread
From: Marius Bakke @ 2018-05-10 12:00 UTC (permalink / raw)
  To: Pierre Neidhardt; +Cc: guix-devel

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

Pierre Neidhardt <ambrevar@gmail.com> writes:

> Marius Bakke <mbakke@fastmail.com> writes:
>
>> Have anyone packaged any of these?  Or made a Rust importer?
>
> I know nothing about Rust, but "(guix) Invoking 'guix import'" mentions
> 'crate':
>
> --8<---------------cut here---------------start------------->8---
> ‘crate’
>      Import metadata from the crates.io Rust package repository
>      crates.io (https://crates.io).
> --8<---------------cut here---------------end--------------->8---

I had overlooked that, thanks!  Seems to work okay.

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

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

* Re: Updating librsvg
  2018-05-09 17:38 ` Ricardo Wurmus
@ 2018-05-10 12:01   ` Marius Bakke
  2018-05-10 16:53     ` Mark H Weaver
  0 siblings, 1 reply; 8+ messages in thread
From: Marius Bakke @ 2018-05-10 12:01 UTC (permalink / raw)
  To: Ricardo Wurmus; +Cc: guix-devel

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

Ricardo Wurmus <rekado@elephly.net> writes:

> Hi Marius,
>
> thanks for working on this!
>
>> Our current version of librsvg is officially unmaintained, and the
>> latest version requires Rust.
> […]
>> * librsvg requires Cairo 1.15, which is not a "stable" release branch.
>
> Is there a maintained version of librsvg that depends on a stable
> release version of Cairo?

Unfortunately not.  The 2.42 series is the only maintained version of
librsvg, and depends on both Rust and the Cairo development branch.

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

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

* Re: Updating librsvg
  2018-05-10 12:01   ` Marius Bakke
@ 2018-05-10 16:53     ` Mark H Weaver
  0 siblings, 0 replies; 8+ messages in thread
From: Mark H Weaver @ 2018-05-10 16:53 UTC (permalink / raw)
  To: Marius Bakke; +Cc: guix-devel

Marius Bakke <mbakke@fastmail.com> writes:

> Ricardo Wurmus <rekado@elephly.net> writes:
>
>> Hi Marius,
>>
>> thanks for working on this!
>>
>>> Our current version of librsvg is officially unmaintained, and the
>>> latest version requires Rust.
>> […]
>>> * librsvg requires Cairo 1.15, which is not a "stable" release branch.
>>
>> Is there a maintained version of librsvg that depends on a stable
>> release version of Cairo?
>
> Unfortunately not.  The 2.42 series is the only maintained version of
> librsvg, and depends on both Rust and the Cairo development branch.

There will be trouble if we try to link two different versions of
libcairo.so into the same process, so we cannot use the Cairo
development branch in librsvg while using the release branch of Cairo
elsewhere.  We would need to update our core Cairo package to 1.15.x.

So, I think the soonest we could consider doing this would be in
'core-updates-next'.  Even then, I would be quite nervous about doing
so, because Cairo is a core part of our graphics stack, and I don't
think librsvg is important enough to risk such a crucial component.

Hopefully Cairo 1.16 will be released soon, or perhaps the librsvg
developers could be persuaded to add support for Cairo 1.14.x.

What do you think?

In any case, thanks very much for your investigation.

      Mark

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

end of thread, other threads:[~2018-05-10 16:54 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
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

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.