From patchwork Mon Sep 18 18:03:26 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Tournier X-Patchwork-Id: 54037 Return-Path: X-Original-To: patchwork@mira.cbaines.net Delivered-To: patchwork@mira.cbaines.net Received: by mira.cbaines.net (Postfix, from userid 113) id 1F12F27BBEA; Mon, 18 Sep 2023 19:08:19 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-2.7 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_INVALID,DKIM_SIGNED,FREEMAIL_FROM,MAILING_LIST_MULTI, SPF_HELO_PASS autolearn=ham autolearn_force=no version=3.4.6 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTPS id 34DB927BBE9 for ; Mon, 18 Sep 2023 19:08:18 +0100 (BST) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1qiIdY-0005NX-61; Mon, 18 Sep 2023 14:06:20 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qiIdD-00052x-3L for guix-patches@gnu.org; Mon, 18 Sep 2023 14:06:01 -0400 Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiIdC-00042e-J8 for guix-patches@gnu.org; Mon, 18 Sep 2023 14:05:58 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1qiIdK-0002UM-S9 for guix-patches@gnu.org; Mon, 18 Sep 2023 14:06:06 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#66080] [PATCH v2 19/23] DRAFT import: juliahub: Fix license management. Resent-From: Simon Tournier Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 18 Sep 2023 18:06:06 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 66080 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 62202@debbugs.gnu.org Cc: 66080@debbugs.gnu.org, zimon.toutoune@gmail.com X-Debbugs-Original-Cc: Nicolas Graves via Guix-patches via , Simon Tournier Received: via spool by submit@debbugs.gnu.org id=B.16950603259358 (code B ref -1); Mon, 18 Sep 2023 18:06:06 +0000 Received: (at submit) by debbugs.gnu.org; 18 Sep 2023 18:05:25 +0000 Received: from localhost ([127.0.0.1]:54463 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiIce-0002Qm-JW for submit@debbugs.gnu.org; Mon, 18 Sep 2023 14:05:25 -0400 Received: from lists.gnu.org ([2001:470:142::17]:58354) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1qiIbg-0002KL-KQ for submit@debbugs.gnu.org; Mon, 18 Sep 2023 14:04:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1qiIbF-0002QN-RI for guix-patches@gnu.org; Mon, 18 Sep 2023 14:04:02 -0400 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1qiIbC-0003QS-DU for guix-patches@gnu.org; Mon, 18 Sep 2023 14:03:56 -0400 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-3159b524c56so939548f8f.1 for ; Mon, 18 Sep 2023 11:03:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1695060229; x=1695665029; darn=gnu.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=YFCmO8dV8DFWrz0oxqL6li2rEi3rlUfKiz+4CsCSISY=; b=YOMafxtFbPiJaTQ8M4Bpsbzio3ELgW3QA+9pUIG8SPcFEno0RAxiMW6rBkv1t89XB0 Jy0ZwHzPJCQqqOqctQ3S1VB1SuDMoBbFj6/UMVVZ6FflFCt/uDilXN4YEDEKSY9yhxKG rD50TqWEoAgQz+wJu91XRB6KGejZUExIFprLQzRCHKiy/MCWxBO1tXpUnVC39OwsU8tU 3/ztKf2iiRIjd+uEvkJScOPiG4TfQfShUE0tPC+Toz7iNex67H+koyRVuPogB5aX/DUC vCYiX09JmhQM27j42tQWV5eOWZiL70Zz8v8RzwnDKGHt7KsNx0WQSV/VzaMJbRg91Z3d XyPw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1695060229; x=1695665029; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=YFCmO8dV8DFWrz0oxqL6li2rEi3rlUfKiz+4CsCSISY=; b=MPINx1u1rozcVSm9FaLa63NvrMu5QCuCVnWTsjWD+6LpODpEJzhdA5w9ly+SKSn9kT LVXVE1924s8tEIT8d3426b4ybT/bT/2sCKB7dplBjCbGGJkZZVQChxaAwTEqP4wHsF26 dl5RQwF3sIkNv9uJ5fe5AGec8TSH1gUM02qKyvD8wesZ2FpZKkG1C69Ihtmtu+QuGXgr ymV5yprtSJaam+SU5ieS/LiFvnCzE/3EZiJ8/sjGDKeFsApLSAFF3WkrXfD44quQdJPj n194m6wdnuuVbAhlXCBaOFLFMyh38uBJz5ow80dJgzwX6TxnJG7zh6HKmwKxN1pHDXFM kaoA== X-Gm-Message-State: AOJu0YwHKY6NoeMF5+h+ZX7SDuPyYz5NidiFRQOS+siikSp8Q7zx8C0x YD2/7QwrqPvISwqu5euf3uNSVnywIF4= X-Google-Smtp-Source: AGHT+IGyQDYZ3LyqQwj0GzmXUwEWlYZdEhdNcs/M4KeZYC4ikYGJPYxR5NaSATkW3zJXvJxBjwhf+A== X-Received: by 2002:adf:f742:0:b0:31a:e29f:5eab with SMTP id z2-20020adff742000000b0031ae29f5eabmr7658707wrp.7.1695060229259; Mon, 18 Sep 2023 11:03:49 -0700 (PDT) Received: from localhost.localdomain ([193.48.40.241]) by smtp.gmail.com with ESMTPSA id z2-20020adfd0c2000000b0030ada01ca78sm2210465wrh.10.2023.09.18.11.03.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Sep 2023 11:03:49 -0700 (PDT) From: Simon Tournier Date: Mon, 18 Sep 2023 20:03:26 +0200 Message-Id: <80498439f6fb5e349b5e9fc643e6538a361983fd.1695060058.git.zimon.toutoune@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: References: MIME-Version: 1.0 Received-SPF: pass client-ip=2a00:1450:4864:20::429; envelope-from=zimon.toutoune@gmail.com; helo=mail-wr1-x429.google.com X-Spam_score_int: -20 X-Spam_score: -2.1 X-Spam_bar: -- X-Spam_report: (-2.1 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, FREEMAIL_FROM=0.001, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org Sender: guix-patches-bounces+patchwork=mira.cbaines.net@gnu.org X-getmail-retrieved-from-mailbox: Patches From: Nicolas Graves via Guix-patches via Signed-off-by: Simon Tournier --- guix/import/juliahub.scm | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/guix/import/juliahub.scm b/guix/import/juliahub.scm index 338f0424414c..e4b26bea340a 100644 --- a/guix/import/juliahub.scm +++ b/guix/import/juliahub.scm @@ -248,10 +248,10 @@ (define* (juliahub-fetch name #:key (version #f)) (and=> (json-fetch url) json->juliahub-package))) (define (make-julia-sexp name source home-page synopsis description - direct-dependencies test-dependencies-names licenses) + direct-dependencies test-dependencies-names license) "Return the `package' s-expression for a Julia package with the given NAME, VERSION, URI, HASH, HOME-PAGE, DESCRIPTION, DIRECT-DEPENDENCIES, -TEST-DEPENDENCIES-NAMES and LICENSES." +TEST-DEPENDENCIES-NAMES and LICENSE." `(package (name ,(julia-name->guix-name name)) (version ,version) @@ -270,10 +270,8 @@ (define (make-julia-sexp name source home-page synopsis description (synopsis ,synopsis) (description ,description) (home-page ,home-page) - (license ,(match licenses - (() #f) - ((license) (license->symbol license)) - (_ `(list ,@(map license->symbol licenses))))))) + (license + ,(if license (spdx-string->license license) #f)))) (define* (juliahub->guix-package package-name #:key version #:allow-other-keys) @@ -301,9 +299,6 @@ (define* (juliahub->guix-package package-name (dependencies-names (map juliahub-dependency-name direct-dependencies)) - (licenses - (map spdx-string->license - (list (juliahub-package-license package)))) (test-dependencies-names (if subdir (parse-test-dependencies @@ -319,7 +314,7 @@ (define* (juliahub->guix-package package-name (juliahub-package-readme package)) direct-dependencies test-dependencies-names - licenses) + (juliahub-package-license package)) (append dependencies-names test-dependencies-names)))) (values #f '()))))