From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id SOWLMjm29GDleQAAgWs5BA (envelope-from ) for ; Mon, 19 Jul 2021 01:16:09 +0200 Received: from aspmx1.migadu.com ([2001:41d0:8:6d80::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id mEHQLTm29GAxQAAAbx9fmQ (envelope-from ) for ; Sun, 18 Jul 2021 23:16:09 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.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 875E72DFC7 for ; Mon, 19 Jul 2021 01:16:09 +0200 (CEST) Received: from localhost ([::1]:57426 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1m5G12-0007db-AW for larch@yhetil.org; Sun, 18 Jul 2021 19:16:08 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:47716) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5G0w-0007d8-4z for guix-patches@gnu.org; Sun, 18 Jul 2021 19:16:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:46066) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1m5G0v-0006DR-TA for guix-patches@gnu.org; Sun, 18 Jul 2021 19:16:01 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1m5G0v-0003eF-PJ for guix-patches@gnu.org; Sun, 18 Jul 2021 19:16:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49627] [PATCH] import/print: package->code: Fix license object. Resent-From: itd Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 18 Jul 2021 23:16:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 49627 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49627@debbugs.gnu.org X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.162665015614007 (code B ref -1); Sun, 18 Jul 2021 23:16:01 +0000 Received: (at submit) by debbugs.gnu.org; 18 Jul 2021 23:15:56 +0000 Received: from localhost ([127.0.0.1]:57612 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5G0p-0003dr-Uh for submit@debbugs.gnu.org; Sun, 18 Jul 2021 19:15:56 -0400 Received: from lists.gnu.org ([209.51.188.17]:39844) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1m5CyV-0003BL-KG for submit@debbugs.gnu.org; Sun, 18 Jul 2021 16:01:19 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:60058) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5CyV-0007tj-55 for guix-patches@gnu.org; Sun, 18 Jul 2021 16:01:19 -0400 Received: from mail-out2.in.tum.de ([131.159.0.36]:36795 helo=mail-out2.informatik.tu-muenchen.de) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1m5CyT-0004jp-1z for guix-patches@gnu.org; Sun, 18 Jul 2021 16:01:18 -0400 Received: from mailrelay1.rbg.tum.de (mailrelay1.in.tum.de [131.159.254.14]) by mail-out2.informatik.tu-muenchen.de (Postfix) with ESMTP id 81A022400BB for ; Sun, 18 Jul 2021 22:01:05 +0200 (CEST) Received: by mailrelay1.rbg.tum.de (Postfix, from userid 112) id 7F790105; Sun, 18 Jul 2021 22:01:05 +0200 (CEST) Received: from mailrelay1.rbg.tum.de (localhost [127.0.0.1]) by mailrelay1.rbg.tum.de (Postfix) with ESMTP id 94073104 for ; Sun, 18 Jul 2021 22:01:01 +0200 (CEST) Received: from mail.net.in.tum.de (mail.net.in.tum.de [IPv6:2001:4ca0:2001:14:216:3eff:fe52:ed14]) by mailrelay1.rbg.tum.de (Postfix) with ESMTP id 91908102 for ; Sun, 18 Jul 2021 22:01:01 +0200 (CEST) Received: from amnesix.net.in.tum.de (amnesix.net.in.tum.de [IPv6:2001:4ca0:2001:11:e2d5:5eff:fea9:55ca]) by mail.net.in.tum.de (Postfix) with ESMTP id 6618D28D080E; Sun, 18 Jul 2021 22:01:01 +0200 (CEST) From: itd Date: Sun, 18 Jul 2021 22:01:00 +0200 Message-ID: <87h7gr5r43.fsf@localhost> MIME-Version: 1.0 Content-Type: text/plain Received-SPF: none client-ip=131.159.0.36; envelope-from=itd@net.in.tum.de; helo=mail-out2.informatik.tu-muenchen.de X-Spam_score_int: -41 X-Spam_score: -4.2 X-Spam_bar: ---- X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_HELO_NONE=0.001, SPF_NONE=0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Mailman-Approved-At: Sun, 18 Jul 2021 19:15:54 -0400 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+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1626650169; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post; bh=6Z0/ouGz4SpM6bZiFIVCJXcM8EQlr751G1O0xLdGviA=; b=KD93kZ926v+4W9E41Um5zN7SXXcvcviV+uSOyydzguB+zX8BmOwY+uaLkTXySz0iyKftwI jttf88+CuVT+E9SR+KnJpUVUoJfYVf1TaZZldhfPLN6Sj5zYHjxQUqXIdu3litHa3+jgjC X+8aZWk6TtpTErRKshXYIgekYOUMf0OCr754HB5Z/POQDmh7W/5hVyPzKJv320XNKRqY3d xUGeEc41DzXzKoF+YrwlX8qrEcGQi87xYWyAl/xGpsrxILtYSuk0isL9d/dCUwOMRST+M5 ZPUpJIpkfafXzeB3z5EVtd7z2GKxniX2YUDMdrt1eOO224RphARvL12Vga34pQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1626650169; a=rsa-sha256; cv=none; b=hfWnBS3xA+IkmppHXQE73mTMEnbUWX2xdLUt3ap9MZxC3BJ21ZlnLFS+h2BefNRI3q8Fkk a0929VSL5naMaTamReMClAQopl8u4W51siTTwd9l6Iwpb1BEWkRGk/kcPj+x1ie+A2yHx0 QWVAG2O/5N1tAzk0+l6zcHEeBmj4LpL5c59TT0HoUb934JEOKIEBppTmOCyf1E39Kh4Qke DF4kCzOMwug7QFn6Ud+OSSgeC/Tz5p/SPVSHQv5fcazj3L15t2H3Q7WdQhUzRskhoNqs3/ Sv/U01uERgtHDmUKwH5x99tqsNBUrotilREKQ7x5YkMds2LWnKUiYfFDmYCUrA== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=tum.de (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -1.81 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=fail reason="SPF not aligned (relaxed), No valid DKIM" header.from=tum.de (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 875E72DFC7 X-Spam-Score: -1.81 X-Migadu-Scanner: scn0.migadu.com X-TUID: CPQN9FUSgCOU * guix/import/print.scm (package->code)code>: Update generated licence object to match record constructor. --- Hi, given the following example (please note the fake license): ```bash ( printf '%s\n'\ "(define-module (out) #:use-module (guix packages) #:use-module (guix download))"\ "(define license (@@ (guix licenses) license))" # see commit 1597613488 guix import json /dev/stdin < out.scm guix build -L . hello ``` This example fails to build for me with error: ```bash guix build: warning: failed to load '(out)': Wrong type to apply: "hello" ``` I suspect this to be caused by the generated license definition: ```guile (license (license (name "FSDG-compatible") (uri "a-license") (comment ""))))) ``` After patching, the package builds successfully with the following license definition: ```guile (license (license "FSDG-compatible" "a-license" "")))) ``` Regards itd guix/import/print.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/guix/import/print.scm b/guix/import/print.scm index dcc38abc70..0310739b3a 100644 --- a/guix/import/print.scm +++ b/guix/import/print.scm @@ -60,9 +60,9 @@ when evaluated." (if var (symbol-append 'license: var) `(license - (name ,(license-name lic)) - (uri ,(license-uri lic)) - (comment ,(license-comment lic)))))) + ,(license-name lic) + ,(license-uri lic) + ,(license-comment lic))))) (define (search-path-specification->code spec) `(search-path-specification -- 2.30.2