From mboxrd@z Thu Jan 1 00:00:00 1970 From: Chris Marusich Subject: Re: [PATCH 1/2] gnu: Add cargo. Date: Fri, 30 Dec 2016 13:58:31 -0800 Message-ID: <877f6h6pvc.fsf@gmail.com> References: <20161229153453.5698-1-david@craven.ch> Mime-Version: 1.0 Content-Type: multipart/signed; boundary="=-=-="; micalg=pgp-sha256; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52521) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1cN5C9-0004BY-Vq for guix-devel@gnu.org; Fri, 30 Dec 2016 16:58:39 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1cN5C8-0000iH-Rn for guix-devel@gnu.org; Fri, 30 Dec 2016 16:58:38 -0500 Received: from mail-pg0-x243.google.com ([2607:f8b0:400e:c05::243]:34746) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1cN5C8-0000i3-Ky for guix-devel@gnu.org; Fri, 30 Dec 2016 16:58:36 -0500 Received: by mail-pg0-x243.google.com with SMTP id b1so23166952pgc.1 for ; Fri, 30 Dec 2016 13:58:36 -0800 (PST) In-Reply-To: <20161229153453.5698-1-david@craven.ch> (David Craven's message of "Thu, 29 Dec 2016 16:34:52 +0100") 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 --=-=-= Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable David Craven writes: > +(define-public cargo > + (package > + (name "cargo") > + (version (cargo-version (rustc-version %rust-bootstrap-binaries-vers= ion))) > + (source (origin > + (method url-fetch) > + ;; Use a cargo tarball with vendored dependencies and a ca= rgo What does "vendored dependencies" mean? Are there dependencies included in this tarball which are not managed via Guix? > + (inputs > + `(("cmake" ,cmake) > + ("curl" ,curl) > + ("libgit2" ,libgit2) > + ("libssh2" ,libssh2) > + ("openssl" ,openssl) > + ("pkg-config" ,pkg-config) > + ("python-2" ,python-2) > + ("zlib" ,zlib))) Should some of these be native-inputs? Like cmake or pkg-config? > + (arguments > + `(#:cargo ,cargo-bootstrap > + #:tests? #f ; FIXME Why don't the tests work? > + #:phases > + (modify-phases %standard-phases > + ;; Avoid cargo complaining about missmatched checksums. > + (delete 'patch-source-shebangs) > + (delete 'patch-generated-file-shebangs) > + (delete 'patch-usr-bin-file) Don't we have to patch the shebangs to make them work? > + ;; Set CARGO_HOME to use the vendored dependencies. > + (add-after 'unpack 'set-cargo-home > + (lambda* (#:key inputs #:allow-other-keys) > + (let* ((gcc (assoc-ref inputs "gcc")) > + (cc (string-append gcc "/bin/gcc"))) > + (setenv "CARGO_HOME" (string-append (getcwd) "/cargohome"= )) > + (setenv "CMAKE_C_COMPILER" cc) > + (setenv "CC" cc)) > + #t))))) > + (home-page "https://github.com/rust-lang/cargo") > + (synopsis "Build tool and package manager for Rust") > + (description "Cargo downloads your Rust project=E2=80=99s dependenci= es and compiles > +your project.") Perhaps we can give a better description? The guide has more info; maybe we can adapt some of that info to a more detailed description: http://doc.crates.io/guide.html > + ;; Cargo is dual licensed Apache and MIT. Also contains > + ;; code from openssl which is GPL2 with linking exception. > + (license (list license:asl2.0 license:expat license:gpl2+)))) Your comment says "GPL2" but the code says "gpl2+". Doesn't "gpl2+" mean "GPL2 or later"? I don't think those are the same thing. =2D-=20 Chris --=-=-= Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAEBCAAdFiEEy/WXVcvn5+/vGD+x3UCaFdgiRp0FAlhm2IcACgkQ3UCaFdgi Rp3BFg//WtmL8KERPoPwr20B2y2/YnvnzaN8ZwBBvSRkcHABqUo4R3jicLzOI74C S7zAGV0klmqQXzi+0KTaP5h/o6yLrqpftORXh3fXbhKSj/OZwl69f0ZY/d99wpvY 9Tbe0ZCQJG+JabJQDJLjhGsQf+vHN7j1gH+CfVt203zC7XWEzNQlDqxJ94KfHm9x MMECs0mpv8oq3/fpCrgatCfmR983GmE7APLKcGtAaODVKuAoKaN14k8wWwnTCL0Q /arY61EfhTM448mGbODhSW52Lat6WziAf3R+KmRuX5gSaf1aVWYotA5uiJaJaPVh 8qV3wsHv/E/fwGNTOgoGpAIrpr5QWU16ar7BwBi1Vx3pU5zrLoiZ/MN0NTdaEBun pQcbZi84Q8OnkuISeo+tv0QuYno0P1j3nplbM3mC1gEz3M87FD6VHoz95XYakYAF SEkfE+E2nw9nOhT9xNntbHT0UNjd+CFc7r0xwp7CPPHeU0qdlvjx6axTanaWAJUc nFuWN0IBkMWJ8EcTULduLu1KkMmZZS7lgZuKK+wQxRvX22eAttU7W3FLJBOdM8Mh w+YsBy8+y6OEael+e6710YaoQmi11OT2tnZMj4qkdf5tWgPo1n+fTw+cFQfrF7Lj O7PgD8kW8CaX8jV7m4bHG38LHF9ImG3YYo0Yh5/SocRzZLpzcsM= =08w3 -----END PGP SIGNATURE----- --=-=-=--