unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
* [bug#38408] [PATCH] WIP patches for the rust importer
       [not found]                 ` <785501a89e81d30db021047529e7262e@riseup.net>
@ 2019-12-04  2:40                   ` Ivan Petkov
  0 siblings, 0 replies; only message in thread
From: Ivan Petkov @ 2019-12-04  2:40 UTC (permalink / raw)
  To: Martin Becze; +Cc: guix-devel, 38408, Efraim Flashner

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

Hi Martin,

> On Dec 2, 2019, at 3:10 PM, Martin Becze <mjbecze@riseup.net> 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
  (package
    (name “rust-foo")
    (source-input `((“bar” ,bar)))))

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

(define-public rust-baz
  (package
    (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.

—Ivan

[-- Attachment #2: Type: text/html, Size: 4585 bytes --]

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2019-12-04  2:41 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <20191126120408.GL1124@E5400>
     [not found] ` <d0ec9546bea5f3a5833ef0a1f21186e7.squirrel@sm.riseup.net>
     [not found]   ` <1E01C051-2EE5-4050-B826-C60E858AAC2B@flashner.co.il>
     [not found]     ` <0b2db52d687fc2acf34dc1e00618dae7.squirrel@sm.riseup.net>
     [not found]       ` <20191128122255.GT1124@E5400>
     [not found]         ` <8981451ac5d914dd5f53fa928741b846@riseup.net>
     [not found]           ` <20191201085941.GB14869@E5400>
     [not found]             ` <d2f9b201395c65462b624055b5c65100@riseup.net>
     [not found]               ` <322B85FF-6EA4-492E-B96A-1F326ADD136E@gmail.com>
     [not found]                 ` <785501a89e81d30db021047529e7262e@riseup.net>
2019-12-04  2:40                   ` [bug#38408] [PATCH] WIP patches for the rust importer Ivan Petkov

Code repositories for project(s) associated with this public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).