From patchwork Thu Apr 28 13:28:00 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Attila Lendvai X-Patchwork-Id: 38980 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 3070527BBEA; Thu, 28 Apr 2022 14:31:22 +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_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,SPF_HELO_PASS autolearn=unavailable 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 E9AA927BBE9 for ; Thu, 28 Apr 2022 14:31:21 +0100 (BST) Received: from localhost ([::1]:34512 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1nk4Er-0000l8-3j for patchwork@mira.cbaines.net; Thu, 28 Apr 2022 09:31:21 -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 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" X-getmail-retrieved-from-mailbox: Patches 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")