guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/7] build-system: Add cargo build system.


From: Ludovic Courtès
Subject: Re: [PATCH 1/7] build-system: Add cargo build system.
Date: Tue, 04 Oct 2016 11:03:24 +0200
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

David Craven <address@hidden> skribis:

> * guix/build-system/cargo.scm (default-cargo, default-rustc,
>   %cargo-build-system-modules, cargo-build, lower, cargo-build-system):
>   New variables.
> * guix/build/cargo-build-system.scm (configure, build, check, install,
>   %standard-phases, cargo-build): New variables.

[...]

> +(define* (install #:key inputs outputs #:allow-other-keys)
> +  "Install a given Cargo package."
> +  (let* ((out (assoc-ref outputs "out"))
> +         (src (assoc-ref inputs "source"))
> +         (bin (string-append out "/bin"))
> +         (rsrc (string-append out "/rustsrc")))
> +    (mkdir-p rsrc)
> +    ;; Rust doesn't have a stable ABI yet. Because of this
> +    ;; Cargo doesn't have a search path for binaries yet.
> +    ;; Until this changes we are working around this by
> +    ;; distributing crates as source and replacing
> +    ;; references in Cargo.toml with store paths.
> +    (copy-recursively "src" (string-append rsrc "/src"))

OK.  In
<https://lists.gnu.org/archive/html/guix-devel/2016-09/msg01991.html>, I
suggested using ‘share/rust-source’ or similar to store the source.
Would it be possible?

Last thing: Could you add a couple of lines in guix.texi under “Build
Systems”?

OK with these changes.

Thanks!

Ludo’.



reply via email to

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