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: Fri, 09 Dec 2016 15:17:30 +0100 Message-ID: <87oa0lchl1.fsf@gnu.org> References: <20160928151538.11679-1-david@craven.ch> <87shsccwpv.fsf@gnu.org> <87k2b9s3e5.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> 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]:46288) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cFLzX-0004hL-Fs for guix-devel@gnu.org; Fri, 09 Dec 2016 09:17:45 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cFLzR-0007DS-Dj for guix-devel@gnu.org; Fri, 09 Dec 2016 09:17:39 -0500 In-Reply-To: <87k2b9s3e5.fsf@wasp.i-did-not-set--mail-host-address--so-tickle-me> (ng0@libertad.pw's message of "Fri, 09 Dec 2016 12:17:22 +0000") 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: ng0 , David Craven Cc: guix-devel@gnu.org ng0 skribis: > Ludovic Court=C3=A8s writes: > >> 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=9C= Build >> Systems=E2=80=9D? >> >> OK with these changes. >> >> Thanks! >> >> Ludo=E2=80=99. >> >> > Hi, would it be possible to add some very short notes on why this > isn't complete from your (David) view? Given the work that has gone into these Rust patches, I think it would be nice to apply them and possibly document any shortcoming or future work items. WDYT, David? :-) Ludo=E2=80=99.