From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp10.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms5.migadu.com with LMTPS id EJYHGymXamJxSgAAbAwnHQ (envelope-from ) for ; Thu, 28 Apr 2022 15:31:21 +0200 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp10.migadu.com with LMTPS id SNMkGimXamKfcAAAG6o9tA (envelope-from ) for ; Thu, 28 Apr 2022 15:31:21 +0200 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 1634AC73F for ; Thu, 28 Apr 2022 15:31:21 +0200 (CEST) Received: from localhost ([::1]:34512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nk4Eo-0000l8-AF for larch@yhetil.org; Thu, 28 Apr 2022 09:31:18 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:44936) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1nk4Ea-0000hw-BX for guix-patches@gnu.org; Thu, 28 Apr 2022 09:31:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:51903) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1nk4EX-0000NT-UF for guix-patches@gnu.org; Thu, 28 Apr 2022 09:31:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1nk4EX-0004sx-RY for guix-patches@gnu.org; Thu, 28 Apr 2022 09:31:01 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#49607] [PATCH v3 1/3] gnu: idris: Use wrap-program to define IDRIS_CC References: In-Reply-To: Resent-From: Attila Lendvai Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Thu, 28 Apr 2022 13:31:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 49607 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 49607@debbugs.gnu.org Cc: Attila Lendvai Received: via spool by 49607-submit@debbugs.gnu.org id=B49607.165115260618597 (code B ref 49607); Thu, 28 Apr 2022 13:31:01 +0000 Received: (at 49607) by debbugs.gnu.org; 28 Apr 2022 13:30:06 +0000 Received: from localhost ([127.0.0.1]:45791 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nk4Dd-0004pt-I9 for submit@debbugs.gnu.org; Thu, 28 Apr 2022 09:30:05 -0400 Received: from mail-ed1-f43.google.com ([209.85.208.43]:40931) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1nk4Da-0004p4-UL for 49607@debbugs.gnu.org; Thu, 28 Apr 2022 09:30:03 -0400 Received: by mail-ed1-f43.google.com with SMTP id p18so5533121edr.7 for <49607@debbugs.gnu.org>; Thu, 28 Apr 2022 06:30:02 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=sender:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=sHv4ZxAZOYzVJZucaEJkhZDG3DhDrFjXJgV7svKxmDA=; b=k7ERS1IkKoU8Uyj12fFWAWqPwYK7CSdpmqL44uQ7zt6E9CLmDDLhbnBeuZjeAl2QsB iarXVyUdmzX20cQt8zx+nO3u0/GB6Vabt2bi8pUeU5vjst8IW0OR2Bf7EVkutei3hSmV OXeclsM5w0BTnKNLnw3pSZAk8UbOfMZjUF8lThJrL8fvlEhUkxgVIaFRM0Y7OfoF8zD5 lK4wbvDAypAS/ZqbBA0qvjyv0l1HlGOmcXJ5WqeVB2A+he17bHjo1AjkRZGnq9dpA0Ii 1v2kyCeGj1Uz03H7Z0I1Ddo/1xOKXsxRjV5J1XQgzkHG3gyNgtWBc/6yC7usCnSzkGGY rqIQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:sender:from:to:cc:subject:date:message-id :mime-version:content-transfer-encoding; bh=sHv4ZxAZOYzVJZucaEJkhZDG3DhDrFjXJgV7svKxmDA=; b=B0DLgk91wOmEnp27YGaRrYbEDIk5BhzSP9jlI1DuyvRH+Ru4r2VcPKCIsnh3mouyqP fhFdxqHMV0x/c0QSn5y5xqZuIafW0bT60E2BF2h36S7MV8scImUrYbobviasOUxAyM3q bW08pEY8zjGcLxV4HXAQAMXfeMQPnrsBJp0furUTLoPBRZzPFjV2opamIqH1mYqVZUpr q7lSo+N2rqQs6JNXL+q2ZlKXhdTxwH6CbDbvs2xv/kABJiw4A1HhT5yoRw8xG3YM2TvE FeeLEZiYRQEABqTHctK0on2TGZgcYkmtACpBWRtyM4QPISIs6fUjAwNr4I26BgDAa//4 06vQ== X-Gm-Message-State: AOAM531cE/IivdMS9QR+U2g2ih2GUNyAaDC1fOpmqdtP8mpNTypn50uh q1h2ThfsNN2zQq+dYTL5vz+7ZS1MTcA= X-Google-Smtp-Source: ABdhPJzkYuWoHXyWCY3vh7rkb5ExsQwDhzYDyVnWKfRYTBu3zN77yuStXMWK5sx4C6TgKwsfoc7kSA== X-Received: by 2002:a05:6402:4404:b0:426:16f:c0f9 with SMTP id y4-20020a056402440400b00426016fc0f9mr11740426eda.31.1651152597016; Thu, 28 Apr 2022 06:29:57 -0700 (PDT) Received: from lelap.local (catv-89-132-245-188.catv.fixed.vodafone.hu. [89.132.245.188]) by smtp.gmail.com with ESMTPSA id d19-20020a170906c21300b006e7f0730353sm8365993ejz.101.2022.04.28.06.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Apr 2022 06:29:56 -0700 (PDT) From: Attila Lendvai Date: Thu, 28 Apr 2022 15:28:00 +0200 Message-Id: <20220428132801.8629-1-attila@lendvai.name> X-Mailer: git-send-email 2.35.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 X-Migadu-To: larch@yhetil.org X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1651152681; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=sHv4ZxAZOYzVJZucaEJkhZDG3DhDrFjXJgV7svKxmDA=; b=FK/UlEFF1lKln9CECh/cjcuTOFG0YvQ/1+xSnUCWrqy+fBOtd/WxHfBFKKMXkIGPie4e40 ugfkggCYIPsLV6h0kcEAjmbMoElsDiQ/+ns5LWFjGmcRqB0QPVX3gp5M6MajU6iulPtsWH BMzG66iAFnDrcMRSeLitMX6vWHLF238S3O947xNACibBjcmg4aE04wIfhWa9Y9RdixJbit lW6UamD4KDYxqemItxbQjUH6ZCcaWyxOLqzjuV0I0p2r89rsnt+38uBj7xPF6NuLan1nzJ iOymQK6A+vLdyg6PABQaBya4MBuH2L5bQHSjL4YDTR9Vitqzn74oUidUrK6BMQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1651152681; a=rsa-sha256; cv=none; b=rP8mrdmVpuSnq9UE/yB1DohSU//Emb7B/qNV5XOJP6KrFOOJAnmERFYohiZU3+o1eGzkCw xGhw/RDEAMlfLdTA9E+rJ8BcND8rd3SrxM3UpeC3qVsj8eXqaDmIsj7hP7ljtKxZx8CpLs B6Q6HQb/sDsL/KHm5uG3xl/yjbREWwzGpPYP19lBUVobmhiRDSO+YN6FF0JnHI/tN/KLFf YKMDNbAVUmTer85Ejle+g4bSU8JHQ6/uC4fJ4djsdlleZYnqRipmJKMI66NmnA6z1I01OL x9Df9KWBx+2k/srQnmnMJyyY09mlFc8qQrSp0NI3ypOebrfe+YwWO8O+2Sg7iQ== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=k7ERS1Ik; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: 1.50 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=gmail.com header.s=20210112 header.b=k7ERS1Ik; dmarc=none; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 1634AC73F X-Spam-Score: 1.50 X-Migadu-Scanner: scn0.migadu.com X-TUID: M1xQWG5UhrQs Idris requires a C compiler at runtime to generate executables. * gnu/packages/idris.scm (idris) [inputs]: Add bash-minimal (for wrap-program). [phases]: Add wrap-program phase to define IDRIS_CC, use (cc-for-target). --- v3: i have rebased them to master, i.e. on top of the idris-1.3.4 update. it also cleans it up a bit more (e.g. got rid of the clang-toolchain dependency). gnu/packages/idris.scm | 15 ++++++++++++--- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/gnu/packages/idris.scm b/gnu/packages/idris.scm index 8f08ed3a3e..61de4883b1 100644 --- a/gnu/packages/idris.scm +++ b/gnu/packages/idris.scm @@ -22,6 +22,7 @@ (define-module (gnu packages idris) #:use-module (gnu packages) + #:use-module (gnu packages bash) #:use-module (gnu packages haskell-check) #:use-module (gnu packages haskell-web) #:use-module (gnu packages haskell-xyz) @@ -35,7 +36,8 @@ (define-module (gnu packages idris) #:use-module (guix git-download) #:use-module (guix utils) #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix packages)) + #:use-module (guix packages) + #:use-module (guix utils)) (define-public idris (package @@ -56,7 +58,8 @@ (define-public idris (list perl ghc-cheapskate ghc-tasty ghc-tasty-golden ghc-tasty-rerun)) (inputs - (list gmp + (list bash-minimal + gmp ncurses ghc-aeson ghc-annotated-wl-pprint @@ -132,7 +135,13 @@ (define-public idris (static (assoc-ref outputs "static")) (filename "/lib/idris/rts/libidris_rts.a")) (rename-file (string-append static filename) - (string-append out filename)))))))) + (string-append out filename))))) + (add-before 'check 'wrap-program + (lambda* (#:key outputs inputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (exe (string-append out "/bin/idris"))) + (wrap-program exe + `("IDRIS_CC" = (,',(cc-for-target)))))))))) (native-search-paths (list (search-path-specification (variable "IDRIS_LIBRARY_PATH") -- 2.35.1