guix-devel
[Top][All Lists]
Advanced

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

Re: [PATCH 1/2] gnu: Add cargo.


From: Chris Marusich
Subject: Re: [PATCH 1/2] gnu: Add cargo.
Date: Fri, 30 Dec 2016 13:58:31 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

David Craven <address@hidden> writes:

> +(define-public cargo
> +  (package
> +    (name "cargo")
> +    (version (cargo-version (rustc-version 
> %rust-bootstrap-binaries-version)))
> +    (source (origin
> +              (method url-fetch)
> +              ;; Use a cargo tarball with vendored dependencies and a cargo

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’s dependencies 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.

-- 
Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

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