From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Craven Subject: [PATCH 6/7] gnu: Add cargo-bootstrap. Date: Wed, 28 Sep 2016 17:15:37 +0200 Message-ID: <20160928151538.11679-6-david@craven.ch> References: <20160928151538.11679-1-david@craven.ch> Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:49007) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpGam-0002Ea-BE for guix-devel@gnu.org; Wed, 28 Sep 2016 11:16:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1bpGag-00040q-3d for guix-devel@gnu.org; Wed, 28 Sep 2016 11:16:15 -0400 Received: from so254-10.mailgun.net ([198.61.254.10]:49369) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1bpGae-00040O-T6 for guix-devel@gnu.org; Wed, 28 Sep 2016 11:16:10 -0400 In-Reply-To: <20160928151538.11679-1-david@craven.ch> 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: guix-devel@gnu.org * gnu/packages/rust.scm (cargo-bootstrap): New variable. --- gnu/packages/rust.scm | 43 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 43 insertions(+) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index 2726348..5b369fc 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -97,3 +97,46 @@ (description "This package prepares the rustc binary for bootstrapping the rustc package.") (license license:asl2.0))) + +(define-public cargo-bootstrap + (package + (name "cargo-bootstrap") + (version "1.12.0") + (source rust-bootstrap-x86_64-1.12.0) + (build-system gnu-build-system) + (native-inputs + `(("patchelf" ,patchelf))) + (inputs + `(("gcc-lib" ,gcc "lib") + ("gcc-toolchain-6" ,gcc-toolchain-6))) + (arguments + `(#:tests? #f + #:strip-binaries? #f + #:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'build) + (replace 'install + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (platform ,(system->rust-platform (%current-system))) + (ld-so (string-append (assoc-ref inputs "libc") + ,(glibc-dynamic-linker)))) + (system* "bash" "install.sh" + (string-append "--prefix=" out) + "--components=cargo") + (zero? (system* "patchelf" + "--set-interpreter" ld-so + "--set-rpath" + (string-append + out "/lib:" + (assoc-ref inputs "gcc-lib") "/lib:" + (assoc-ref inputs "gcc-toolchain-6") "/lib") + (string-append out "/bin/cargo"))))))))) + (home-page "https://www.rust-lang.org") + (synopsis "Cargo bootstrap") + (description "This package prepares the cargo binary for bootstrapping +the cargo package and it's dependencies. When rustc is build using the new +rustbuild build system it also requires cargo. The gnu build system is going +to be deprecated.") + (license license:asl2.0))) -- 2.9.0