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 16:07:02 -0800
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/25.1 (gnu/linux)

David Craven <address@hidden> writes:

>> What does "vendored dependencies" mean?  Are there dependencies included
>> in this tarball which are not managed via Guix?
>
> Rust crates are included as source in the vendor subfolder. It uses
> the cargo vendor subcommand [0] for building cargo offline. I don't
> think that people want this merged, I only published it in case
> someone is interested and as an example of how you could deploy a
> webapplication written in rust.
>
> [0] https://github.com/alexcrichton/cargo-vendor

I'm not sure I follow.  I downloaded

  https://github.com/dvc94ch/cargo/archive/0.15.0-cargo-vendor.tar.gz

and checked out its "vendor" directory - it looks like there's a lot of
source code for other packages included right in there.  I understand
that this is some sort of mechanism to enable cargo to build things
offline, but is it appropriate to put all of those other packages'
source into the "cargo" package that is going to be built by Guix?  I
haven't been following the Cargo/Rust in Guix discussion thread, so it's
entirely possible I just missed something that was already discussed.

>> Should some of these be native-inputs?  Like cmake or pkg-config?
>
> Cargo is a build tool, it uses cmake and pkg-config at runtime to
> check for c dependencies and compile c code (like for building the
> bundled llvm in rustc).
>
> guix gc --references /gnu/store/g88cylsl8x8d4jvpqgaas1dwws77d2c1-cargo-0.15.0
> /gnu/store/4pnp5scrgmjp21flaihmgbckwrz6z4g3-libgcrypt-1.7.3
> /gnu/store/a64w9dq219a8d9k4mfz76mnzph9wsvfj-zlib-1.2.8
> /gnu/store/cdi08kw7r6r684w8mk0xq0dkgpjhfpmd-gcc-4.9.4-lib
> /gnu/store/iwgi9001dmmihrjg4rqhd6pa6788prjw-glibc-2.24
> /gnu/store/k9rds2a8fbk7qn8dak5y6lwmyq7ds437-libssh2-1.7.0
> /gnu/store/liib5wid6rx9rkss78spc7wcqzwb1g2k-openssl-1.0.2j
> /gnu/store/nblsf2i13xvxwsy947wmf7zyv6viadwl-curl-7.50.3

OK.  That makes sense.  But I wonder why cmake and pkg-config are
missing from the list of references if that is the case?

>> Why don't the tests work?
>
> Haven't looked into it yet, I thought ng0 wanted to experiment with
> the rust build system and needed an up-to-date cargo.

OK.

>> Don't we have to patch the shebangs to make them work?
>
> Nope. Patching shebangs at this stage is only needed for the build to
> work. The build works, all scripts that end up in the output directory
> are patched after the install phase.

I see.

> I'd also need to import the cargo-build-system in this commit.

I tried applying these two patches and, yes, I got an error because
cargo-build-system wasn't present.

-- 
Chris

Attachment: signature.asc
Description: PGP signature


reply via email to

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