From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: [PATCH 1/7] build-system: Add cargo build system. Date: Tue, 04 Oct 2016 11:03:24 +0200 Message-ID: <87shsccwpv.fsf@gnu.org> References: <20160928151538.11679-1-david@craven.ch> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:37340) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1brLdN-0006dm-9w for guix-devel@gnu.org; Tue, 04 Oct 2016 05:03:39 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1brLdI-0008RC-BO for guix-devel@gnu.org; Tue, 04 Oct 2016 05:03:32 -0400 In-Reply-To: <20160928151538.11679-1-david@craven.ch> (David Craven's message of "Wed, 28 Sep 2016 17:15:32 +0200") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: "Guix-devel" To: David Craven Cc: guix-devel@gnu.org David Craven 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 , I suggested using =E2=80=98share/rust-source=E2=80=99 or similar to store the= source. Would it be possible? Last thing: Could you add a couple of lines in guix.texi under =E2=80=9CBui= ld Systems=E2=80=9D? OK with these changes. Thanks! Ludo=E2=80=99.