[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] WIP patches for the rust importer

From: Ivan Petkov
Subject: Re: [PATCH] WIP patches for the rust importer
Date: Tue, 3 Dec 2019 18:40:37 -0800

Hi Martin,

On Dec 2, 2019, at 3:10 PM, Martin Becze <address@hidden> wrote:

When you say source import of the transitive dependencies, do you mean
that all the rust libs should just be source only or do you mean the top
level package should have to declare all the transitive dependencies?

All rust libs should be source only imports, but each package definition
should only declare dependencies on the crates it consumes directly and
guix should figure out the rest (in other words, I’d expect there to be a 
one-to-one mapping between a Cargo.toml and a package definition).

For example, if crate foo depends on crate bar which depends on crate
baz, I’d expect the definitions to look like:

(define-public rust-foo
    (name “rust-foo")
    (source-input `((“bar” ,bar)))))

(define-public rust-bar
    (name “rust-bar")
    (source-input `((“baz” ,baz)))))

(define-public rust-baz
    (name “rust-baz")))

But while building foo (assuming it is some kind of application), guix
would ensure that bar and baz are available in the build environment.

IMO this direction would be the most maintainable in the long term.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]