From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Petkov Subject: Current state of cargo-build-system Date: Sun, 20 Jan 2019 16:11:58 -0800 Message-ID: <0FA91CF1-5040-4175-9347-7FEF74CCD725@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Content-Type: multipart/alternative; boundary="Apple-Mail=_D296E0C1-6A19-4609-A3BB-7E4A321BEB84" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:44041) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1glNCA-000564-Np for guix-devel@gnu.org; Sun, 20 Jan 2019 19:12:07 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1glNC9-0004Nk-Qj for guix-devel@gnu.org; Sun, 20 Jan 2019 19:12:06 -0500 Received: from mail-pg1-x529.google.com ([2607:f8b0:4864:20::529]:33744) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1glNC9-0004JX-IH for guix-devel@gnu.org; Sun, 20 Jan 2019 19:12:05 -0500 Received: by mail-pg1-x529.google.com with SMTP id z11so8637719pgu.0 for ; Sun, 20 Jan 2019 16:12:04 -0800 (PST) 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 --Apple-Mail=_D296E0C1-6A19-4609-A3BB-7E4A321BEB84 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset=us-ascii Hello Guix! I'm new to both Guix and Guile/Scheme and decided to get my feet wet by attempting to package a non-trivial Rust crate into Guix. This seems like something others have tried before me with varying = degrees of success (I found this thread from a few years ago which doesn't seem to = have resolved in any way = https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00306.html = ). I ran into a host of issues myself, but I was able to prototype some = changes which allowed me to make some progress. Happy to keep hacking on this, = but ultimately I need some insight/guidance on the proper ways to build this = out in Guix :) But before I propose any new changes, I wanted to check, what is the = current state cargo/crates in Guix from a community perspective? Are there any philosophical or technical blockers that preclude pulling = in packages from crates.io, or is it just a matter of chipping away at the = problem? --Ivan= --Apple-Mail=_D296E0C1-6A19-4609-A3BB-7E4A321BEB84 Content-Transfer-Encoding: quoted-printable Content-Type: text/html; charset=us-ascii
Hello Guix!

I'm new to both Guix and Guile/Scheme and decided to get my = feet wet by
attempting to package a non-trivial = Rust crate into Guix.

This seems like something others have tried before me with = varying degrees of
success (I found this thread = from a few years ago which doesn't seem to have
I ran into a host of issues myself, but = I was able to prototype some changes
which allowed = me to make some progress. Happy to keep hacking on this, but
ultimately I need some insight/guidance on the proper ways to = build this out in
Guix :)

But before I propose any new changes, I = wanted to check, what is the current
state = cargo/crates in Guix from a community perspective?

Are there any = philosophical or technical blockers that preclude pulling in
packages from crates.io, or is it just a matter of chipping away at the = problem?

--Ivan
= --Apple-Mail=_D296E0C1-6A19-4609-A3BB-7E4A321BEB84-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: =?utf-8?Q?Ludovic_Court=C3=A8s?= Subject: Re: Current state of cargo-build-system Date: Wed, 23 Jan 2019 11:50:18 +0100 Message-ID: <878szbhclx.fsf@gnu.org> References: <0FA91CF1-5040-4175-9347-7FEF74CCD725@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:45674) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmG7F-0001E0-Bu for guix-devel@gnu.org; Wed, 23 Jan 2019 05:50:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmG79-0001Eb-Vs for guix-devel@gnu.org; Wed, 23 Jan 2019 05:50:38 -0500 Received: from hera.aquilenet.fr ([2a0c:e300::1]:34610) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmG6y-00015U-FP for guix-devel@gnu.org; Wed, 23 Jan 2019 05:50:26 -0500 In-Reply-To: <0FA91CF1-5040-4175-9347-7FEF74CCD725@gmail.com> (Ivan Petkov's message of "Sun, 20 Jan 2019 16:11:58 -0800") 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: Ivan Petkov Cc: guix-devel@gnu.org Hello Ivan, Ivan Petkov skribis: > I'm new to both Guix and Guile/Scheme and decided to get my feet wet by > attempting to package a non-trivial Rust crate into Guix. Cool, thanks for getting in touch! > This seems like something others have tried before me with varying degree= s of > success (I found this thread from a few years ago which doesn't seem to h= ave > resolved in any way https://lists.gnu.org/archive/html/guix-devel/2017-01= /msg00306.html ). > I ran into a host of issues myself, but I was able to prototype some chan= ges > which allowed me to make some progress. Happy to keep hacking on this, but > ultimately I need some insight/guidance on the proper ways to build this = out in > Guix :) I think Danny and maybe ng0 (Cc=E2=80=99d) may be those the most familiar w= ith Rust in Guix. > But before I propose any new changes, I wanted to check, what is the curr= ent > state cargo/crates in Guix from a community perspective? > > Are there any philosophical or technical blockers that preclude pulling in > packages from crates.io, or is it just a matter of chipping away at the p= roblem? I don=E2=80=99t think there are any =E2=80=9Cphilosophical=E2=80=9D blocker= s: as long as this is free software, which I believe is the case for most packages on crates.io, there shouldn=E2=80=99t be any problems. As for the technical issues, I don=E2=80=99t know. I remember David Craven= , who wrote =E2=80=98guix import crate=E2=80=99, didn=E2=80=99t do a mass import = back then, but then the =E2=80=98rust=E2=80=99 package in Guix was also nascent at the time so = perhaps there were other problems that have been resolved since then. Anyway, I think you can go ahead and start experimenting, adding new packages, etc. Let us know how it goes, and do ping Danny and ng0 as needed! :-) Thanks, Ludo=E2=80=99. From mboxrd@z Thu Jan 1 00:00:00 1970 From: ng0@n0.is Subject: Re: Current state of cargo-build-system Date: Wed, 23 Jan 2019 11:46:54 +0000 Message-ID: <20190123114654.5n6qffsepp26lim4@uptimegirl.lan> References: <0FA91CF1-5040-4175-9347-7FEF74CCD725@gmail.com> <878szbhclx.fsf@gnu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit Return-path: Received: from eggs.gnu.org ([209.51.188.92]:34349) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmGzt-0007A8-1z for guix-devel@gnu.org; Wed, 23 Jan 2019 06:47:10 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmGzs-0005e6-6j for guix-devel@gnu.org; Wed, 23 Jan 2019 06:47:09 -0500 Content-Disposition: inline In-Reply-To: <878szbhclx.fsf@gnu.org> 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: Ludovic =?utf-8?Q?Court=C3=A8s?= Cc: guix-devel@gnu.org Ludovic Courts transcribed 1.9K bytes: > Hello Ivan, > > Ivan Petkov skribis: > > > I'm new to both Guix and Guile/Scheme and decided to get my feet wet by > > attempting to package a non-trivial Rust crate into Guix. > > Cool, thanks for getting in touch! > > > This seems like something others have tried before me with varying degrees of > > success (I found this thread from a few years ago which doesn't seem to have > > resolved in any way https://lists.gnu.org/archive/html/guix-devel/2017-01/msg00306.html ). > > I ran into a host of issues myself, but I was able to prototype some changes > > which allowed me to make some progress. Happy to keep hacking on this, but > > ultimately I need some insight/guidance on the proper ways to build this out in > > Guix :) > > I think Danny and maybe ng0 (Cc’d) may be those the most familiar with > Rust in Guix. Not really. I know there were some tickets and bugs/features left to be worked on, but that's about it. Other people took over work, and I'm mostly involved in other projects now (pkgsrc, GNUnet, TALER admin, university, my package manager work, etc). But I can try to answer questions. > > But before I propose any new changes, I wanted to check, what is the current > > state cargo/crates in Guix from a community perspective? > > > > Are there any philosophical or technical blockers that preclude pulling in > > packages from crates.io, or is it just a matter of chipping away at the problem? > > I don’t think there are any “philosophical” blockers: as long as this is > free software, which I believe is the case for most packages on > crates.io, there shouldn’t be any problems. > > As for the technical issues, I don’t know. I remember David Craven, who > wrote ‘guix import crate’, didn’t do a mass import back then, but then > the ‘rust’ package in Guix was also nascent at the time so perhaps there > were other problems that have been resolved since then. Yeah, I haven't tried re-importing my rust packages tree. Maybe it's better now for a fraction of those. > Anyway, I think you can go ahead and start experimenting, adding new > packages, etc. Let us know how it goes, and do ping Danny and ng0 as > needed! :-) > > Thanks, > Ludo’. > From mboxrd@z Thu Jan 1 00:00:00 1970 From: Danny Milosavljevic Subject: Re: Current state of cargo-build-system Date: Wed, 23 Jan 2019 18:10:00 +0100 Message-ID: <20190123181000.6c5fc532@scratchpost.org> References: <0FA91CF1-5040-4175-9347-7FEF74CCD725@gmail.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; boundary="Sig_/nQ3nO_fxfsHNV5mZuPt.JIb"; protocol="application/pgp-signature" Return-path: Received: from eggs.gnu.org ([209.51.188.92]:36449) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gmM2r-000528-Qe for guix-devel@gnu.org; Wed, 23 Jan 2019 12:10:37 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gmM2e-00079c-CF for guix-devel@gnu.org; Wed, 23 Jan 2019 12:10:28 -0500 Received: from dd26836.kasserver.com ([85.13.145.193]:54012) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1gmM2U-0006ys-Nh for guix-devel@gnu.org; Wed, 23 Jan 2019 12:10:12 -0500 In-Reply-To: <0FA91CF1-5040-4175-9347-7FEF74CCD725@gmail.com> 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: Ivan Petkov Cc: guix-devel@gnu.org --Sig_/nQ3nO_fxfsHNV5mZuPt.JIb Content-Type: multipart/mixed; boundary="MP_/DrRHHws=AKkGJGrqP5I+HXn" --MP_/DrRHHws=AKkGJGrqP5I+HXn Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hi Ivan, On Sun, 20 Jan 2019 16:11:58 -0800 Ivan Petkov wrote: > Are there any philosophical or technical blockers that preclude pulling in > packages from crates.io,=20 Cycles. Also, often Cargo.lock specifies exact versions of dependencies (in programs, at least). >or is it just a matter of chipping away at the problem? Pretty much. Back in the day, Rust was in a state of flux. Now, I think they finally committed to not changing the floor from under us while we are walking on it (the "edition" key in Cargo.toml is used to select the Rust version to targ= et). So it makes sense to try again now. First, we'd have to find out what kind of things Cargo can build and how to detect it. I've used Rust to write a tiny operating system - and there, I use a hybrid configuration for the same package: it's both a library and a program. For that, I used a directory with files src/lib.rs and src/main.rs in it, b= ut I'm not sure whether that's set in stone or just what I came up with / the tutorial says. See also . After that, we can decide whether to compile libraries or just ship them as source (right now, we do the latter pretty often - almost everything in Guix Rust library packages ends up in the "src" output). Getting the unit tests to run often requires breaking many cycles, so maybe skip that at first. I've attached my ancient attempt to package some crates--but I think ng0's patchset is nicer than that. --MP_/DrRHHws=AKkGJGrqP5I+HXn Content-Type: text/x-scheme Content-Transfer-Encoding: quoted-printable Content-Disposition: attachment; filename=crates.scm (define-module (wip crates) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) #:use-module (guix utils) #:use-module (guix build-system cargo) #:use-module (guix gexp) #:use-module (gnu packages) #:use-module (gnu packages linux) ; strace #:use-module (gnu packages rust) #:use-module (gnu packages pkg-config)) ;;; FIXME websocket crate, tokio, slack-rs. (define-public rust-rand-bootstrap (package (name "rust-rand-bootstrap") (version "0.3.15") (source (origin (method url-fetch) (uri (string-append "https://github.com/daym/nonrand/archive/= v" version ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0m59msxrxwgwn7sissm6df1ly9zgyy1i53r6n98ajp3ch51myx21")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) ;(propagated-inputs ; `(("rust-libc" ,rust-libc))) ;(native-inputs ; `(("rust-log" ,rust-log))) (home-page "https://github.com/rust-lang/rand") (synopsis "Random number generators") (description "Random number generator that yields non-random numbers.") ;; Choose either license. (license (list license:expat license:asl2.0)))) (define-public rust-tempdir-bootstrap (package (name "rust-tempdir-bootstrap") (version "0.3.5") (source (origin (method url-fetch) (uri (crate-uri "tempdir" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1mij45kgzflkja0h8q9avrik76h5a0b60m9hfd6k9yqxbiplm5w7")) (modules '((guix build utils))) (snippet '(substitute* "Cargo.toml" (("^rand") "nonrand"))))) (build-system cargo-build-system) (propagated-inputs `(("rust-rand" ,rust-rand-bootstrap))) (home-page "https://github.com/rust-lang/tempdir") (synopsis "Library for managing a temporary directory in Rust") (description "This package provides a library for managing a temporary = directory and deleting all contents when it's dropped. ") ;; Choose either license. (license (list license:expat license:asl2.0)))) (define-public rust-gcc-bootstrap (package (name "rust-gcc-bootstrap") (version "0.3.40") (source (origin (method url-fetch) (uri (crate-uri "gcc" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0l6rnf3b7vaxhcs7yg9nyv7brqidy2g0xhg8z0a2pvw6jkjvjbc7")) (modules '((guix build utils))) (snippet '(substitute* "Cargo.toml" (("^rayon.*") " ") (("^tempdir.*") " ") (("\"rayon\"") ""))))) ; TODO be nicer about it (build-system cargo-build-system) ;(arguments ; `(#:cargo-build-flags '("--features" ""))) (native-inputs `(("rust-tempdir" ,rust-tempdir-bootstrap "src"))) ; (inputs `(("rust-rayon" ,rust-rayon "src"))) ; optional (home-page "FIXME") (synopsis "Invoke the native C compiler to compile native C code into a= static archive") (description "This package provides a build-time dependency for Cargo b= uild scripts to assist in invoking the native C compiler to compile native C code into a st= atic archive to be linked into Rust code. ") ;; Choose either license. (license (list license:expat license:asl2.0)))) (define-public rust-bitflags (package (name "rust-bitflags") (version "0.7.0") (source (origin (method url-fetch) (uri (crate-uri "bitflags" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0v8hh6wdkpk9my8z8442g4hqrqf05h0qj53dsay6mv18lqvqklda")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) (home-page "https://github.com/rust-lang/bitflags") (synopsis "Macro to generate structures which behave like bitflags, in Rust") (description "@code{bitflags} provides a macro to generate structures which behave like bitflags, in Rust.") ;; Choose either license. (license (list license:expat license:asl2.0)))) ;;; TODO syntex-errors remove libc dependency again (isatty). (define-public rust-syntex-syntax-bootstrap ; FIXME test whether it works w= ith a very old syntex-syntax (package (name "rust-syntex-syntax-bootstrap") (version "0.3.0") (source (origin (method url-fetch) (uri (crate-uri "syntex_syntax" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "05rahy6vlr82nvf8fx1y8a6qzbspymhh1ja06lwi3b0kv26jrshn")) (modules '((guix build utils))) (snippet '(begin (substitute* "src/lib.rs" (("^#![[]feature.*") " ") (("^extern crate libc;") " ")) (substitute* "Cargo.toml" (("^libc.*") " ")) (substitute* "src/parse/mod.rs" ;; Only used on Windows (("libc::consts::os::extra::O_BINARY") "0")))))) (build-system cargo-build-system) (propagated-inputs `(("rust-bitflags" ,rust-bitflags "src"))) (home-page "FIXME") (synopsis "Export of libsyntax for code generation") (description "Export of libsyntax for code generation") ;; Choose either license. (license (list license:expat license:asl2.0)))) (define-public rust-ctest-bootstrap (package (name "rust-ctest-bootstrap") (version "0.1.1") (source (origin (method url-fetch) (uri (crate-uri "ctest" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0wlsw2ab36jqdcdzwxd58pir782449b937kljhxl49y7jzf2ssqm")))) (build-system cargo-build-system) (propagated-inputs `(("rust-gcc-bootstrap" ,rust-gcc-bootstrap "src") ; sometimes cycle b= ecause of rust-gcc - rust-tempdir - rust-rand - rust-libc; note: also becau= se of rust-rayon as well. ("rust-syntex-syntax-bootstrap" ,rust-syntex-syntax-bootstrap "src")= )) (home-page "https://github.com/alexcrichton/ctest") (synopsis "Automated tests of FFI bindings.") (description "Automated tests of FFI bindings.") ;; Choose either license. (license (list license:expat license:asl2.0)))) (define-public rust-libc (package (name "rust-libc") (version "0.2.18") (source (origin (method url-fetch) ;; (crate-uri "libc" version) doesn't contain libc-test. (uri (string-append "https://github.com/rust-lang/libc/archive/" ver= sion ".tar.gz")) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1mh62gfm91aypbr830m2qklwgscgb0pcfpxzi3a6k60faamlrndf")))) (build-system cargo-build-system) ;(native-inputs ; `(("rust-ctest-bootstrap" ,rust-ctest-bootstrap "src"))) (arguments `(#:tests? #f #:phases (modify-phases %standard-phases (add-after 'unpack 'delete-lock (lambda _ (delete-file "Cargo.lock") #t)) (delete 'build)))) (home-page "https://github.com/rust-lang/libc") (synopsis "Raw bindings to platform APIs for Rust") (description "Libc provides a library for types and bindings to native C functions often found in libc or other common platform libraries.") ;; Choose either license. (license (list license:expat license:asl2.0)))) (define-public rust-c-vec (package (name "rust-c-vec") (version "1.2.0") (source (origin ;(method git-fetch) ;(uri (git-reference ; (url "https://github.com/GuillaumeGomez/c_vec-rs.git") ; (commit "ee4ccb4ecb092926175ec58c60434ee153190aa8"))) (method url-fetch) (uri (crate-uri "c_vec" version)) (file-name (string-append name "-" version "-checkout")) (sha256 (base32 "01y5rllqclky30mskrycfm5i9nng5k2xsyksjg9lnapnb2kgan80")))) (build-system cargo-build-system) (arguments `(#:tests? #f #:phases (modify-phases %standard-phases (add-after 'build 'delete-lock (lambda _ (delete-file "Cargo.lock") #t))))) (native-inputs `(("rust-libc" ,rust-libc "src"))) (home-page "https://github.com/GuillaumeGomez/c_vec-rs") ; FIXME fixed = manually. It said () (synopsis "Structures to wrap C arrays") (description "Structures to wrap C arrays") ;; Choose either license. (license (list license:asl2.0 license:expat)))) ;; Requires inline assembly and so doesn't work on Rust stable. (define-public rust-spin (package (name "rust-spin") (version "0.4.5") (source (origin (method url-fetch) (uri (crate-uri "spin" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0lvyyxg646wl67b41655p2z25s725sw1rsfvpnm8d7vq5dpa45hx")))) (build-system cargo-build-system) (arguments `(#:tests? #f #:phases (modify-phases %standard-phases ;; Spin doesn't actually work - so don't build it. (delete 'build)))) (home-page "https://github.com/mvdnes/spin-rs.git") (synopsis "Synchronization primitives based on spinning, for Rust") (description "@code{spin} provides synchronization primitives based on spinning. They don't work in Rust stable, however. This is a dummy package to make Cargo find (and hopefully not use) it.") (license license:expat))) (define-public rust-lazy-static (package (name "rust-lazy-static") (version "0.2.4") (source (origin (method url-fetch) (uri (crate-uri "lazy_static" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1p30qiivkkg1d43s10pj3g07zpriqbdxy0hbc99gfcfkjzfv34bj")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'patch (lambda _ ; (substitute* "Cargo.toml" ; (("^[[]dependencies[.]spin[]]") "") ; (("^version =3D \"0.4\"") "") ; spin ; (("^optional =3D true") "") ; spin ; (("^spin_no_std.*") " ;")) #t)) (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) (inputs `(;; Even though rust-spin doesn't work on Rust stable, ;; Cargo requires it to be there. ("rust-spin" ,rust-spin "src"))) (home-page "https://github.com/rust-lang-nursery/lazy-static.rs") (synopsis "Macro for declaring lazily evaluated statics in Rust") (description "@code{lazy_static} provides a macro for declaring lazily evaluated statics in Rust.") (license license:expat))) (define-public rust-pkg-config (package (name "rust-pkg-config") (version "0.3.9") (source (origin (method url-fetch) (uri (crate-uri "pkg-config" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "00x9vc7667m4r8sn8idgpmj9yf1ih6bj1cdrshf1mkb5h5mlr2rs")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) (native-inputs `(("rust-lazy-static" ,rust-lazy-static "src"))) (home-page "https://github.com/alexcrichton/pkg-config-rs") (synopsis "Library to run the @code{pkg-config} system tool at build time in Rust") (description "@code{pkg-config} provides a library that invokes the @code{pkg-config} system tool at build time in Rust (to be used in Cargo build scripts).") ;; Choose either license. (license (list license:expat license:asl2.0)))) (define-public rust-log (package (name "rust-log") (version "0.3.6") (source (origin (method url-fetch) (uri (crate-uri "log" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0m40hgs3cg57dd5kk1mabfk6gk8z6l1cihar8akx4kmzz1xlk0xb")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) (home-page "https://github.com/rust-lang/log") (synopsis "Logging interface for Rust") (description "@code{log} provides a logging facade for Rust. Libraries can use the provided logging API, and the consumer of those libraries can choose the logging implementation that is most suitable for its use case.") ;; Choose either license. (license (list license:expat license:asl2.0)))) ;; Contains broken members (define-public rust-futures (package (name "rust-futures") (version "0.1.10") (source (origin (method url-fetch) (uri (crate-uri "futures" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0hdwwbwld2af0g53rlgawxgz7sjmv9zinqzrrfxv2h1q12vkx4f1")))) (build-system cargo-build-system) (inputs `(("rust-log" ,rust-log "src"))) (home-page "https://github.com/alexcrichton/futures-rs") (synopsis "An implementation of futures and streams featuring zero allocations, composability, and iterator-like interfaces. ") (description "An implementation of futures and streams featuring zero allocations, composability, and iterator-like interfaces. ") ;; Choose either license. (license (list license:expat license:asl2.0)))) (define-public rust-rand (package (name "rust-rand") (version "0.3.15") (source (origin (method url-fetch) (uri (crate-uri "rand" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "178qgglinqawwsw6l8imgnplxkmxcj404jqm92pds695xhv0cbh2")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) (native-inputs `(("rust-log" ,rust-log "src"))) (propagated-inputs `(("rust-libc" ,rust-libc "src"))) (home-page "https://github.com/rust-lang/rand") (synopsis "Random number generators for Rust") (description "@code{rand} provides random number generators and other r= andomness functionality for Rust.") ;; Choose either license. (license (list license:expat license:asl2.0)))) ;; Error: unused imports (WTF). Dependency: rust-byteorder, which requires = quickcheck, which is broken. (define-public rust-bytes (package (name "rust-bytes") (version "0.4.0") (source (origin (method url-fetch) (uri (crate-uri "bytes" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "12m10gdkvlwrn7d5p1j102sf3fy3gq5rs3izwvvbsz4kpf2knl46")))) (build-system cargo-build-system) (propagated-inputs `(("rust-rand" ,rust-rand "src") ("rust-byteorder" ,rust-byteorder "src"))) (home-page "https://github.com/carllerche/bytes") (synopsis "Types and traits for working with bytes") (description "Types and traits for working with bytes.") (license license:expat))) ;; Reference cycle (define-public rust-quickcheck (package (name "rust-quickcheck") (version "0.4.2") (source (origin (method url-fetch) (uri (crate-uri "quickcheck" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "16symxywrj4qh431wjhl7zvzv4n9hp111dmn9qnj1kqq830r9wiy")))) (build-system cargo-build-system) (inputs `( ; FIXME fix loop ("rust-env-logger" ,rust-env-logger "src") ("rust-log" ,rust-log "src") ("rust-rand" ,rust-rand "src"))) (home-page "https://github.com/BurntSushi/quickcheck") (synopsis "Automatic property based testing with shrinking.") (description "Automatic property based testing with shrinking.") (license (list license:unlicense license:expat)))) (define-public rust-regex-syntax (package (name "rust-regex-syntax") (version "0.4.0") (source (origin (method url-fetch) (uri (crate-uri "regex-syntax" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0ms4s2zdr9lr79isjphqqg2wkc8rblvpwcax21ghj0vnynqr349g")))) (build-system cargo-build-system) (native-inputs `(("rust-quickcheck" ,rust-quickcheck "src") ("rust-rand" ,rust-rand "src"))) (home-page "https://github.com/rust-lang/regex") (synopsis "A regular expression parser.") (description "This package provides a regular expression parser.") (license (list license:expat license:asl2.0)))) ;; Broken because quickcheck is broken. (define-public rust-utf8-ranges (package (name "rust-utf8-ranges") (version "1.0.0") (source (origin (method url-fetch) (uri (crate-uri "utf8-ranges" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "08j129anwcbdwvcx1izb4nsf0nbxksin2zqxjbrfz2x94mjsnbv6")))) (build-system cargo-build-system) (native-inputs `(("rust-quickcheck" ,rust-quickcheck "src"))) (home-page "https://github.com/BurntSushi/utf8-ranges") (synopsis "Convert ranges of Unicode codepoints to UTF-8 byte ranges.") (description "Convert ranges of Unicode codepoints to UTF-8 byte ranges.") (license (list license:unlicense license:expat)))) ;; Broken because quickcheck is broken (define-public rust-memchr (package (name "rust-memchr") (version "1.0.1") (source (origin (method url-fetch) (uri (crate-uri "memchr" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1d27b8kk2zijj6f9qlcwa4q71lkbm72nfvbyy6wlgspi8q7crg0x")))) (build-system cargo-build-system) (native-inputs `(("rust-quickcheck" ,rust-quickcheck "src"))) (inputs `(("rust-libc" ,rust-libc "src"))) (home-page "https://github.com/BurntSushi/rust-memchr") (synopsis "Safe interface to memchr.") (description "Safe interface to memchr.") (license (list license:unlicense license:expat)))) ;; Fails because of quickcheck (define-public rust-byteorder (package (name "rust-byteorder") (version "1.0.0") (source (origin (method url-fetch) (uri (crate-uri "byteorder" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1j0qvrvpmk01v5qkmp5l7gmjvlpxxygivm1w074qb63bxsq7f2f4")))) (build-system cargo-build-system) (native-inputs `(("rust-quickcheck" ,rust-quickcheck "src") ("rust-rand" ,rust-rand "src"))) (home-page "https://github.com/BurntSushi/byteorder") (synopsis "Library for reading/writing numbers in big-endian and little-endian.= ") (description "Library for reading/writing numbers in big-endian and little-endian.= ") (license (list license:unlicense license:expat)))) ;; Reference cycle (define-public rust-csv (package (name "rust-csv") (version "0.15.0") (source (origin (method url-fetch) (uri (crate-uri "csv" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "173dv65zmmm4kfqnjk66vhgj4w82vh9c14jq6r55c755qwvjpwky")))) (build-system cargo-build-system) (native-inputs `(("rust-regex" ,rust-regex "src"))) (inputs `(("rust-byteorder" ,rust-byteorder "src") ("rust-memchr" ,rust-memchr "src") ; FIXME ("rust-rustc-serialize" ,rust-rustc-serialize "src") )) (home-page "https://github.com/BurntSushi/rust-csv") (synopsis "CSV parsing with automatic type based decoding and encoding.") (description "CSV parsing with automatic type based decoding and encoding.") (license (list license:unlicense license:expat)))) (define-public rust-strsim (package (name "rust-strsim") (version "0.6.0") (source (origin (method url-fetch) (uri (crate-uri "strsim" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "151ngha649cyybr3j50qg331b206zrinxqz7fzw1ra8r0n0mrldl")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) (home-page "https://github.com/dguo/strsim-rs") (synopsis "String similarity metrics") (description "@code{strsim} contains implementations of string similarity metrics. Includes Hamming, Levenshtein, Damerau-Levenshtein, Jaro, and Jaro-Winkler.= ") (license license:expat))) ;; Reference cycle (define-public rust-docopt (package (name "rust-docopt") (version "0.7.0") (source (origin (method url-fetch) (uri (crate-uri "docopt" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1n6gbhsks2w9y0b4bwqyawh4ghbkka09w6pjcrq9i1sd51pflcmb")))) (build-system cargo-build-system) (inputs `(("rust-lazy-static" ,rust-lazy-static "src") ("rust-regex" ,rust-regex "src") ; FIXME ("rust-rustc-serialize" ,rust-rustc-serialize "src") ("rust-strsim" ,rust-strsim "src"))) (home-page "https://github.com/docopt/docopt.rs") (synopsis "Command line argument parsing.") (description "Command line argument parsing.") (license (list license:unlicense license:expat)))) ;; #![cfg_attr(test, feature(test))] is unstable. So it breaks. (define-public rust-fs2 (package (name "rust-fs2") (version "0.4.1") (source (origin (method url-fetch) (uri (crate-uri "fs2" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1bsb3x8mkffsnr4xd5ac6v8b8sv80npfd1x37k0rv1amfphaxv9l")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-after 'unpack 'patch (lambda _ (substitute* "src/lib.rs" (("#[!][[]cfg_attr[(]test, feature[(]test[)][)][]]") "")) #t))))) (native-inputs `(("rust-tempdir" ,rust-tempdir "src"))) (inputs `(("rust-libc" ,rust-libc "src"))) (home-page "https://github.com/danburkert/fs2-rs") (synopsis "Cross-platform file locks and file duplication.") (description "Cross-platform file locks and file duplication.") (license (list license:expat license:asl2.0)))) (define-public rust-memmap (package (name "rust-memmap") (version "0.5.0") (source (origin (method url-fetch) (uri (crate-uri "memmap" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1lmbkx92xlqb5yqh4cj2k4qfrm3x4jkbs04i84nfl60wyfdfap06")))) (build-system cargo-build-system) (native-inputs `(("rust-tempdir" ,rust-tempdir "src"))) (inputs `(("rust-fs2" ,rust-fs2 "src") ("rust-libc" ,rust-libc "src"))) (home-page "https://github.com/danburkert/memmap-rs") (synopsis "Cross-platform Rust API for memory-mapped file IO in Rust") (description "@code{memmap} provides a cross-platform Rust API for memory-mapped file IO in Rust.") ;; Choose either license. (license (list license:expat license:asl2.0)))) ;; Reference cycle (define-public rust-aho-corasick (package (name "rust-aho-corasick") (version "0.6.1") (source (origin (method url-fetch) (uri (crate-uri "aho-corasick" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1gymiyg646qyfzb0abqhmpxpd5smpcv4nyzhr5b9p5v24ya0nrjg")))) (build-system cargo-build-system) (native-inputs `(("rust-csv" ,rust-csv "src") ("rust-docopt" ,rust-docopt "src") ("rust-memmap" ,rust-memmap "src") ("rust-quickcheck" ,rust-quickcheck "src") ("rust-rand" ,rust-rand "src") ; ("rust-rustc-serialize" ,rust-rustc-serialize "src") )) (inputs `(("rust-memchr" ,rust-memchr "src"))) (home-page "https://github.com/BurntSushi/aho-corasick") (synopsis "Fast multiple substring searching with finite state machines= .") (description "Fast multiple substring searching with finite state machi= nes.") (license (list license:unlicense license:expat)))) ;(define-public rust-simd ; (package ; (name "rust-simd") ; (version "0.2.0") ; (source ; (origin ; (method url-fetch) ; (uri (crate-uri "simd" version)) ; (file-name ; (string-append name "-" version ".tar.gz")) ; (sha256 ; (base32 ; "183vwg7c5z4pl0wifzhw31h2adwlwilzprbxjc8g3wg1595d353s")))) ; (build-system cargo-build-system) ; (native-inputs ; `(("rust-cfg-if" ,rust-cfg-if "src"))) ; (inputs ; `(("rust-serde" ,rust-serde "src") ; ("rust-serde-derive" ,rust-serde-derive "src"))) ; (home-page "https://github.com/rust-lang-nursery/simd") ; (synopsis "SIMD instructions") ; (description "@code{simd} offers limited cross-platform access to SIMD ;instructions on CPUs, as well as raw interfaces to platform-specific ;instructions.") ; (license (list license:expat license:asl2.0)))) ;; Dependency cycle (define-public rust-regex (package (name "rust-regex") (version "0.2.1") (source (origin (method url-fetch) (uri (crate-uri "regex" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "008cl7l1pssf8xihgy23508d5msvnkz2h05h1bpxyqkd1xyw2y22")))) (build-system cargo-build-system) (native-inputs `(("rust-lazy-static" ,rust-lazy-static "src") ("rust-quickcheck" ,rust-quickcheck "src") ("rust-rand" ,rust-rand "src"))) (inputs `(("rust-aho-corasick" ,rust-aho-corasick "src") ("rust-memchr" ,rust-memchr "src") ("rust-regex-syntax" ,rust-regex-syntax "src") ;("rust-simd" ,rust-simd "src") ; FIXME ("rust-thread-local" ,rust-thread-local "src") ("rust-utf8-ranges" ,rust-utf8-ranges "src"))) (home-page "https://github.com/rust-lang/regex") (synopsis "An implementation of regular expressions for Rust. This implementation= uses finite automata and guarantees linear time matching on all inputs. ") (description "An implementation of regular expressions for Rust. This implementatio= n uses finite automata and guarantees linear time matching on all inputs. ") ;; Choose either license. (license (list license:expat license:asl2.0)))) ;; Dependency cycle (define-public rust-env-logger (package (name "rust-env-logger") (version "0.4.0") (source (origin (method url-fetch) (uri (crate-uri "env_logger" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0i21vvjyr49kc6si6mivla0clg5rbf26bl64wc77mzimnsqiz5wr")))) (build-system cargo-build-system) (inputs `(("rust-log" ,rust-log "src") ("rust-regex" ,rust-regex "src"))) (home-page "https://github.com/rust-lang/log") (synopsis "A logging implementation for `log` which is configured via an environm= ent variable. ") (description "This package provides a logging implementation for `log` which is conf= igured via an environment variable. ") (license (list license:expat license:asl2.0)))) ;; Required dependency clippy is missing (define-public rust-lazycell (package (name "rust-lazycell") (version "0.5.0") (source (origin (method url-fetch) (uri (crate-uri "lazycell" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "0cb3h771aqnq753krx6f6vpxw3nn41b8gaj24q6y7wqy5z1aaf7c")))) (build-system cargo-build-system) ; FIXME why? (inputs `(("rust-clippy" ,rust-clippy "src"))) (home-page "https://github.com/indiv0/lazycell") (synopsis "Library providing a lazily filled Cell struct in Rust") (description "@code{lazycell} provides a library for lazily filled Cell structs in Rust.") ;; Choose either license. (license (list license:expat license:asl2.0)))) (define-public rust-cfg-if (package (name "rust-cfg-if") (version "0.1.0") (source (origin (method url-fetch) (uri (crate-uri "cfg-if" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "137qikjcal4h75frzcn6mknygqk8vy5bva7w851aydb5gc6pc7ny")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) (home-page "https://github.com/alexcrichton/cfg-if") (synopsis "Ergonomically define an item depending on a large number of @code{#[cfg]} parameters in Rust") (description "@code{cfg-if} provides a macro to ergonomically define an item dependi= ng on a large number of #[cfg] parameters in Rust. Structured like an if-else chain, the first matching branch is the item that gets emitted.") ;; Choose either license. (license (list license:expat license:asl2.0)))) (define-public rust-net2 (package (name "rust-net2") (version "0.2.26") (source (origin (method url-fetch) (uri (crate-uri "net2" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1qp3q6xynb481rsp3ig1nmqb6qlxfba3shfrmqij88cppsv9rpsy")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) (inputs `(("rust-cfg-if" ,rust-cfg-if "src") ;("rust-kernel32-sys" ,rust-kernel32-sys "src") ("rust-libc" ,rust-libc "src") ;("rust-winapi" ,rust-winapi "src") ;("rust-ws2-32-sys" ,rust-ws2-32-sys "src") )) (home-page "https://github.com/rust-lang-nursery/net2-rs") (synopsis "Extensions to the standard library's networking types as proposed in R= FC 1158. ") (description "Extensions to the standard library's networking types as proposed in R= FC 1158. ") (license (list license:expat license:asl2.0)))) (define-public rust-slab (package (name "rust-slab") (version "0.3.0") (source (origin (method url-fetch) (uri (crate-uri "slab" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "08xw8w61zdfn1094qkq1d554vh5wmm9bqdys8gqqxc4sv2pgrd0p")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) (home-page "https://github.com/carllerche/slab") (synopsis "Simple slab allocator") (description "@code{slab} provides a SLAB allocator for Rust. It preallocates memory for values of a given type.") (license license:expat))) (define-public rust-epoll (package (name "rust-epoll") (version "2.1.0") (source (origin (method url-fetch) (uri (crate-uri "epoll" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1al3bcaqwgdq9kfk9xhkdg4nhjbhjz64r51y4v89qc02bbgz8f7l")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) (inputs `(("rust-bitflags" ,rust-bitflags "src") ("rust-libc" ,rust-libc "src"))) (home-page "https://github.com/nathansizemore/epoll") (synopsis "Safe epoll interface.") (description "Safe epoll interface.") (license license:mpl2.0))) (define-public rust-tempdir (package (name "rust-tempdir") (version "0.3.5") (source (origin (method url-fetch) (uri (crate-uri "tempdir" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1mij45kgzflkja0h8q9avrik76h5a0b60m9hfd6k9yqxbiplm5w7")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) (propagated-inputs `(("rust-rand" ,rust-rand "src"))) (home-page "https://github.com/rust-lang/tempdir") (synopsis "Manages a temporary directory in Rust") (description"@code{tempdir} provides a library for managing a temporary directory and deleting all contents when it's dropped, in Rust.") ;; Choose either license. (license (list license:expat license:asl2.0)))) ;; Dependency cycle (define-public rust-mio (package (name "rust-mio") (version "0.6.4") (source (origin (method url-fetch) (uri (crate-uri "mio" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "10g65mhc82mf4q01m4sibgxjqalpi4f04gs5ggkkd4w4kbabvkgf")))) (build-system cargo-build-system) (native-inputs `(("rust-bytes" ,rust-bytes "src") ("rust-env-logger" ,rust-env-logger "src") ("rust-tempdir" ,rust-tempdir "src"))) (inputs `(("rust-lazycell" ,rust-lazycell "src") ("rust-libc" ,rust-libc "src") ("rust-log" ,rust-log "src") ("rust-net2" ,rust-net2 "src") ("rust-slab" ,rust-slab "src"))) (home-page "https://github.com/carllerche/mio") (synopsis "Lightweight non-blocking IO") (description "This package provides lightweight non-blocking IO.") (license license:expat))) (define-public rust-tokio (package (name "rust-tokio") (version "0.0.0") ; FIXME 0.1 (source (origin (method url-fetch) (uri (crate-uri "tokio" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1qpyb5ncs57cb7g6m37m9ybxiwq22dzh8k22n39ifqc654hql05d")))) (build-system cargo-build-system) (arguments `(#:phases (modify-phases %standard-phases (add-before 'install 'delete-lock (lambda _ (delete-file "Cargo.lock") ; Otherwise "cargo install" fails. #t))))) (home-page "") (synopsis "A fast, async, IO framework") (description "This package provides a fast, async, IO framework.") (license license:expat))) ;; Test failure. (define-public rust-glob (package (name "rust-glob") (version "0.2.11") (source (origin (method url-fetch) (uri (crate-uri "glob" version)) (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 "1ysvi72slkw784fcsymgj4308c3y03gwjjzqxp80xdjnkbh8vqcb")))) (build-system cargo-build-system) (propagated-inputs `(("rust-tempdir" ,rust-tempdir "src"))) (home-page "https://github.com/rust-lang/glob") (synopsis "Matching file paths against Unix shell style patterns") (description "This package provides support for matching file paths again= st Unix shell style patterns.") ;; Choose either license. (license (list license:expat license:asl2.0)))) ; TODO mioco ; TOOD https://intermezzos.github.io/ ; TODO http://os.phil-opp.com/ [!!!] ; good Rust: https://github.com/google/xi-editor ; good Rust: https://github.com/jwilm/alacritty ; good Rust: https://github.com/BurntSushi/ripgrep --MP_/DrRHHws=AKkGJGrqP5I+HXn-- --Sig_/nQ3nO_fxfsHNV5mZuPt.JIb Content-Type: application/pgp-signature Content-Description: OpenPGP digital signature -----BEGIN PGP SIGNATURE----- iQEzBAEBCAAdFiEEds7GsXJ0tGXALbPZ5xo1VCwwuqUFAlxIn+gACgkQ5xo1VCww uqW4nQgAnJEXbz4x70hGBAec604LQw0UW+ZM7eGT8+Zc96Yd+B62BwtxHaZzvSaq j8LVGa1QRBw8q76r4CJTtOvpXlccG9gckyzqLmzMv+T1NUAV92I9/eMxz75HaX4t CJ1UYTptvzPv/clCUrxCPDfKzBVV7YbnLZw1+9luw6NP4n12hSuPqSGQJdMbwCHO PxnS08qx4ewU2IMRWa5PXpoWnTeZEslT5rzj9uTRqTtkxeVuLMPocvdlDxi39iVO cV6O4juErA/AF2heSr+s4kn2FmYcrTBqBb4pm3n2Hno9JTxtGhqPWHDLbgv9pL8M +o8rFfggzqs1/GJ9B1sP2RxH0wcRgQ== =FsdZ -----END PGP SIGNATURE----- --Sig_/nQ3nO_fxfsHNV5mZuPt.JIb-- From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Petkov Subject: Re: Current state of cargo-build-system Date: Fri, 25 Jan 2019 15:57:03 -0800 Message-ID: <2E175E19-40C4-4954-A282-EE31C77D7A5D@gmail.com> References: <0FA91CF1-5040-4175-9347-7FEF74CCD725@gmail.com> <20190123181000.6c5fc532@scratchpost.org> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:52925) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gnBLr-0004Cu-G8 for guix-devel@gnu.org; Fri, 25 Jan 2019 18:57:36 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gnBLa-0006xX-PK for guix-devel@gnu.org; Fri, 25 Jan 2019 18:57:21 -0500 Received: from mail-pf1-x436.google.com ([2607:f8b0:4864:20::436]:45309) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gnBLW-0006qh-Qg for guix-devel@gnu.org; Fri, 25 Jan 2019 18:57:16 -0500 Received: by mail-pf1-x436.google.com with SMTP id g62so5429734pfd.12 for ; Fri, 25 Jan 2019 15:57:08 -0800 (PST) In-Reply-To: <20190123181000.6c5fc532@scratchpost.org> 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: Danny Milosavljevic Cc: guix-devel@gnu.org Thank you all for the responses! > Cycles. Also, often Cargo.lock specifies exact versions of = dependencies (in > programs, at least) Yes, this is pretty much the main issue I immediately hit when doing a = naive crate import, more on this further down. > First, we'd have to find out what kind of things Cargo can build and = how to > detect it. Cargo supports a subcommand called `metadata` which essentially dumps = its manifest in JSON format, which will include build scripts, binary = outputs, etc. I think this should give us enough information to figure out which = packages have targets to install (right now we try to install every single package = which doesn't work for libraries) among other things. > After that, we can decide whether to compile libraries or just ship = them as > source (right now, we do the latter pretty often - almost everything = in Guix > Rust library packages ends up in the "src" output). > =20 > Getting the unit tests to run often requires breaking many cycles, so = maybe > skip that at first. I tried breaking up cycles by hand for a couple days on another sample = import, but its just too tedious and error prone, especially when cycles span = multiple packages... I'd really like for us to solve the issue altogether if = possible. Cargo (thankfully) checks and rejects an true dependency cycles, but its notion of dev-dependencies (deps only used for running tests) is what = throws guix in for a loop. Dev-depencency cycles are permitted by cargo because = it builds the target crate independently, then it builds any extra = dependencies which may or may not depend on it, and then it builds a test crate which = depends on both. There are potentially legitimate cases which trigger this = scenario (such as testing your own public API through an upstream crate, see = proc-macro2 for an example), or are just exacerbated by optional dependencies. I think depending on the "src" output of crates is the right way to get = things started (this is what cargo essentially does anyway, it figures out what = crates are in the dependency, pulls their sources down and builds them), we can = always optimize this in the future to avoid recursively rebuilding crates over = and over. However, it appears that guix still insists on building the entire = package even if we only depend on the "src" output. Is it possible to lazily build = packages based on the type of dependency? Is this something the build system can = finagle, or is this an inherent limitation to guix? --Ivan= From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Petkov Subject: Re: Current state of cargo-build-system Date: Sun, 27 Jan 2019 15:13:24 -0800 Message-ID: References: <0FA91CF1-5040-4175-9347-7FEF74CCD725@gmail.com> <20190123181000.6c5fc532@scratchpost.org> <2E175E19-40C4-4954-A282-EE31C77D7A5D@gmail.com> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:49718) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gntcV-0004VF-Tu for guix-devel@gnu.org; Sun, 27 Jan 2019 18:13:44 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gntcU-0007FU-6y for guix-devel@gnu.org; Sun, 27 Jan 2019 18:13:43 -0500 Received: from mail-pl1-x62b.google.com ([2607:f8b0:4864:20::62b]:40197) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1gntcU-00079D-0j for guix-devel@gnu.org; Sun, 27 Jan 2019 18:13:42 -0500 Received: by mail-pl1-x62b.google.com with SMTP id u18so6903547plq.7 for ; Sun, 27 Jan 2019 15:13:27 -0800 (PST) In-Reply-To: <2E175E19-40C4-4954-A282-EE31C77D7A5D@gmail.com> 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 Answering my own question after digging through the guix source, maybe = someone can correct me if I=E2=80=99ve gotten things wrong! > On Jan 25, 2019, at 3:57 PM, Ivan Petkov = wrote: >=20 > However, it appears that guix still insists on building the entire = package even > if we only depend on the "src" output. Is it possible to lazily build = packages > based on the type of dependency? Is this something the build system = can finagle, > or is this an inherent limitation to guix? So it appears that guix takes package definitions and feeds them to = their respective build system, which then get lowered to a bag (a more = low-level representation of a package). The bag is then built as the actual = derivation. Thus it is possible for the build system to do any kind of preprocessing = of the dependency closure or even produce dynamic/hidden packages if neccessary = (but is this discouraged?). It also appears that guix expects to build the package entirely and it = allows the build system to split up the result into various outputs, but there = isn't a notion of lazily building out only the required outputs (I suppose the = real solution to this would be to break up the package definition in the = appropriate way to support this). I have some ideas on how to resolve our cargo woes, namely by = introducing crate-source-only packages that don't actually get built and substitute = those for any potential cycles. I'd like to make imports and maintenance of = package definitions as simple as possible, so I'd like to explore making the = build system a bit more clever in handling this. Will do some more prototyping on my own and report back! --Ivan From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ricardo Wurmus Subject: Re: Current state of cargo-build-system Date: Mon, 28 Jan 2019 09:44:52 +0100 Message-ID: <87y375qigr.fsf@elephly.net> References: <0FA91CF1-5040-4175-9347-7FEF74CCD725@gmail.com> <20190123181000.6c5fc532@scratchpost.org> <2E175E19-40C4-4954-A282-EE31C77D7A5D@gmail.com> Mime-Version: 1.0 Content-Type: text/plain Return-path: Received: from eggs.gnu.org ([209.51.188.92]:59979) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1go2yU-0007L4-CG for guix-devel@gnu.org; Mon, 28 Jan 2019 04:13:02 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1go2yO-0003y3-9P for guix-devel@gnu.org; Mon, 28 Jan 2019 04:13:01 -0500 Received: from sender-of-o51.zoho.com ([135.84.80.216]:21042) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1go2yN-0003wZ-EP for guix-devel@gnu.org; Mon, 28 Jan 2019 04:12:56 -0500 In-reply-to: <2E175E19-40C4-4954-A282-EE31C77D7A5D@gmail.com> 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: Ivan Petkov Cc: guix-devel@gnu.org Ivan Petkov writes: > However, it appears that guix still insists on building the entire package even > if we only depend on the "src" output. Is it possible to lazily build packages > based on the type of dependency? Is this something the build system can finagle, > or is this an inherent limitation to guix? Outputs are only generated when building the package. If all you need is the source code, however, you can use (package-source the-package) and use the resulting value as an input to another package. -- Ricardo From mboxrd@z Thu Jan 1 00:00:00 1970 From: Ivan Petkov Subject: Re: Current state of cargo-build-system Date: Mon, 28 Jan 2019 08:23:25 -0800 Message-ID: <4D2E6E9C-D22D-4843-B51B-1B6C7FD9A538@gmail.com> References: <0FA91CF1-5040-4175-9347-7FEF74CCD725@gmail.com> <20190123181000.6c5fc532@scratchpost.org> <2E175E19-40C4-4954-A282-EE31C77D7A5D@gmail.com> <87y375qigr.fsf@elephly.net> Mime-Version: 1.0 (Mac OS X Mail 11.5 \(3445.9.1\)) Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([209.51.188.92]:42136) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1go9hF-0007RJ-O4 for guix-devel@gnu.org; Mon, 28 Jan 2019 11:23:42 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1go9hF-0005Rl-0N for guix-devel@gnu.org; Mon, 28 Jan 2019 11:23:41 -0500 Received: from mail-pg1-x52d.google.com ([2607:f8b0:4864:20::52d]:40681) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1go9hC-0005Dz-PA for guix-devel@gnu.org; Mon, 28 Jan 2019 11:23:38 -0500 Received: by mail-pg1-x52d.google.com with SMTP id z10so7411496pgp.7 for ; Mon, 28 Jan 2019 08:23:31 -0800 (PST) In-Reply-To: <87y375qigr.fsf@elephly.net> 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: Ricardo Wurmus Cc: guix-devel@gnu.org > On Jan 28, 2019, at 12:44 AM, Ricardo Wurmus = wrote: >=20 > Outputs are only generated when building the package. >=20 > If all you need is the source code, however, you can use = (package-source > the-package) and use the resulting value as an input to another = package. Thanks Ricardo, I think this is what I was looking for! In the case of cargo, I think it we still need to processes the input = tarball into the right format to get vendored correctly, but the build system should = know enough about how to perform the vendoring steps anyway, so this is a step in = the right direction. =E2=80=94Ivan=