From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms11 with LMTPS id ED89CpfbqV7OHwAA0tVLHw (envelope-from ) for ; Wed, 29 Apr 2020 19:55:03 +0000 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id KG1AFqDbqV7fVgAAbx9fmQ (envelope-from ) for ; Wed, 29 Apr 2020 19:55:12 +0000 Received: from lists.gnu.org (lists.gnu.org [IPv6:2001:470:142::17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 6A6B0942309 for ; Wed, 29 Apr 2020 19:55:10 +0000 (UTC) Received: from localhost ([::1]:39074 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTsnW-0007Bc-FB for larch@yhetil.org; Wed, 29 Apr 2020 15:55:10 -0400 Received: from eggs.gnu.org ([209.51.188.92]:49490) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jTsm2-0006Jf-Ba for guix-patches@gnu.org; Wed, 29 Apr 2020 15:55:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.90_1) (envelope-from ) id 1jTslS-0005Av-QH for guix-patches@gnu.org; Wed, 29 Apr 2020 15:53:38 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:33214) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1jTslS-0005Ak-8Q for guix-patches@gnu.org; Wed, 29 Apr 2020 15:53:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jTslS-0005VK-7m for guix-patches@gnu.org; Wed, 29 Apr 2020 15:53:02 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#38408] [PATCH v9 3/8] Added Guile-Semver as a dependency to guix Resent-From: Martin Becze Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 29 Apr 2020 19:53:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 38408 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: Ludovic =?UTF-8?Q?Court=C3=A8s?= Cc: 38408@debbugs.gnu.org, Efraim Flashner , jsoo1@asu.edu, Leo Famulari Received: via spool by 38408-submit@debbugs.gnu.org id=B38408.158818992621065 (code B ref 38408); Wed, 29 Apr 2020 19:53:02 +0000 Received: (at 38408) by debbugs.gnu.org; 29 Apr 2020 19:52:06 +0000 Received: from localhost ([127.0.0.1]:44756 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTskO-0005TE-8h for submit@debbugs.gnu.org; Wed, 29 Apr 2020 15:52:06 -0400 Received: from mx1.riseup.net ([198.252.153.129]:45454) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jTskK-0005T4-R1 for 38408@debbugs.gnu.org; Wed, 29 Apr 2020 15:51:55 -0400 Received: from bell.riseup.net (unknown [10.0.1.178]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client CN "*.riseup.net", Issuer "Sectigo RSA Domain Validation Secure Server CA" (not verified)) by mx1.riseup.net (Postfix) with ESMTPS id 49C8Kg3pDfzFfGN; Wed, 29 Apr 2020 12:51:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=riseup.net; s=squak; t=1588189912; bh=j0j07/Fjxsl64SuCzjWSp9Y0RSNwrBglr8k1n8VG6vM=; h=Subject:From:To:Cc:References:Date:In-Reply-To:From; b=T82jsLsWigSkJtqbb3gKzRhNS1y1ewTXfnR7jgYFdj923FNetoFu5sshlclWhxvCr BYBnip8JxHx7xt48AezNC9rOqHLGytzyHUaL+EM8Ka/rIOSntYAaT39pbPGz2/oDaZ mvwvKNeGLWrj+5IuHUUoAzjBw75895PrTkYXEK7E= X-Riseup-User-ID: 1B094DDDED1A159DFF58D5C8577D3546906D912B929A7529968BE2A6ED986C8E Received: from [127.0.0.1] (localhost [127.0.0.1]) by bell.riseup.net (Postfix) with ESMTPSA id 49C8KP6qDxzJqTs; Wed, 29 Apr 2020 12:51:37 -0700 (PDT) From: Martin Becze References: <20200217100345.GI1968@E5400> <87wo8l702y.fsf@gnu.org> <874kvld2bl.fsf@gnu.org> <87sgj4nwjw.fsf@gnu.org> <8453e3ce-bc5a-3bb3-1bfb-deaca7ca11d3@riseup.net> <6386cf3e-1156-8d09-a264-cacbb4935f03@riseup.net> <47ed3e36-0d9f-cd6f-a64b-e3f9c9d71537@riseup.net> <20200322201018.GB16716@jasmine.lan> <45972138-5bf8-821a-178a-c04e6446e076@riseup.net> <87mu86njj3.fsf@gnu.org> <5ae20de5-ddf8-22ab-2c40-d76715751962@riseup.net> <6eedb6bb-49ec-87ac-9a38-10d02a21726f@riseup.net> <87lfn0myho.fsf@gnu.org> <3a0949f6-0e01-0909-f3c8-311c4bb5cf7b@riseup.net> Autocrypt: addr=mjbecze@riseup.net; keydata= mQENBE9w5AMBCADgJkbsy1TAb9x2MHupHGu+Rb7utyvsx/tdv2amgkm80PdzDWOAVJGvRX8g UQfnUUIUwXhicdd0mG5Xmf1S6YreV2qM2rYqO8rFk6cWyLK6901NpD+gXJgjKLipvjk+8370 l7yUJmoSDdNDK7kIhWOs6HYkMK5No/Bs4SbtY5PjF1tVmNbk5KzlyKUDmMclQB1gI0cmrJ2s doTuLz4IC90UZYhV9pq/MIGjlh4eY8aQR5Uj6/jXtrwneS9V3ouhB+R9uHtKqqyok5nNdPlC UvfA/bo/2er9UAmSkewLQOTKOfwj0Ei5IQ2eRLtO5LZLZi3K4m6FOB9s37gZ5K8tp/KtABEB AA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7mZLx+/Yf9hnYAYRZJDQLIv7YdDiYuQWq9jQwuQNs fzYMI6NKgQC+WwOjCbksq9tBE3G4hldltS67LogTtLN6kMAAu6ebzwyvABEBAAGJATYEGAEC ACACGwwWIQTz7/81Or0tjbvA2rEyGpsLNjs9lwUCWQWzWQAKCRAyGpsLNjs9l6SuCAC1mgXQ 4+WvOGIhgeE/3QxuafVj8AapWeN54Lp5On32bkphwAVBFSHxCsoqCMz+eneFVhzTLzdsmIjQ Kbd1U2BZf5jpQKKC+WsNxfWuad2Q500bYO/EJ2kkgKoW8sdnMQp6RWnin4ldtZoD1gHrvi+q ecnLqVSt3zJr2CmI+eBzSDee0KJxXYx2ga72yrrH9UhYE+6TEW1qXs0cjMd/gKu6IUk6fFmX 3mzizUG6k4lN1WefLgRkS69YrAiRTtrpUvMv6BEeLBDlBzi3RFYqdxghW6brlmhRv28muUWN ZjlEbsKmDE4fz2JVN64/wDeyqz/XREkWNYtJ/52H6c/CR7MV Message-ID: Date: Wed, 29 Apr 2020 14:51:33 -0500 MIME-Version: 1.0 In-Reply-To: <3a0949f6-0e01-0909-f3c8-311c4bb5cf7b@riseup.net> Content-Type: multipart/mixed; boundary="------------A2073DE6963BEC7B0FFEBF39" Content-Language: en-US X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-Received-From: 209.51.188.43 X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Scanner: scn0 X-Spam-Score: 0.09 Authentication-Results: aspmx1.migadu.com; dkim=fail (rsa verify failed) header.d=riseup.net header.s=squak header.b=T82jsLsW; dmarc=fail reason="SPF not aligned (relaxed)" header.from=riseup.net (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 2001:470:142::17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Scan-Result: default: False [0.09 / 13.00]; RCVD_VIA_SMTP_AUTH(0.00)[]; GENERIC_REPUTATION(0.00)[-0.49364327407575]; TO_DN_SOME(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2001:470:142::/48:c]; R_DKIM_REJECT(1.00)[riseup.net:s=squak]; HAS_ATTACHMENT(0.00)[]; IP_REPUTATION_HAM(0.00)[asn: 22989(0.17), country: US(-0.00), ip: 2001:470:142::17(-0.49)]; DWL_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; RCPT_COUNT_FIVE(0.00)[5]; DKIM_TRACE(0.00)[riseup.net:-]; MX_GOOD(-0.50)[cached: eggs.gnu.org]; MAILLIST(-0.20)[mailman]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; RCVD_IN_DNSWL_FAIL(0.00)[2001:470:142::17:server fail]; MIME_TRACE(0.00)[0:+,1:+,2:+,3:+,4:+,5:+,6:+,7:+]; RCVD_TLS_LAST(0.00)[]; ASN(0.00)[asn:22989, ipnet:2001:470:142::/48, country:US]; MID_RHS_MATCH_FROM(0.00)[]; TAGGED_FROM(0.00)[larch=yhetil.org]; FROM_NEQ_ENVFROM(0.00)[mjbecze@riseup.net,guix-patches-bounces@gnu.org]; ARC_NA(0.00)[]; URIBL_BLOCKED(0.00)[fbengineering.ch:email,lepiller.eu:email,fsf.org:email,leibniz-psychology.org:email,crates.io:url,crate.io:url,gnu.org:email,craven.ch:email,kadziolka.net:email,riseup.net:email,elephly.net:email,vllmrt.net:email]; FROM_HAS_DN(0.00)[]; MIME_GOOD(-0.10)[multipart/mixed,text/plain,text/x-patch]; HAS_LIST_UNSUB(-0.01)[]; RCVD_COUNT_SEVEN(0.00)[10]; FORGED_SENDER_MAILLIST(0.00)[]; DMARC_POLICY_SOFTFAIL(0.10)[riseup.net : SPF not aligned (relaxed),none] X-TUID: Zx2KHDpO1eUP This is a multi-part message in MIME format. --------------A2073DE6963BEC7B0FFEBF39 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit This patch has gotten stall again, with commits 5fbc753ab524809cd81e3e5c54b3d0acbe33792d and 5dfe02c60767a633c67f7f6fc9557b54b3c99b63\ here is an updated patch set. Also git pull work on this agian! not sure why, but prob something on my end. as always let me know if there is anything that needs to be fixed. thanks! On 4/17/20 9:57 AM, Martin Becze wrote: > Sounds good! > There seems to be a regression now. guix pull fails to build > extra-modules, it can't find the guile-semver module. Any clues on what > to look for to fix this? > > On 4/12/20 11:59 AM, Ludovic Courtès wrote: >> Hi Martin, >> >> Martin Becze skribis: >> >>> The previous email had the attached set (v13). Let me know if it got >>> lost and I need to send it again. >> >> I think it just needs some more review time, everything is good on your >> side! >> >> I’m sorry it takes this long. As far as I’m concerned, I’m focusing on >> getting the release out of the door currently… almost there! >> >> Thank you, >> Ludo’. >> > > > --------------A2073DE6963BEC7B0FFEBF39 Content-Type: text/x-patch; charset=UTF-8; name="v14-0006-guix-self-Adds-guile-semver-as-a-depenedency.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename*0="v14-0006-guix-self-Adds-guile-semver-as-a-depenedency.patch" >From 03cb901b537222121caf87eb62fefc1e066e4ef9 Mon Sep 17 00:00:00 2001 From: Martin Becze Date: Fri, 21 Feb 2020 10:41:44 -0500 Subject: [PATCH v14 6/6] guix: self: Adds guile-semver as a depenedency. * guix/self.scm (compiled-guix) Added guile-semver as a depenedency. --- guix/self.scm | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/guix/self.scm b/guix/self.scm index 4682cd221c..37fc59c410 100644 --- a/guix/self.scm +++ b/guix/self.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017, 2018, 2019, 2020 Ludovic Courtès +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -54,6 +55,7 @@ ("guile-git" (ref '(gnu packages guile) 'guile3.0-git)) ("guile-sqlite3" (ref '(gnu packages guile) 'guile3.0-sqlite3)) ("guile-gcrypt" (ref '(gnu packages gnupg) 'guile3.0-gcrypt)) + ("guile-semver" (ref '(gnu packages guile-xyz) 'guile3.0-semver)) ("gnutls" (ref '(gnu packages tls) 'guile3.0-gnutls)) ("zlib" (ref '(gnu packages compression) 'zlib)) ("lzlib" (ref '(gnu packages compression) 'lzlib)) @@ -711,6 +713,9 @@ Info manual." (define guile-gcrypt (specification->package "guile-gcrypt")) + (define guile-semver + (specification->package "guile-semver")) + (define gnutls (specification->package "gnutls")) @@ -719,7 +724,7 @@ Info manual." (cons (list "x" package) (package-transitive-propagated-inputs package))) (list guile-gcrypt gnutls guile-git guile-json - guile-ssh guile-sqlite3)) + guile-ssh guile-sqlite3 guile-semver)) (((labels packages _ ...) ...) packages))) -- 2.26.2 --------------A2073DE6963BEC7B0FFEBF39 Content-Type: text/x-patch; charset=UTF-8; name="v14-0005-import-crate-Parametrized-importing-of-dev-depen.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v14-0005-import-crate-Parametrized-importing-of-dev-depen.pa"; filename*1="tch" >From efce0190880ae04df2ba767b4709cfc4c71dadbc Mon Sep 17 00:00:00 2001 From: Martin Becze Date: Mon, 3 Feb 2020 16:19:49 -0500 Subject: [PATCH v14 5/6] import: crate: Parametrized importing of dev dependencies. This changes the behavoir of the recusive crate importer so that it will include importing of development dependencies for the top level package but will not inculded the development dependencies for any other imported package. * guix/import/crate.scm (make-crate-sexp): Add the key BUILD?. (crate->guix-package): Add the key INCLUDE-DEV-DEPS?. (crate-recursive-import): Likewise. * guix/scripts/import/crate.scm (guix-import-crate): Likewise. * tests/crate.scm (cargo-recursive-import): Likewise. --- guix/import/crate.scm | 27 +++++++++++++++++++-------- guix/scripts/import/crate.scm | 4 ++-- tests/crate.scm | 3 +-- 3 files changed, 22 insertions(+), 12 deletions(-) diff --git a/guix/import/crate.scm b/guix/import/crate.scm index ffb74bd8cc..42a18faff3 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -152,7 +152,7 @@ record or #f if it was not found." `((arguments (,'quasiquote ,args)))))) (define* (make-crate-sexp #:key name version cargo-inputs cargo-development-inputs - home-page synopsis description license) + home-page synopsis description license build?) "Return the `package' s-expression for a rust package with the given NAME, VERSION, CARGO-INPUTS, CARGO-DEVELOPMENT-INPUTS, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE." @@ -179,7 +179,9 @@ and LICENSE." (base32 ,(bytevector->nix-base32-string (port-sha256 port)))))) (build-system cargo-build-system) - ,@(maybe-arguments (append '(#:skip-build? #t) + ,@(maybe-arguments (append (if build? + '() + '(#:skip-build? #t)) (maybe-cargo-inputs cargo-inputs) (maybe-cargo-development-inputs cargo-development-inputs))) @@ -204,11 +206,12 @@ and LICENSE." 'unknown-license!))) (string-split string (string->char-set " /")))) -(define* (crate->guix-package crate-name #:key version repo) +(define* (crate->guix-package crate-name #:key version include-dev-deps? repo) "Fetch the metadata for CRATE-NAME from crates.io, and return the `package' s-expression corresponding to that package, or #f on failure. When VERSION is specified, attempt to fetch that version; otherwise fetch the -latest version of CRATE-NAME." +latest version of CRATE-NAME. If INCLUDE-DEV-DEPS is true then this +will also lookup the development dependencs for the given crate." (define (semver-range-contains-string? range version) (semver-range-contains? (string->semver-range range) @@ -256,9 +259,12 @@ latest version of CRATE-NAME." (let* ((dependencies (crate-version-dependencies version*)) (dep-crates dev-dep-crates (partition normal-dependency? dependencies)) (cargo-inputs (sort-map-dependencies dep-crates)) - (cargo-development-inputs '())) + (cargo-development-inputs (if include-dev-deps? + (sort-map-dependencies dev-dep-crates) + '()))) (values - (make-crate-sexp #:name crate-name + (make-crate-sexp #:build? include-dev-deps? + #:name crate-name #:version (crate-version-number version*) #:cargo-inputs cargo-inputs #:cargo-development-inputs cargo-development-inputs @@ -268,11 +274,16 @@ latest version of CRATE-NAME." #:description (crate-description crate) #:license (and=> (crate-version-license version*) string->license)) - cargo-inputs)))) + (append cargo-inputs cargo-development-inputs))))) (define* (crate-recursive-import crate-name #:key version) (recursive-import crate-name - #:repo->guix-package (memoize crate->guix-package) + #:repo->guix-package (lambda* params + ;; only download the development dependencies for the top level package + (let ((include-dev-deps? (equal? (car params) crate-name)) + (crate->guix-package* (memoize crate->guix-package))) + (apply crate->guix-package* + (append params `(#:include-dev-deps? ,include-dev-deps?))))) #:version version #:guix-name crate-name->package-name)) diff --git a/guix/scripts/import/crate.scm b/guix/scripts/import/crate.scm index 552628cfc7..9252c52dfa 100644 --- a/guix/scripts/import/crate.scm +++ b/guix/scripts/import/crate.scm @@ -96,13 +96,13 @@ Import and convert the crate.io package for PACKAGE-NAME.\n")) (if (assoc-ref opts 'recursive) (crate-recursive-import name #:version version) - (let ((sexp (crate->guix-package name #:version version))) + (let ((sexp (crate->guix-package name #:version version #:include-dev-deps? #t))) (unless sexp (leave (G_ "failed to download meta-data for package '~a'~%") (if version (string-append name "@" version) name))) - sexp))) + (list sexp)))) (() (leave (G_ "too few arguments~%"))) ((many ...) diff --git a/tests/crate.scm b/tests/crate.scm index 65d5ac3389..76bd3707df 100644 --- a/tests/crate.scm +++ b/tests/crate.scm @@ -462,8 +462,7 @@ (? string? hash))))) (build-system cargo-build-system) (arguments - ('quasiquote (#:skip-build? - #t #:cargo-inputs + ('quasiquote (#:cargo-inputs (("rust-intermediate-1" ('unquote rust-intermediate-1-1.0)) ("rust-intermediate-2" -- 2.26.2 --------------A2073DE6963BEC7B0FFEBF39 Content-Type: text/x-patch; charset=UTF-8; name="v14-0004-import-utils-Trim-patch-version-from-names.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename*0="v14-0004-import-utils-Trim-patch-version-from-names.patch" >From 6e9b04821dce30be6ae4b76c8ff36b2ae80c01c2 Mon Sep 17 00:00:00 2001 From: Martin Becze Date: Thu, 30 Jan 2020 11:19:13 -0500 Subject: [PATCH v14 4/6] import: utils: Trim patch version from names. This remove the the patch version from input names. For example 'rust-my-crate-1.1.2' now becomes 'rust-my-crate-1.1' * guix/import/utils.scm (package->definition): Trim patch version from generated package names. * tests/crate.scm: (cargo>guix-package): Likewise. (cargo-recursive-import): Likewise. --- guix/import/utils.scm | 7 ++++--- tests/crate.scm | 44 +++++++++++++++++++++---------------------- 2 files changed, 26 insertions(+), 25 deletions(-) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index a147d0d693..a97cfb1185 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -265,9 +265,10 @@ package definition." ('package ('name name) ('version version) . rest) ('let _ ('package ('name name) ('version version) . rest))) - `(define-public ,(string->symbol (if append-version? - (string-append name "-" version) - version)) + `(define-public ,(string->symbol + (if append-version? + (string-append name "-" (version-major+minor version)) + version)) ,guix-package)))) (define (build-system-modules) diff --git a/tests/crate.scm b/tests/crate.scm index beaa696be0..65d5ac3389 100644 --- a/tests/crate.scm +++ b/tests/crate.scm @@ -280,7 +280,7 @@ (_ (error "Unexpected URL: " url))))) (match (crate->guix-package "foo") - ((define-public rust-foo-1.0.0 + ((define-public rust-foo-1.0 (package (name "rust-foo") (version "1.0.0") (source @@ -296,7 +296,7 @@ ('quasiquote (#:skip-build? #t #:cargo-inputs - (("rust-leaf-alice-1.0.0" ('unquote rust-leaf-alice-1.0.0)))))) + (("rust-leaf-alice" ('unquote rust-leaf-alice-1.0)))))) (home-page "http://example.com") (synopsis "summary") (description "summary") @@ -359,7 +359,7 @@ (_ (error "Unexpected URL: " url))))) (match (crate-recursive-import "root") ;; rust-intermediate-2 has no dependency on the rust-leaf-alice package, so this is a valid ordering - (((define-public rust-leaf-alice-1.0.0 + (((define-public rust-leaf-alice-1.0 (package (name "rust-leaf-alice") (version (? string? ver)) @@ -378,7 +378,7 @@ (synopsis "summary") (description "summary") (license (list license:expat license:asl2.0)))) - (define-public rust-leaf-bob-1.0.0 + (define-public rust-leaf-bob-1.0 (package (name "rust-leaf-bob") (version (? string? ver)) @@ -397,7 +397,7 @@ (synopsis "summary") (description "summary") (license (list license:expat license:asl2.0)))) - (define-public rust-intermediate-2-1.0.0 + (define-public rust-intermediate-2-1.0 (package (name "rust-intermediate-2") (version (? string? ver)) @@ -414,13 +414,13 @@ (arguments ('quasiquote (#:skip-build? #t #:cargo-inputs - (("rust-leaf-bob-1.0.0" + (("rust-leaf-bob" ('unquote rust-leaf-bob-1.0.0)))))) (home-page "http://example.com") (synopsis "summary") (description "summary") (license (list license:expat license:asl2.0)))) - (define-public rust-intermediate-1-1.0.0 + (define-public rust-intermediate-1-1.0 (package (name "rust-intermediate-1") (version (? string? ver)) @@ -437,17 +437,17 @@ (arguments ('quasiquote (#:skip-build? #t #:cargo-inputs - (("rust-intermediate-2-1.0.0" - ,rust-intermediate-2-1.0.0) - ("rust-leaf-alice-1.0.0" - ('unquote rust-leaf-alice-1.0.0)) - ("rust-leaf-bob-1.0.0" - ('unquote rust-leaf-bob-1.0.0)))))) + (("rust-intermediate-2" + ,rust-intermediate-2-1.0) + ("rust-leaf-alice" + ('unquote rust-leaf-alice-1.0)) + ("rust-leaf-bob" + ('unquote rust-leaf-bob-1.0)))))) (home-page "http://example.com") (synopsis "summary") (description "summary") (license (list license:expat license:asl2.0)))) - (define-public rust-root-1.0.0 + (define-public rust-root-1.0 (package (name "rust-root") (version (? string? ver)) @@ -464,14 +464,14 @@ (arguments ('quasiquote (#:skip-build? #t #:cargo-inputs - (("rust-intermediate-1-1.0.0" - ('unquote rust-intermediate-1-1.0.0)) - ("rust-intermediate-2-1.0.0" - ('unquote rust-intermediate-2-1.0.0)) - ("rust-leaf-alice-1.0.0" - ('unquote rust-leaf-alice-1.0.0)) - ("rust-leaf-bob-1.0.0" - ('unquote rust-leaf-bob-1.0.0)))))) + (("rust-intermediate-1" + ('unquote rust-intermediate-1-1.0)) + ("rust-intermediate-2" + ('unquote rust-intermediate-2-1.0)) + ("rust-leaf-alice" + ('unquote rust-leaf-alice-1.0)) + ("rust-leaf-bob" + ('unquote rust-leaf-bob-1.0)))))) (home-page "http://example.com") (synopsis "summary") (description "summary") -- 2.26.2 --------------A2073DE6963BEC7B0FFEBF39 Content-Type: text/x-patch; charset=UTF-8; name="v14-0003-import-crate-Memorize-crate-guix-package.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="v14-0003-import-crate-Memorize-crate-guix-package.patch" >From ce235399e2e1f47eb8e76387de2b88850304f284 Mon Sep 17 00:00:00 2001 From: Martin Becze Date: Thu, 30 Jan 2020 11:17:00 -0500 Subject: [PATCH v14 3/6] import: crate: Memorize crate->guix-package. This adds memorization to procedures that involve network lookups. 'lookup-crate*' is used on every dependency of a package to get its version list. It is also used to lookup a packages metadata. 'crate-recursive-import' is also memorized since creating the same package twice will trigger a lookup on in its dependencies. * guix/import/crate.scm (lookup-crate*): New procedure. (crate->guix-package): Memorize package metadata lookups. (crate-recursive-import): Memorize package creation. --- guix/import/crate.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/guix/import/crate.scm b/guix/import/crate.scm index 6054246fa3..ffb74bd8cc 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -28,6 +28,7 @@ #:use-module (guix import json) #:use-module (guix import utils) #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix memoization) #:use-module (guix monads) #:use-module (guix packages) #:use-module (guix upstream) @@ -111,6 +112,8 @@ record or #f if it was not found." (json->crate `(,@alist ("actual_versions" . ,versions)))))))) +(define lookup-crate* (memoize lookup-crate)) + (define (crate-version-dependencies version) "Return the list of records of VERSION, a ." @@ -216,7 +219,7 @@ latest version of CRATE-NAME." (eq? (crate-dependency-kind dependency) 'normal))) (define crate - (lookup-crate crate-name)) + (lookup-crate* crate-name)) (define version-number (and crate @@ -240,7 +243,7 @@ latest version of CRATE-NAME." (define (sort-map-dependencies deps) (sort (map (lambda (dep) (let* ((name (crate-dependency-id dep)) - (crate (lookup-crate name)) + (crate (lookup-crate* name)) (req (crate-dependency-requirement dep)) (ver (find-version crate req))) (list name @@ -269,7 +272,7 @@ latest version of CRATE-NAME." (define* (crate-recursive-import crate-name #:key version) (recursive-import crate-name - #:repo->guix-package crate->guix-package + #:repo->guix-package (memoize crate->guix-package) #:version version #:guix-name crate-name->package-name)) -- 2.26.2 --------------A2073DE6963BEC7B0FFEBF39 Content-Type: text/x-patch; charset=UTF-8; name="v14-0002-import-crate-Use-guile-semver-to-resolve-module-.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename*0="v14-0002-import-crate-Use-guile-semver-to-resolve-module-.pa"; filename*1="tch" >From 8d59f45d5a819b4da31706180ca7c84b5ce0512d Mon Sep 17 00:00:00 2001 From: Martin Becze Date: Tue, 4 Feb 2020 03:50:48 -0500 Subject: [PATCH v14 2/6] import: crate: Use guile-semver to resolve module versions. * guix/import/crate.scm (make-crate-sexp): Added '#:skip-build?' to build system args. Pass a VERSION argument to 'cargo-inputs'. Move 'package-definition' from scripts/import/crate.scm to here. (crate->guix-package): Use guile-semver to resolve the correct module versions. (crate-name->package-name): Reuse the procedure 'guix-name' instead of duplicating its logic. (module) Added guile-semver as a soft dependency. * guix/import/utils.scm (package-names->package-inputs): Implemented handling of (name version) pairs. * guix/scripts/import/crate.scm (guix-import-crate): Move 'package-definition' from here to guix/import/crate.scm. * tests/crate.scm: (recursuve-import) Added version data to the test. --- guix/import/crate.scm | 97 ++++++---- guix/import/utils.scm | 21 ++- guix/scripts/import/crate.scm | 11 +- tests/crate.scm | 330 +++++++++++++++++++--------------- 4 files changed, 266 insertions(+), 193 deletions(-) diff --git a/guix/import/crate.scm b/guix/import/crate.scm index e3ec11d7f8..6054246fa3 100644 --- a/guix/import/crate.scm +++ b/guix/import/crate.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2016 David Craven ;;; Copyright © 2019, 2020 Ludovic Courtès -;;; Copyright © 2019 Martin Becze +;;; Copyright © 2019, 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -38,6 +38,7 @@ #:use-module (srfi srfi-1) #:use-module (srfi srfi-2) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-71) #:export (crate->guix-package guix-package->crate-name string->license @@ -86,10 +87,15 @@ crate-dependency? json->crate-dependency (id crate-dependency-id "crate_id") ;string - (kind crate-dependency-kind "kind" ;'normal | 'dev + (kind crate-dependency-kind "kind" ;'normal | 'dev | 'build string->symbol) (requirement crate-dependency-requirement "req")) ;string +(module-autoload! (current-module) + '(semver) '(string->semver)) +(module-autoload! (current-module) + '(semver ranges) '(string->semver-range semver-range-contains?)) + (define (lookup-crate name) "Look up NAME on https://crates.io and return the corresopnding record or #f if it was not found." @@ -143,16 +149,22 @@ record or #f if it was not found." `((arguments (,'quasiquote ,args)))))) (define* (make-crate-sexp #:key name version cargo-inputs cargo-development-inputs - home-page synopsis description license - #:allow-other-keys) + home-page synopsis description license) "Return the `package' s-expression for a rust package with the given NAME, VERSION, CARGO-INPUTS, CARGO-DEVELOPMENT-INPUTS, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE." + (define (format-inputs inputs) + (map + (match-lambda + ((name version) + (list (crate-name->package-name name) + (version-major+minor version)))) + inputs)) + (let* ((port (http-fetch (crate-uri name version))) (guix-name (crate-name->package-name name)) - (cargo-inputs (map crate-name->package-name cargo-inputs)) - (cargo-development-inputs (map crate-name->package-name - cargo-development-inputs)) + (cargo-inputs (format-inputs cargo-inputs)) + (cargo-development-inputs (format-inputs cargo-development-inputs)) (pkg `(package (name ,guix-name) (version ,version) @@ -164,9 +176,10 @@ and LICENSE." (base32 ,(bytevector->nix-base32-string (port-sha256 port)))))) (build-system cargo-build-system) - ,@(maybe-arguments (append (maybe-cargo-inputs cargo-inputs) + ,@(maybe-arguments (append '(#:skip-build? #t) + (maybe-cargo-inputs cargo-inputs) (maybe-cargo-development-inputs - cargo-development-inputs))) + cargo-development-inputs))) (home-page ,(match home-page (() "") (_ home-page))) @@ -177,7 +190,7 @@ and LICENSE." ((license) license) (_ `(list ,@license))))))) (close-port port) - pkg)) + (package->definition pkg #t))) (define (string->license string) (filter-map (lambda (license) @@ -188,14 +201,19 @@ and LICENSE." 'unknown-license!))) (string-split string (string->char-set " /")))) -(define* (crate->guix-package crate-name #:optional version) +(define* (crate->guix-package crate-name #:key version repo) "Fetch the metadata for CRATE-NAME from crates.io, and return the `package' s-expression corresponding to that package, or #f on failure. When VERSION is specified, attempt to fetch that version; otherwise fetch the latest version of CRATE-NAME." + (define (semver-range-contains-string? range version) + (semver-range-contains? (string->semver-range range) + (string->semver version))) + (define (normal-dependency? dependency) - (eq? (crate-dependency-kind dependency) 'normal)) + (or (eq? (crate-dependency-kind dependency) 'build) + (eq? (crate-dependency-kind dependency) 'normal))) (define crate (lookup-crate crate-name)) @@ -205,22 +223,37 @@ latest version of CRATE-NAME." (or version (crate-latest-version crate)))) + ;; finds the a version of a crate that fulfills the semver + (define (find-version crate range) + (find (lambda (version) + (semver-range-contains-string? + range + (crate-version-number version))) + (crate-versions crate))) + (define version* (and crate - (find (lambda (version) - (string=? (crate-version-number version) - version-number)) - (crate-versions crate)))) + (find-version crate version-number))) + + ;; sorts the dependencies and maps the dependencies to a list containing + ;; pairs of (name version) + (define (sort-map-dependencies deps) + (sort (map (lambda (dep) + (let* ((name (crate-dependency-id dep)) + (crate (lookup-crate name)) + (req (crate-dependency-requirement dep)) + (ver (find-version crate req))) + (list name + (crate-version-number ver)))) + deps) + (match-lambda* (((_ name) ...) + (apply string-ci (crate-version-license version*) string->license)) - (append cargo-inputs cargo-development-inputs))))) + cargo-inputs)))) -(define* (crate-recursive-import crate-name #:optional version) - (recursive-import crate-name #f - #:repo->guix-package - (lambda (name repo) - (let ((version (and (string=? name crate-name) - version))) - (crate->guix-package name version))) +(define* (crate-recursive-import crate-name #:key version) + (recursive-import crate-name + #:repo->guix-package crate->guix-package + #:version version #:guix-name crate-name->package-name)) (define (guix-package->crate-name package) @@ -255,7 +285,7 @@ latest version of CRATE-NAME." ((name _ ...) name)))) (define (crate-name->package-name name) - (string-append "rust-" (string-join (string-split name #\_) "-"))) + (guix-name "rust-" name)) ;;; @@ -290,4 +320,3 @@ latest version of CRATE-NAME." (description "Updater for crates.io packages") (pred crate-package?) (latest latest-release))) - diff --git a/guix/import/utils.scm b/guix/import/utils.scm index 3f559a9f31..a147d0d693 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -225,13 +225,20 @@ into a proper sentence and by using two spaces between sentences." cleaned 'pre ". " 'post))) (define* (package-names->package-inputs names #:optional (output #f)) - "Given a list of PACKAGE-NAMES, and an optional OUTPUT, tries to generate a -quoted list of inputs, as suitable to use in an 'inputs' field of a package -definition." - (map (lambda (input) - (cons* input (list 'unquote (string->symbol input)) - (or (and output (list output)) - '()))) + "Given a list of PACKAGE-NAMES or (PACKAGE-NAME VERSION) pairs, and an +optional OUTPUT, tries to generate a quoted list of inputs, as suitable to +use in an 'inputs' field of a package definition." + (define (make-input input version) + (cons* input (list 'unquote (string->symbol + (if version + (string-append input "-" version) + input))) + (or (and output (list output)) + '()))) + + (map (match-lambda + ((input version) (make-input input version)) + (input (make-input input #f))) names)) (define* (maybe-inputs package-names #:optional (output #f)) diff --git a/guix/scripts/import/crate.scm b/guix/scripts/import/crate.scm index d834518c18..552628cfc7 100644 --- a/guix/scripts/import/crate.scm +++ b/guix/scripts/import/crate.scm @@ -2,7 +2,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 David Thompson ;;; Copyright © 2016 David Craven -;;; Copyright © 2019 Martin Becze +;;; Copyright © 2019, 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -95,13 +95,8 @@ Import and convert the crate.io package for PACKAGE-NAME.\n")) (package-name->name+version spec)) (if (assoc-ref opts 'recursive) - (map (match-lambda - ((and ('package ('name name) . rest) pkg) - `(define-public ,(string->symbol name) - ,pkg)) - (_ #f)) - (crate-recursive-import name version)) - (let ((sexp (crate->guix-package name version))) + (crate-recursive-import name #:version version) + (let ((sexp (crate->guix-package name #:version version))) (unless sexp (leave (G_ "failed to download meta-data for package '~a'~%") (if version diff --git a/tests/crate.scm b/tests/crate.scm index 61a04f986b..beaa696be0 100644 --- a/tests/crate.scm +++ b/tests/crate.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2014 David Thompson ;;; Copyright © 2016 David Craven ;;; Copyright © 2019, 2020 Ludovic Courtès +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -36,8 +37,8 @@ \"description\": \"summary\", \"homepage\": \"http://example.com\", \"repository\": \"http://example.com\", - \"keywords\": [\"dummy\" \"test\"], - \"categories\": [\"test\"] + \"keywords\": [\"dummy\", \"test\"], + \"categories\": [\"test\"], \"actual_versions\": [ { \"id\": \"foo\", \"num\": \"1.0.0\", @@ -54,8 +55,9 @@ "{ \"dependencies\": [ { - \"crate_id\": \"bar\", - \"kind\": \"normal\" + \"crate_id\": \"leaf-alice\", + \"kind\": \"normal\", + \"req\": \"1.0.0\" } ] }") @@ -68,8 +70,8 @@ \"description\": \"summary\", \"homepage\": \"http://example.com\", \"repository\": \"http://example.com\", - \"keywords\": [\"dummy\" \"test\"], - \"categories\": [\"test\"] + \"keywords\": [\"dummy\", \"test\"], + \"categories\": [\"test\"], \"actual_versions\": [ { \"id\": \"foo\", \"num\": \"1.0.0\", @@ -87,19 +89,23 @@ \"dependencies\": [ { \"crate_id\": \"intermediate-1\", - \"kind\": \"normal\" + \"kind\": \"normal\", + \"req\": \"1.0.0\" }, { \"crate_id\": \"intermediate-2\", - \"kind\": \"normal\" + \"kind\": \"normal\", + \"req\": \"1.0.0\" } { \"crate_id\": \"leaf-alice\", - \"kind\": \"normal\" + \"kind\": \"normal\", + \"req\": \"1.0.0\" }, { \"crate_id\": \"leaf-bob\", - \"kind\": \"normal\" + \"kind\": \"normal\", + \"req\": \"1.0.0\" } ] }") @@ -112,8 +118,8 @@ \"description\": \"summary\", \"homepage\": \"http://example.com\", \"repository\": \"http://example.com\", - \"keywords\": [\"dummy\" \"test\"], - \"categories\": [\"test\"] + \"keywords\": [\"dummy\", \"test\"], + \"categories\": [\"test\"], \"actual_versions\": [ { \"id\": \"intermediate-1\", \"num\": \"1.0.0\", @@ -131,15 +137,18 @@ \"dependencies\": [ { \"crate_id\": \"intermediate-2\", - \"kind\": \"normal\" + \"kind\": \"normal\", + \"req\": \"1.0.0\" }, { \"crate_id\": \"leaf-alice\", - \"kind\": \"normal\" + \"kind\": \"normal\", + \"req\": \"1.0.0\" }, { \"crate_id\": \"leaf-bob\", - \"kind\": \"normal\" + \"kind\": \"normal\", + \"req\": \"1.0.0\" } ] }") @@ -152,8 +161,8 @@ \"description\": \"summary\", \"homepage\": \"http://example.com\", \"repository\": \"http://example.com\", - \"keywords\": [\"dummy\" \"test\"], - \"categories\": [\"test\"] + \"keywords\": [\"dummy\", \"test\"], + \"categories\": [\"test\"], \"actual_versions\": [ { \"id\": \"intermediate-2\", \"num\": \"1.0.0\", @@ -171,7 +180,8 @@ \"dependencies\": [ { \"crate_id\": \"leaf-bob\", - \"kind\": \"normal\" + \"kind\": \"normal\", + \"req\": \"1.0.0\" } ] }") @@ -184,8 +194,8 @@ \"description\": \"summary\", \"homepage\": \"http://example.com\", \"repository\": \"http://example.com\", - \"keywords\": [\"dummy\" \"test\"], - \"categories\": [\"test\"] + \"keywords\": [\"dummy\", \"test\"], + \"categories\": [\"test\"], \"actual_versions\": [ { \"id\": \"leaf-alice\", \"num\": \"1.0.0\", @@ -211,7 +221,7 @@ \"description\": \"summary\", \"homepage\": \"http://example.com\", \"repository\": \"http://example.com\", - \"keywords\": [\"dummy\" \"test\"], + \"keywords\": [\"dummy\", \"test\"], \"categories\": [\"test\"] \"actual_versions\": [ { \"id\": \"leaf-bob\", @@ -253,34 +263,48 @@ (open-input-string test-foo-crate)) ("https://crates.io/api/v1/crates/foo/1.0.0/download" (set! test-source-hash - (bytevector->nix-base32-string - (sha256 (string->bytevector "empty file\n" "utf-8")))) + (bytevector->nix-base32-string + (sha256 (string->bytevector "empty file\n" "utf-8")))) (open-input-string "empty file\n")) ("https://crates.io/api/v1/crates/foo/1.0.0/dependencies" (open-input-string test-foo-dependencies)) + ("https://crates.io/api/v1/crates/leaf-alice" + (open-input-string test-leaf-alice-crate)) + ("https://crates.io/api/v1/crates/leaf-alice/1.0.0/download" + (set! test-source-hash + (bytevector->nix-base32-string + (sha256 (string->bytevector "empty file\n" "utf-8")))) + (open-input-string "empty file\n")) + ("https://crates.io/api/v1/crates/leaf-alice/1.0.0/dependencies" + (open-input-string test-leaf-alice-dependencies)) (_ (error "Unexpected URL: " url))))) - (match (crate->guix-package "foo") - (('package - ('name "rust-foo") - ('version "1.0.0") - ('source ('origin - ('method 'url-fetch) - ('uri ('crate-uri "foo" 'version)) - ('file-name ('string-append 'name "-" 'version ".tar.gz")) - ('sha256 - ('base32 - (? string? hash))))) - ('build-system 'cargo-build-system) - ('arguments - ('quasiquote - ('#:cargo-inputs (("rust-bar" ('unquote rust-bar)))))) - ('home-page "http://example.com") - ('synopsis "summary") - ('description "summary") - ('license ('list 'license:expat 'license:asl2.0))) - (string=? test-source-hash hash)) - (x - (pk 'fail x #f))))) + + (match (crate->guix-package "foo") + ((define-public rust-foo-1.0.0 + (package (name "rust-foo") + (version "1.0.0") + (source + (origin + (method url-fetch) + (uri (crate-uri "foo" 'version)) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + (? string? hash))))) + (build-system 'cargo-build-system) + (arguments + ('quasiquote + (#:skip-build? #t + #:cargo-inputs + (("rust-leaf-alice-1.0.0" ('unquote rust-leaf-alice-1.0.0)))))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0)))) + + (string=? test-source-hash hash)) + (x + (pk 'fail x #f))))) (test-assert "cargo-recursive-import" ;; Replace network resources with sample data. @@ -335,105 +359,123 @@ (_ (error "Unexpected URL: " url))))) (match (crate-recursive-import "root") ;; rust-intermediate-2 has no dependency on the rust-leaf-alice package, so this is a valid ordering - ((('package - ('name "rust-leaf-alice") - ('version (? string? ver)) - ('source - ('origin - ('method 'url-fetch) - ('uri ('crate-uri "leaf-alice" 'version)) - ('file-name - ('string-append 'name "-" 'version ".tar.gz")) - ('sha256 - ('base32 - (? string? hash))))) - ('build-system 'cargo-build-system) - ('home-page "http://example.com") - ('synopsis "summary") - ('description "summary") - ('license ('list 'license:expat 'license:asl2.0))) - ('package - ('name "rust-leaf-bob") - ('version (? string? ver)) - ('source - ('origin - ('method 'url-fetch) - ('uri ('crate-uri "leaf-bob" 'version)) - ('file-name - ('string-append 'name "-" 'version ".tar.gz")) - ('sha256 - ('base32 - (? string? hash))))) - ('build-system 'cargo-build-system) - ('home-page "http://example.com") - ('synopsis "summary") - ('description "summary") - ('license ('list 'license:expat 'license:asl2.0))) - ('package - ('name "rust-intermediate-2") - ('version (? string? ver)) - ('source - ('origin - ('method 'url-fetch) - ('uri ('crate-uri "intermediate-2" 'version)) - ('file-name - ('string-append 'name "-" 'version ".tar.gz")) - ('sha256 - ('base32 - (? string? hash))))) - ('build-system 'cargo-build-system) - ('arguments - ('quasiquote - ('#:cargo-inputs (("rust-leaf-bob" ('unquote rust-leaf-bob)))))) - ('home-page "http://example.com") - ('synopsis "summary") - ('description "summary") - ('license ('list 'license:expat 'license:asl2.0))) - ('package - ('name "rust-intermediate-1") - ('version (? string? ver)) - ('source - ('origin - ('method 'url-fetch) - ('uri ('crate-uri "intermediate-1" 'version)) - ('file-name - ('string-append 'name "-" 'version ".tar.gz")) - ('sha256 - ('base32 - (? string? hash))))) - ('build-system 'cargo-build-system) - ('arguments - ('quasiquote - ('#:cargo-inputs (("rust-intermediate-2" ('unquote rust-intermediate-2)) - ("rust-leaf-alice" ('unquote rust-leaf-alice)) - ("rust-leaf-bob" ('unquote rust-leaf-bob)))))) - ('home-page "http://example.com") - ('synopsis "summary") - ('description "summary") - ('license ('list 'license:expat 'license:asl2.0))) - ('package - ('name "rust-root") - ('version (? string? ver)) - ('source - ('origin - ('method 'url-fetch) - ('uri ('crate-uri "root" 'version)) - ('file-name - ('string-append 'name "-" 'version ".tar.gz")) - ('sha256 - ('base32 - (? string? hash))))) - ('build-system 'cargo-build-system) - ('arguments - ('quasiquote - ('#:cargo-inputs (("rust-intermediate-1" ('unquote rust-intermediate-1)) - ("rust-intermediate-2" ('unquote rust-intermediate-2)) - ("rust-leaf-alice" ('unquote rust-leaf-alice)) - ("rust-leaf-bob" ('unquote rust-leaf-bob)))))) - ('home-page "http://example.com") - ('synopsis "summary") - ('description "summary") - ('license ('list 'license:expat 'license:asl2.0)))) + (((define-public rust-leaf-alice-1.0.0 + (package + (name "rust-leaf-alice") + (version (? string? ver)) + (source + (origin + (method url-fetch) + (uri (crate-uri "leaf-alice" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + (? string? hash))))) + (build-system cargo-build-system) + (arguments ('quasiquote (#:skip-build? #t))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0)))) + (define-public rust-leaf-bob-1.0.0 + (package + (name "rust-leaf-bob") + (version (? string? ver)) + (source + (origin + (method url-fetch) + (uri (crate-uri "leaf-bob" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + (? string? hash))))) + (build-system cargo-build-system) + (arguments ('quasiquote (#:skip-build? #t))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0)))) + (define-public rust-intermediate-2-1.0.0 + (package + (name "rust-intermediate-2") + (version (? string? ver)) + (source + (origin + (method url-fetch) + (uri (crate-uri "intermediate-2" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + (? string? hash))))) + (build-system cargo-build-system) + (arguments + ('quasiquote (#:skip-build? #t + #:cargo-inputs + (("rust-leaf-bob-1.0.0" + ('unquote rust-leaf-bob-1.0.0)))))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0)))) + (define-public rust-intermediate-1-1.0.0 + (package + (name "rust-intermediate-1") + (version (? string? ver)) + (source + (origin + (method url-fetch) + (uri (crate-uri "intermediate-1" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + (? string? hash))))) + (build-system cargo-build-system) + (arguments + ('quasiquote (#:skip-build? #t + #:cargo-inputs + (("rust-intermediate-2-1.0.0" + ,rust-intermediate-2-1.0.0) + ("rust-leaf-alice-1.0.0" + ('unquote rust-leaf-alice-1.0.0)) + ("rust-leaf-bob-1.0.0" + ('unquote rust-leaf-bob-1.0.0)))))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0)))) + (define-public rust-root-1.0.0 + (package + (name "rust-root") + (version (? string? ver)) + (source + (origin + (method url-fetch) + (uri (crate-uri "root" version)) + (file-name + (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + (? string? hash))))) + (build-system cargo-build-system) + (arguments + ('quasiquote (#:skip-build? + #t #:cargo-inputs + (("rust-intermediate-1-1.0.0" + ('unquote rust-intermediate-1-1.0.0)) + ("rust-intermediate-2-1.0.0" + ('unquote rust-intermediate-2-1.0.0)) + ("rust-leaf-alice-1.0.0" + ('unquote rust-leaf-alice-1.0.0)) + ("rust-leaf-bob-1.0.0" + ('unquote rust-leaf-bob-1.0.0)))))) + (home-page "http://example.com") + (synopsis "summary") + (description "summary") + (license (list license:expat license:asl2.0))))) #t) (x (pk 'fail x #f))))) -- 2.26.2 --------------A2073DE6963BEC7B0FFEBF39 Content-Type: text/x-patch; charset=UTF-8; name="v14-0001-import-utils-recursive-import-accepts-an-optiona.patch" Content-Transfer-Encoding: 8bit Content-Disposition: attachment; filename*0="v14-0001-import-utils-recursive-import-accepts-an-optiona.pa"; filename*1="tch" >From d0caf07961ae15799475d176705bd4adc81ab306 Mon Sep 17 00:00:00 2001 From: Martin Becze Date: Tue, 4 Feb 2020 07:18:18 -0500 Subject: [PATCH v14 1/6] import: utils: 'recursive-import' accepts an optional version parameter. This adds a key VERSION to 'recursive-import' and move the paramter REPO to a key. This also changes all the things that rely on 'recursive-import' * guix/import/utils.scm (recursive-import): Add the VERSION key. Make REPO a key. (package->definition): Added optional 'append-version?'. * guix/import/cran.scm (cran->guix-package): Change the REPO parameter to a key. (cran-recursive-import): Likewise. * guix/import/elpa.scm (elpa->guix-pakcage): Likewise. (elpa-recursive-import): Likewise. * guix/import/gem.scm (gem->guix-package): Likewise. (recursive-import): Likewise. * guix/import/opam.scm (opam-recurive-import): Likewise. * guix/import/pypi.scm (pypi-recursive-import): Likewise. * guix/import/stackage.scm (stackage-recursive-import): Likewise. * guix/scripts/import/cran.scm: (guix-import-cran) Likewise. * guix/scripts/import/elpa.scm: (guix-import-elpa) Likewise. * tests/elpa.scm: (eval-test-with-elpa) Likewise. * tests/import-utils.scm Likewise. --- guix/import/cran.scm | 8 +++-- guix/import/elpa.scm | 6 ++-- guix/import/gem.scm | 6 ++-- guix/import/opam.scm | 8 ++--- guix/import/pypi.scm | 8 ++--- guix/import/stackage.scm | 5 +-- guix/import/utils.scm | 59 ++++++++++++++++++++++-------------- guix/scripts/import/cran.scm | 5 +-- guix/scripts/import/elpa.scm | 4 ++- tests/elpa.scm | 3 +- tests/import-utils.scm | 8 +++-- 11 files changed, 74 insertions(+), 46 deletions(-) diff --git a/guix/import/cran.scm b/guix/import/cran.scm index 53b930acd0..0c2a388c68 100644 --- a/guix/import/cran.scm +++ b/guix/import/cran.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2015, 2016, 2017, 2018, 2019, 2020 Ricardo Wurmus ;;; Copyright © 2015, 2016, 2017, 2019, 2020 Ludovic Courtès ;;; Copyright © 2017 Mathieu Othacehe +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -567,7 +568,7 @@ from the alist META, which was derived from the R package's DESCRIPTION file." (define cran->guix-package (memoize - (lambda* (package-name #:optional (repo 'cran)) + (lambda* (package-name #:key (repo 'cran) version) "Fetch the metadata for PACKAGE-NAME from REPO and return the `package' s-expression corresponding to that package, or #f on failure." (let ((description (fetch-description repo package-name))) @@ -585,8 +586,9 @@ s-expression corresponding to that package, or #f on failure." (cran->guix-package package-name 'cran)) (else (values #f '())))))))) -(define* (cran-recursive-import package-name #:optional (repo 'cran)) - (recursive-import package-name repo +(define* (cran-recursive-import package-name #:key (repo 'cran)) + (recursive-import package-name + #:repo repo #:repo->guix-package cran->guix-package #:guix-name cran-guix-name)) diff --git a/guix/import/elpa.scm b/guix/import/elpa.scm index 2d4487dba0..0e32a6508d 100644 --- a/guix/import/elpa.scm +++ b/guix/import/elpa.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2015, 2016, 2017, 2018, 2020 Ludovic Courtès ;;; Copyright © 2018 Oleg Pykhalov +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -245,7 +246,7 @@ type ''." (license ,license)) dependencies-names))) -(define* (elpa->guix-package name #:optional (repo 'gnu)) +(define* (elpa->guix-package name #:key (repo 'gnu) version) "Fetch the package NAME from REPO and produce a Guix package S-expression." (match (fetch-elpa-package name repo) (#f #f) @@ -301,7 +302,8 @@ type ''." (define elpa-guix-name (cut guix-name "emacs-" <>)) (define* (elpa-recursive-import package-name #:optional (repo 'gnu)) - (recursive-import package-name repo + (recursive-import package-name + #:repo repo #:repo->guix-package elpa->guix-package #:guix-name elpa-guix-name)) diff --git a/guix/import/gem.scm b/guix/import/gem.scm index bd5d5b3569..345d6f003c 100644 --- a/guix/import/gem.scm +++ b/guix/import/gem.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2016 Ben Woodcroft ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2020 Ludovic Courtès +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -122,7 +123,7 @@ VERSION, HASH, HOME-PAGE, DESCRIPTION, DEPENDENCIES, and LICENSES." ((license) (license->symbol license)) (_ `(list ,@(map license->symbol licenses))))))) -(define* (gem->guix-package package-name #:optional (repo 'rubygems) version) +(define* (gem->guix-package package-name #:key (repo 'rubygems) version) "Fetch the metadata for PACKAGE-NAME from rubygems.org, and return the `package' s-expression corresponding to that package, or #f on failure." (let ((gem (rubygems-fetch package-name))) @@ -200,6 +201,7 @@ package on RubyGems." (latest latest-release))) (define* (gem-recursive-import package-name #:optional version) - (recursive-import package-name '() + (recursive-import package-name + #:repo '() #:repo->guix-package gem->guix-package #:guix-name ruby-package-name)) diff --git a/guix/import/opam.scm b/guix/import/opam.scm index ae7df8a8b5..81f178e6a9 100644 --- a/guix/import/opam.scm +++ b/guix/import/opam.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2018 Julien Lepiller +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -250,7 +251,7 @@ path to the repository." (substring version 1) version))))) -(define* (opam->guix-package name #:key (repository (get-opam-repository))) +(define* (opam->guix-package name #:key (repository (get-opam-repository)) version) "Import OPAM package NAME from REPOSITORY (a directory name) or, if REPOSITORY is #f, from the official OPAM repository. Return a 'package' sexp or #f on failure." @@ -311,9 +312,8 @@ or #f on failure." dependencies)))))))) (define (opam-recursive-import package-name) - (recursive-import package-name #f - #:repo->guix-package (lambda (name repo) - (opam->guix-package name)) + (recursive-import package-name + #:repo->guix-package opam->guix-package #:guix-name ocaml-name->guix-name)) (define (guix-name->opam-name name) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index f93fa8831f..3ec984b1f4 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2019 Maxim Cournoyer ;;; Copyright © 2020 Jakub Kądziołka ;;; Copyright © 2020 Lars-Dominik Braun +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -468,7 +469,7 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE." (define pypi->guix-package (memoize - (lambda* (package-name) + (lambda* (package-name #:key repo version) "Fetch the metadata for PACKAGE-NAME from pypi.org, and return the `package' s-expression corresponding to that package, or #f on failure." (let* ((project (pypi-fetch package-name)) @@ -492,9 +493,8 @@ VERSION, SOURCE-URL, HOME-PAGE, SYNOPSIS, DESCRIPTION, and LICENSE." (project-info-license info))))))))) (define (pypi-recursive-import package-name) - (recursive-import package-name #f - #:repo->guix-package (lambda (name repo) - (pypi->guix-package name)) + (recursive-import package-name + #:repo->guix-package pypi->guix-package #:guix-name python->package-name)) (define (string->license str) diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm index 14150201b5..767fc491bf 100644 --- a/guix/import/stackage.scm +++ b/guix/import/stackage.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Federico Beffa ;;; Copyright © 2018 Ricardo Wurmus +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -108,8 +109,8 @@ included in the Stackage LTS release." (leave-with-message "~a: Stackage package not found" package-name)))))) (define (stackage-recursive-import package-name . args) - (recursive-import package-name #f - #:repo->guix-package (lambda (name repo) + (recursive-import package-name + #:repo->guix-package (lambda* (name #:key repo version) (apply stackage->guix-package (cons name args))) #:guix-name hackage-name->package-name)) diff --git a/guix/import/utils.scm b/guix/import/utils.scm index 3809c3d074..3f559a9f31 100644 --- a/guix/import/utils.scm +++ b/guix/import/utils.scm @@ -5,6 +5,7 @@ ;;; Copyright © 2017, 2019, 2020 Ricardo Wurmus ;;; Copyright © 2018 Oleg Pykhalov ;;; Copyright © 2019 Robert Vollmert +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,6 +45,7 @@ #:use-module (srfi srfi-9) #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) + #:use-module (srfi srfi-71) #:export (factorize-uri flatten @@ -250,13 +252,15 @@ package definition." ((package-inputs ...) `((native-inputs (,'quasiquote ,package-inputs)))))) -(define (package->definition guix-package) +(define* (package->definition guix-package #:optional append-version?) (match guix-package - (('package ('name (? string? name)) _ ...) - `(define-public ,(string->symbol name) - ,guix-package)) - (('let anything ('package ('name (? string? name)) _ ...)) - `(define-public ,(string->symbol name) + ((or + ('package ('name name) ('version version) . rest) + ('let _ ('package ('name name) ('version version) . rest))) + + `(define-public ,(string->symbol (if append-version? + (string-append name "-" version) + version)) ,guix-package)))) (define (build-system-modules) @@ -405,32 +409,43 @@ obtain a node's uniquely identifying \"key\"." (cons head result) (set-insert (node-name head) visited)))))))) -(define* (recursive-import package-name repo - #:key repo->guix-package guix-name +(define* (recursive-import package-name + #:key repo->guix-package guix-name version repo #:allow-other-keys) "Return a list of package expressions for PACKAGE-NAME and all its dependencies, sorted in topological order. For each package, -call (REPO->GUIX-PACKAGE NAME REPO), which should return a package expression -and a list of dependencies; call (GUIX-NAME NAME) to obtain the Guix package -name corresponding to the upstream name." +call (REPO->GUIX-PACKAGE NAME :KEYS version repo), which should return a +package expression and a list of dependencies; call (GUIX-NAME NAME) to +obtain the Guix package name corresponding to the upstream name." (define-record-type - (make-node name package dependencies) + (make-node name version package dependencies) node? (name node-name) + (version node-version) (package node-package) (dependencies node-dependencies)) - (define (exists? name) - (not (null? (find-packages-by-name (guix-name name))))) + (define (exists? name version) + (not (null? (find-packages-by-name (guix-name name) version)))) - (define (lookup-node name) - (receive (package dependencies) (repo->guix-package name repo) - (make-node name package dependencies))) + (define (lookup-node name version) + (let* ((package dependencies (repo->guix-package name + #:version version + #:repo repo)) + (normilizied-deps (map (match-lambda + ((name version) (list name version)) + (name (list name #f))) dependencies))) + (make-node name version package normilizied-deps))) (map node-package - (topological-sort (list (lookup-node package-name)) + (topological-sort (list (lookup-node package-name version)) + (lambda (node) + (map (lambda (name-version) + (apply lookup-node name-version)) + (remove (lambda (name-version) + (apply exists? name-version)) + (node-dependencies node)))) (lambda (node) - (map lookup-node - (remove exists? - (node-dependencies node)))) - node-name))) + (string-append + (node-name node) + (or (node-version node) "")))))) diff --git a/guix/scripts/import/cran.scm b/guix/scripts/import/cran.scm index d6f371ef3a..bc266ad9da 100644 --- a/guix/scripts/import/cran.scm +++ b/guix/scripts/import/cran.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 Eric Bavier ;;; Copyright © 2015, 2017, 2019 Ricardo Wurmus +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -98,10 +99,10 @@ Import and convert the CRAN package for PACKAGE-NAME.\n")) ;; Recursive import (map package->definition (cran-recursive-import package-name - (or (assoc-ref opts 'repo) 'cran))) + #:repo (or (assoc-ref opts 'repo) 'cran))) ;; Single import (let ((sexp (cran->guix-package package-name - (or (assoc-ref opts 'repo) 'cran)))) + #:repo (or (assoc-ref opts 'repo) 'cran)))) (unless sexp (leave (G_ "failed to download description for package '~a'~%") package-name)) diff --git a/guix/scripts/import/elpa.scm b/guix/scripts/import/elpa.scm index d270d2b4bc..07ac07a3d5 100644 --- a/guix/scripts/import/elpa.scm +++ b/guix/scripts/import/elpa.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2018 Oleg Pykhalov +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -102,7 +103,8 @@ Import the latest package named PACKAGE-NAME from an ELPA repository.\n")) (_ #f)) (elpa-recursive-import package-name (or (assoc-ref opts 'repo) 'gnu))) - (let ((sexp (elpa->guix-package package-name (assoc-ref opts 'repo)))) + (let ((sexp (elpa->guix-package package-name + #:repo (assoc-ref opts 'repo)))) (unless sexp (leave (G_ "failed to download package '~a'~%") package-name)) sexp))) diff --git a/tests/elpa.scm b/tests/elpa.scm index b70539bda6..a008cf993c 100644 --- a/tests/elpa.scm +++ b/tests/elpa.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Federico Beffa ;;; Copyright © 2020 Ludovic Courtès +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -51,7 +52,7 @@ (200 "This is the description.") (200 "fake tarball contents")) (parameterize ((current-http-proxy (%local-url))) - (match (elpa->guix-package pkg 'gnu/http) + (match (elpa->guix-package pkg #:repo 'gnu/http) (('package ('name "emacs-auctex") ('version "11.88.6") diff --git a/tests/import-utils.scm b/tests/import-utils.scm index 87dda3238f..2357ea5c40 100644 --- a/tests/import-utils.scm +++ b/tests/import-utils.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015, 2017 Ricardo Wurmus ;;; Copyright © 2016 Ben Woodcroft +;;; Copyright © 2020 Martin Becze ;;; ;;; This file is part of GNU Guix. ;;; @@ -48,15 +49,16 @@ (package (name "foo") (inputs `(("bar" ,bar))))) - (recursive-import "foo" 'repo + (recursive-import "foo" + #:repo 'repo #:repo->guix-package (match-lambda* - (("foo" 'repo) + (("foo" #:version #f #:repo 'repo) (values '(package (name "foo") (inputs `(("bar" ,bar)))) '("bar"))) - (("bar" 'repo) + (("bar" #:version #f #:repo 'repo) (values '(package (name "bar")) '()))) -- 2.26.2 --------------A2073DE6963BEC7B0FFEBF39--