From patchwork Fri Dec 22 12:37:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Pierre De Jesus DIAZ X-Patchwork-Id: 57984 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 3C9AE27BBEA; Fri, 22 Dec 2023 12:38:36 +0000 (GMT) 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,URIBL_BLOCKED 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 8827B27BBE2 for ; Fri, 22 Dec 2023 12:38:35 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGems-0007IA-Ra; Fri, 22 Dec 2023 07:37:58 -0500 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 1rGemr-0007Go-I4 for guix-patches@gnu.org; Fri, 22 Dec 2023 07:37:57 -0500 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 1rGemr-0005Ul-9v for guix-patches@gnu.org; Fri, 22 Dec 2023 07:37:57 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rGemv-0001vI-QU for guix-patches@gnu.org; Fri, 22 Dec 2023 07:38:01 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67969] [PATCH 1/4] guix: scons-build: Cleanup keyword arguments. Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 22 Dec 2023 12:38:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67969 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67969@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ Received: via spool by 67969-submit@debbugs.gnu.org id=B67969.17032486617331 (code B ref 67969); Fri, 22 Dec 2023 12:38:01 +0000 Received: (at 67969) by debbugs.gnu.org; 22 Dec 2023 12:37:41 +0000 Received: from localhost ([127.0.0.1]:46198 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGema-0001u5-Hc for submit@debbugs.gnu.org; Fri, 22 Dec 2023 07:37:40 -0500 Received: from mail-wr1-x429.google.com ([2a00:1450:4864:20::429]:42293) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGemV-0001tl-2t for 67969@debbugs.gnu.org; Fri, 22 Dec 2023 07:37:38 -0500 Received: by mail-wr1-x429.google.com with SMTP id ffacd0b85a97d-33697caf9a6so242642f8f.1 for <67969@debbugs.gnu.org>; Fri, 22 Dec 2023 04:37:30 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1703248644; x=1703853444; darn=debbugs.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=V4yHF2KS6je10YflrsMZN+5NZE8rRZK6tORrzvwpz4E=; b=aoqVDv/X+PKeRhhC7jlbskG6rWoSc8iaiGGKBlyUx/d8fiAhdtTJgd4orNEh1ba5HQ UJ3eMFMAub19QPLuc2z3zGaAJpkznSd4y9gW8XaWzH3eCobQW0dmBFJRVKWLJrXgOXPv sFTZupRHA0pqm0bjK5Ck6wF1OpWaXPQHcMvQ67zdC/N2EWxKBD/V2i03621y1rueTNsU mzuiDQH7MNJ0FGB3xEXJ55dYB3qZhyL6cfEvEOZickmYceiYGYkij+UedoM7d58s4zO4 V3KbMNag9/WXckRMaQhb0ikVPwaMhIw0ny3aAEtditv4LwEcvS4+SsCQpi5yChNqs3l5 IgdQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703248644; x=1703853444; 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=V4yHF2KS6je10YflrsMZN+5NZE8rRZK6tORrzvwpz4E=; b=cFfSFaQbV5oeyTS5EzP+uWlho7soPkjugE910FZ54S0XaN4jked5ySDgd5oRd1ZpYz wIpXTaM19bMFzY/JHdj6FaDmR/0zn+TlrlIf2QL0dG7DX6D0x1kdzW1ee5zLy6ux7rk5 H9rP49C6BxtR/A51r1SYQuBfrC+j4sGlDr8xiOkISKec5pdJ7NAfKe+jflso3rxiZ2gu kreWwoIVcMshD8B9GvxF4IRx8PnXaRIDwdW2SBa2QNzEOsQQfAcITmpDzrvQ3T0ei6m5 0tugec/w7Hnufw3lUdnzOD7WBCneGBXlV471r15OkPd77oufpFXjtMxg7idbSitO1pbL ybwg== X-Gm-Message-State: AOJu0Yz6Sy+EuxrlzvRTf4uFQ69cZ/EmvKmwA+0q743C1c7oAagm34Oh MBF/rjjzVDgVDtOzeSj5TK4s1uTn8sLHB9+T90+/FBdrDR0+gQ== X-Google-Smtp-Source: AGHT+IG2t99U2iCumDrc1Zlo7mjjMx0TqsiQdu1+uD6dvERNx4wSzST6XMP7wpF93MswlPpf3iVTFw== X-Received: by 2002:a5d:5487:0:b0:336:7041:6653 with SMTP id h7-20020a5d5487000000b0033670416653mr703886wrv.70.1703248644279; Fri, 22 Dec 2023 04:37:24 -0800 (PST) Received: from jeandudey.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id s23-20020adf9797000000b00336813bb588sm4258959wrb.111.2023.12.22.04.37.23 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 04:37:24 -0800 (PST) Date: Fri, 22 Dec 2023 13:37:14 +0100 Message-ID: <3261543b70ba7bfd5311162c30f93685667bd2a3.1703248242.git.jean@foundationdevices.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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: , Reply-to: Jean-Pierre De Jesus DIAZ X-ACL-Warn: , Jean-Pierre De Jesus DIAZ via Guix-patches X-Patchwork-Original-From: Jean-Pierre De Jesus DIAZ via Guix-patches via From: Jean-Pierre De Jesus DIAZ 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 * guix/build-system/scons.scm (scons-build): Remove default value of #f from keyword arguments since they are #f if they are not present. Change-Id: I18cca8abb350c99c20e87d623cc9975570731dfc --- guix/build-system/scons.scm | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm index 046ddef740..6cbffcab63 100644 --- a/guix/build-system/scons.scm +++ b/guix/build-system/scons.scm @@ -75,7 +75,7 @@ (define* (lower name (define* (scons-build name inputs #:key - (source #f) + guile source (tests? #t) (scons-flags ''()) (build-targets #~'()) @@ -85,7 +85,6 @@ (define* (scons-build name inputs (outputs '("out")) (search-paths '()) (system (%current-system)) - (guile #f) (imported-modules %scons-build-system-modules) (modules '((guix build scons-build-system) (guix build utils)))) From patchwork Fri Dec 22 12:37:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean-Pierre De Jesus DIAZ X-Patchwork-Id: 57982 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 E510227BBEA; Fri, 22 Dec 2023 12:38:11 +0000 (GMT) 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,URIBL_BLOCKED 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 300EB27BBE2 for ; Fri, 22 Dec 2023 12:38:08 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGemt-0007Ip-JI; Fri, 22 Dec 2023 07:37:59 -0500 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 1rGems-0007Gw-1Y for guix-patches@gnu.org; Fri, 22 Dec 2023 07:37:58 -0500 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 1rGemr-0005Ur-Mc for guix-patches@gnu.org; Fri, 22 Dec 2023 07:37:57 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rGemw-0001vP-64 for guix-patches@gnu.org; Fri, 22 Dec 2023 07:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67969] [PATCH 2/4] guix: scons: Support cross-compilation. Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 22 Dec 2023 12:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67969 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67969@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ Received: via spool by 67969-submit@debbugs.gnu.org id=B67969.17032486637347 (code B ref 67969); Fri, 22 Dec 2023 12:38:02 +0000 Received: (at 67969) by debbugs.gnu.org; 22 Dec 2023 12:37:43 +0000 Received: from localhost ([127.0.0.1]:46201 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGemd-0001uP-0x for submit@debbugs.gnu.org; Fri, 22 Dec 2023 07:37:43 -0500 Received: from mail-wr1-x42d.google.com ([2a00:1450:4864:20::42d]:50513) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGemW-0001tp-VR for 67969@debbugs.gnu.org; Fri, 22 Dec 2023 07:37:40 -0500 Received: by mail-wr1-x42d.google.com with SMTP id ffacd0b85a97d-336990fb8fbso228867f8f.1 for <67969@debbugs.gnu.org>; Fri, 22 Dec 2023 04:37:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1703248646; x=1703853446; darn=debbugs.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=GSughBSORD/DpH+iWHfeiqUQImhFigvazjjneul+ngQ=; b=MkZPVgiFy3bhhKhPwmTanl4V2r8wwxqf2aDmCUktMIq+7ycI5+xMG0eh+73kJ5G5Ri FBqAjv6RyUXw/9NIisFd9vnnxlD2mETnhM0JbUeIrrC0qJ78VfIKx2Q0nKoRn8Z/mFDL 5pbzmYwGlACGpeqZy0M8ReoH2T8evey4Hnmy5u3blUkPiKXDWR9AWqZ2K0SB19FqXQmD G5Uvn2PHt+VqUpUIOdr/+d8WJ+Dj5P/iMcz6kGATTHQoCwkZVruwWRaRHaer+VBLZ1py 4ejbsnU3GgnfTW8SMyQ8QMbgPK3wHPs79/wqEu7rhuqUs9BRBJF4UeagmalFqdbhfJXu +sgQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703248646; x=1703853446; 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=GSughBSORD/DpH+iWHfeiqUQImhFigvazjjneul+ngQ=; b=WUijwdA24ZFsTS3XshcUSXzCabgGQ7dLSx1bgSE1nxPiEodxovStNxX2/ssRSQ2EeR iprbhQhiIFslUho+6MJQdaE1l+DWxEYyV99TtusdicSIMWDiOA/iXrRi3m4d4GNTsc2J 15hCiyrN2lzRdtXZHK/oiYTylOo+8q2QXfjEL8f6JvrNimxUOy++qnrwcRIOvK452mib I1i84mcMxSXKGmrzK51WeVSGYEGiG6cyq5D/GgzMQB1jG78C0BdQasc5ybcrnVwRpxal 3FW59gkgqHehngbUYXfrJL+gLIqht3Nqy/HV0tXycBgdaNR/GQzSh60QSU29YQ+F1Gxd E7Rw== X-Gm-Message-State: AOJu0YwGcgoRqYiMw0pETrZQwG23KRWPldiFBepSNC2yPvKE3JrWR5Vg X+EaRPuzIwMxwC2aBYEds3HOcnDIuaOYa03zgViHRxDgt/4Nqw== X-Google-Smtp-Source: AGHT+IGwyCVFMLTR9myTvDFmkTCH67pFQv8K+cvuMqm95ywKocQAXb9Gh3dymZEhtR5Kn0A4P8yF1w== X-Received: by 2002:a5d:6703:0:b0:336:64ba:39e7 with SMTP id o3-20020a5d6703000000b0033664ba39e7mr832870wru.102.1703248646360; Fri, 22 Dec 2023 04:37:26 -0800 (PST) Received: from jeandudey.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id s23-20020adf9797000000b00336813bb588sm4258959wrb.111.2023.12.22.04.37.25 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 04:37:26 -0800 (PST) Date: Fri, 22 Dec 2023 13:37:15 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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: , Reply-to: Jean-Pierre De Jesus DIAZ X-ACL-Warn: , Jean-Pierre De Jesus DIAZ via Guix-patches X-Patchwork-Original-From: Jean-Pierre De Jesus DIAZ via Guix-patches via From: Jean-Pierre De Jesus DIAZ 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 * guix/build-system/scons.scm (lower): Add cross compilation support. * guix/build-system/scons.scm (scons-build-cross): New procedure. Change-Id: I90413c4b573f17455b007672f701ac81f514e057 --- guix/build-system/scons.scm | 107 ++++++++++++++++++++++++++++++------ 1 file changed, 91 insertions(+), 16 deletions(-) diff --git a/guix/build-system/scons.scm b/guix/build-system/scons.scm index 6cbffcab63..3db007901c 100644 --- a/guix/build-system/scons.scm +++ b/guix/build-system/scons.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2017 Arun Isaac ;;; Copyright © 2021 Ludovic Courtès +;;; Copyright © 2023 Foundation Devices, Inc. ;;; ;;; This file is part of GNU Guix. ;;; @@ -56,22 +57,28 @@ (define* (lower name (define private-keywords '(#:target #:scons #:inputs #:native-inputs)) - (and (not target) ;XXX: no cross-compilation - (bag - (name name) - (system system) - (host-inputs `(,@(if source - `(("source" ,source)) - '()) - ,@inputs - - ;; Keep the standard inputs of 'gnu-build-system'. - ,@(standard-packages))) - (build-inputs `(("scons" ,scons) - ,@native-inputs)) - (outputs outputs) - (build scons-build) - (arguments (strip-keyword-arguments private-keywords arguments))))) + (bag + (name name) + (system system) + (target target) + (build-inputs `(("scons" ,scons) + ,@(if source + `(("source" ,source)) + '()) + ,@native-inputs + + ,@(if target '() inputs) + ,@(if target + (standard-cross-packages target 'host) + '()) + ,@(standard-packages system))) + (host-inputs (if target inputs '())) + (target-inputs (if target + (standard-cross-packages target 'target) + '())) + (outputs outputs) + (build (if target scons-build-cross scons-build)) + (arguments (strip-keyword-arguments private-keywords arguments)))) (define* (scons-build name inputs #:key @@ -122,6 +129,74 @@ (define* (scons-build name inputs #:graft? #f #:guile-for-build guile)) +(define* (scons-build-cross name + #:key + target + build-inputs target-inputs host-inputs + guile source + (tests? #f) + (scons-flags ''()) + (build-targets #~'()) + (test-target "test") + (install-targets #~'("install")) + (phases '%standard-phases) + (outputs '("out")) + (search-paths '()) + (native-search-paths '()) + (system (%current-system)) + (build (nix-system->gnu-triplet system)) + (imported-modules %scons-build-system-modules) + (modules '((guix build scons-build-system) + (guix build utils)))) + (define builder + #~(begin + (use-modules #$@(sexp->gexp modules)) + + (define %build-host-inputs + #+(input-tuples->gexp build-inputs)) + + (define %build-target-inputs + (append #$(input-tuples->gexp host-inputs) + #+(input-tuples->gexp target-inputs))) + + (define %build-inputs + (append %build-host-inputs %build-target-inputs)) + + (define %outputs + #$(outputs->gexp outputs)) + + (scons-build #:name #$name + #:source #+source + #:scons-flags #$(if (pair? scons-flags) + (sexp->gexp scons-flags) + scons-flags) + #:system #$system + #:build #$build + #:target #$target + #:build-targets #$build-targets + #:test-target #$test-target + #:tests? #$tests? + #:install-targets #$install-targets + #:phases #$(if (pair? phases) + (sexp->gexp phases) + phases) + #:outputs %outputs + #:inputs %build-target-inputs + #:native-inputs %build-host-inputs + #:search-paths '#$(sexp->gexp + (map search-path-specification->sexp + search-paths)) + #:native-search-paths '#$(sexp->gexp + (map search-path-specification->sexp + native-search-paths))))) + + (gexp->derivation name builder + #:system system + #:target target + #:graft? #f + #:modules imported-modules + #:guile-for-build guile)) + (define scons-build-system (build-system (name 'scons) From patchwork Fri Dec 22 12:37:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Jean-Pierre De Jesus DIAZ X-Patchwork-Id: 57985 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 6AD2027BBEA; Fri, 22 Dec 2023 12:38:43 +0000 (GMT) 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,URIBL_BLOCKED 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 3E63E27BBE2 for ; Fri, 22 Dec 2023 12:38:42 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGemu-0007JZ-Tc; Fri, 22 Dec 2023 07:38:00 -0500 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 1rGems-0007Hu-O5 for guix-patches@gnu.org; Fri, 22 Dec 2023 07:37:58 -0500 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 1rGems-0005VE-FL for guix-patches@gnu.org; Fri, 22 Dec 2023 07:37:58 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rGemw-0001ve-VR for guix-patches@gnu.org; Fri, 22 Dec 2023 07:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67969] [PATCH 3/4] gnu: make-nsis: Use cross-compilation. Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 22 Dec 2023 12:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67969 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67969@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ Received: via spool by 67969-submit@debbugs.gnu.org id=B67969.17032486697373 (code B ref 67969); Fri, 22 Dec 2023 12:38:02 +0000 Received: (at 67969) by debbugs.gnu.org; 22 Dec 2023 12:37:49 +0000 Received: from localhost ([127.0.0.1]:46205 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGemj-0001uq-3u for submit@debbugs.gnu.org; Fri, 22 Dec 2023 07:37:49 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:51562) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGemY-0001tr-Lr for 67969@debbugs.gnu.org; Fri, 22 Dec 2023 07:37:44 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-336788cb261so1410234f8f.3 for <67969@debbugs.gnu.org>; Fri, 22 Dec 2023 04:37:33 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1703248648; x=1703853448; darn=debbugs.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=OiJZxhiPmD5TSnGOvrqnjf5LBWd1lgh0s7Szkv6H0j8=; b=YXCnvgGeXUlCvdUBwc26b5l1pAFaQA/fK3AjWedi1sQceY5JxGrxwZDVip47CpaoTr tE9SDR7nRQORvvPUnnefrY8pikDR4lpE5hbuD1aFPYzn3hnCks6UCN8NiG4Ior2M/2F5 kDNYrvFTeaDEYoS2zoPSmzKl3yShzbTXx4NShGAS9L5tCIYfjD90Cb0s+uejHdhPoOBW F4SoDYvsb1+SW29X6GzhuLi5HFwGTihFAdnlI4P55ztEX0j60qNl+tUddx0DhhQcru29 f9s9M0984Wmw6SkQPe/G99JGAqM9Af/W8+MRruxslRunlfU3TzA97lKx/qCIu8kzJaTT PQPg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703248648; x=1703853448; 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=OiJZxhiPmD5TSnGOvrqnjf5LBWd1lgh0s7Szkv6H0j8=; b=DDvtBsbNx/r7uVcCEULcut6D5u3DjURHW0bNv3Suz2AUZeVhLv/WAmDYCImPE+stjv 8A3RtEes9wgJel0shMvNYhMMHQoevTs4bR/P/PXlpl7GOt1rDsdY6vchiqTYvDSm6lFr +OAW4570M4Yq5Dz+DM8QcvNXNzBREb9BdQwy3eCDFDtowiEfTP9bTHmbSsLmJREkvFYI uuB3ew1ny4qwXCeIKpcqU80qvO6yxPbPb8mLZDp666cCThq5wJKBUZsx2/MdYQAU0nAV /GjnOVFLuZSiEnGvVez4B+wgmCiVneeq6iEeMCD6T6bnWsl1yBdOmz3w1siDNgL+XZV4 a0qQ== X-Gm-Message-State: AOJu0Yypx33hDZstKTCLV5IO8xknbrQh+8LNBvHXXftUlhEes090E32c +/ZylPfK3rnH+Rj2w/CB8RZRUDwf84bjq6uj/RzHtatl9cGQow== X-Google-Smtp-Source: AGHT+IGrlNq+yJhs7ocBiVGWx3nGMkll3FLWMZKAW6qbsr7j/ipyDdH7K6oEI51J1sTQguONZLLPfQ== X-Received: by 2002:a5d:6484:0:b0:336:62c1:d0af with SMTP id o4-20020a5d6484000000b0033662c1d0afmr786921wri.60.1703248647834; Fri, 22 Dec 2023 04:37:27 -0800 (PST) Received: from jeandudey.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id s23-20020adf9797000000b00336813bb588sm4258959wrb.111.2023.12.22.04.37.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 04:37:27 -0800 (PST) Date: Fri, 22 Dec 2023 13:37:16 +0100 Message-ID: <6e3555889a02b74964be90697fe6f344f7d14615.1703248242.git.jean@foundationdevices.com> X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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: , Reply-to: Jean-Pierre De Jesus DIAZ X-ACL-Warn: , Jean-Pierre De Jesus DIAZ via Guix-patches X-Patchwork-Original-From: Jean-Pierre De Jesus DIAZ via Guix-patches via From: Jean-Pierre De Jesus DIAZ 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 * gnu/packages/installers.scm (make-nsis): Use `#:target' keyword argument in order to cross-compile the package. Change-Id: I403254a08f43bcd21e475807ea592c2f3908ff6b --- gnu/packages/installers.scm | 123 +++++++++++------------------------- 1 file changed, 37 insertions(+), 86 deletions(-) diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm index 9879359be7..67e91b908d 100644 --- a/gnu/packages/installers.scm +++ b/gnu/packages/installers.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Carl Dong +;;; Copyright © 2023 Foundation Devices, Inc. ;;; ;;; This file is part of GNU Guix. ;;; @@ -21,17 +22,14 @@ (define-module (gnu packages installers) #:use-module (gnu packages) #:use-module (gnu packages build-tools) #:use-module (gnu packages compression) - #:use-module (gnu packages cross-base) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix gexp) #:use-module (guix build-system scons) #:use-module (guix utils)) (define (make-nsis machine target-arch nsis-target-type) - (let* ((triplet (string-append machine "-" "w64-mingw32")) - (xbinutils (cross-binutils triplet)) - (xlibc (cross-libc triplet)) - (xgcc (cross-gcc triplet #:libc xlibc))) + (let ((target (string-append machine "-" "w64-mingw32"))) (package (name (string-append "nsis-" machine)) (version "3.09") @@ -44,88 +42,41 @@ (define (make-nsis machine target-arch nsis-target-type) "1qjnvhnj89a40ac10k2mbln0yqscdmawmgw71816i465x734dn0c")) (patches (search-patches "nsis-env-passthru.patch")))) (build-system scons-build-system) - (native-inputs `(("xgcc" ,xgcc) - ("xbinutils" ,xbinutils) - ("mingw-w64" ,xlibc))) - (inputs (list zlib)) (arguments - `(#:scons ,scons-python2 - #:modules ((srfi srfi-1) - (srfi srfi-26) - (guix build utils) - (guix build scons-build-system)) - #:tests? #f - #:scons-flags `("UNICODE=yes" - "SKIPUTILS=MakeLangId,Makensisw,NSIS Menu,SubStart,zip2exe" - "SKIPDOC=COPYING" - "STRIP_CP=no" - ,(string-append "PREFIX=" %output) - ,(string-append "TARGET_ARCH=" ,target-arch) - ,(string-append "XGCC_W32_PREFIX=" ,triplet "-") - ,(string-append "PREFIX_PLUGINAPI_INC=" (assoc-ref %build-inputs "mingw-w64") "/include/") - ,(string-append "PREFIX_PLUGINAPI_LIB=" (assoc-ref %build-inputs "mingw-w64") "/lib/")) - #:build-targets '("makensis" - "stubs" - "plugins" - "utils") - #:install-targets '("install-stubs" - "install-plugins" - "install-data" - "install-utils" - "install-compiler" - "install-conf") - #:phases (modify-phases %standard-phases - (add-before 'build 'fix-env - (lambda _ - (define* (filter-delimited-string delimited-string predicate #:optional (delimiter #\:)) - ;; Given a DELIMITED-STRING delimited by DELIMITER, - ;; only keep items that satisfy PREDICATE - (string-join - (filter predicate (string-split delimited-string delimiter)) - (string delimiter))) - (define (mingw-path? path) - (string-prefix? (assoc-ref %build-inputs "mingw-w64") path)) - (for-each - (lambda (env-name) - (let ((env-val (getenv env-name))) - ;; Remove all mingw-w64 paths from env vars meant - ;; for native toolchain - (setenv env-name - (filter-delimited-string env-val (negate mingw-path?))) - ;; Add the removed paths back into CROSS_-prefixed - ;; version of env vars - (setenv (string-append "CROSS_" env-name) - (filter-delimited-string env-val mingw-path?)))) - '("C_INCLUDE_PATH" "CPLUS_INCLUDE_PATH" "LIBRARY_PATH")) - ;; Hack to place mingw-w64 path at the end of search - ;; paths. Could probably use a specfile and dirafter - (setenv "CROSS_C_INCLUDE_PATH" - (string-join - `(,@(map (cut string-append - (assoc-ref %build-inputs "xgcc") - "/lib/gcc/" ,triplet "/" - ,(package-version xgcc) <>) - '("/include" - "/include-fixed")) - ,(getenv "CROSS_C_INCLUDE_PATH")) - ":")) - (setenv "CROSS_CPLUS_INCLUDE_PATH" - (string-join - `(,@(map (cut string-append (assoc-ref %build-inputs "xgcc") <>) - `("/include/c++" - ,(string-append "/include/c++/" ,triplet) - "/include/c++/backward" - ,@(map (cut string-append "/lib/gcc/" ,triplet "/" ,(package-version xgcc) <>) - '("/include" - "/include-fixed")))) - ,(getenv "CROSS_CPLUS_INCLUDE_PATH")) - ":")))) - (add-before 'build 'fix-target-detection - (lambda _ - ;; NSIS target detection is screwed up, manually change - ;; it ourselves - (substitute* "Source/build.cpp" (("m_target_type=TARGET_X86UNICODE") - (string-append "m_target_type=" ,nsis-target-type)))))))) + (list #:target target + #:scons scons-python2 + #:tests? #f + #:scons-flags + #~(let ((xlibc (assoc-ref %build-inputs "cross-libc"))) + (list "UNICODE=yes" + "SKIPUTILS=MakeLangId,Makensisw,NSIS Menu,SubStart,zip2exe" + "SKIPDOC=COPYING" + "STRIP_CP=no" + (string-append "PREFIX=" #$output) + (string-append "TARGET_ARCH=" #$target-arch) + (string-append "XGCC_W32_PREFIX=" #$target "-") + (string-append "PREFIX_PLUGINAPI_INC=" xlibc "/include/") + (string-append "PREFIX_PLUGINAPI_LIB=" xlibc "/lib/"))) + #:build-targets #~'("makensis" + "stubs" + "plugins" + "utils") + #:install-targets #~'("install-stubs" + "install-plugins" + "install-data" + "install-utils" + "install-compiler" + "install-conf") + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'fix-target-detection + (lambda _ + ;; NSIS target detection is screwed up, manually change + ;; it ourselves + (substitute* "Source/build.cpp" + (("m_target_type=TARGET_X86UNICODE") + (string-append "m_target_type=" #$nsis-target-type)))))))) + (native-inputs (list zlib)) (home-page "https://nsis.sourceforge.io/Main_Page") (synopsis "System to create Windows installers") (description From patchwork Fri Dec 22 12:37:17 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jean-Pierre De Jesus DIAZ X-Patchwork-Id: 57983 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 415F327BBE9; Fri, 22 Dec 2023 12:38:29 +0000 (GMT) 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,URIBL_BLOCKED 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 5298027BBE2 for ; Fri, 22 Dec 2023 12:38:28 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rGemt-0007J9-TO; Fri, 22 Dec 2023 07:37:59 -0500 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 1rGems-0007HF-93 for guix-patches@gnu.org; Fri, 22 Dec 2023 07:37:58 -0500 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 1rGems-0005Uw-0W for guix-patches@gnu.org; Fri, 22 Dec 2023 07:37:58 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rGemw-0001vW-HM for guix-patches@gnu.org; Fri, 22 Dec 2023 07:38:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#67969] [PATCH 4/4] gnu: make-nsis: Adjust description acronym. Resent-From: Jean-Pierre De Jesus DIAZ Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 22 Dec 2023 12:38:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67969 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 67969@debbugs.gnu.org Cc: Jean-Pierre De Jesus DIAZ Received: via spool by 67969-submit@debbugs.gnu.org id=B67969.17032486647356 (code B ref 67969); Fri, 22 Dec 2023 12:38:02 +0000 Received: (at 67969) by debbugs.gnu.org; 22 Dec 2023 12:37:44 +0000 Received: from localhost ([127.0.0.1]:46203 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGemd-0001uS-If for submit@debbugs.gnu.org; Fri, 22 Dec 2023 07:37:44 -0500 Received: from mail-wr1-x432.google.com ([2a00:1450:4864:20::432]:49154) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rGema-0001tt-Si for 67969@debbugs.gnu.org; Fri, 22 Dec 2023 07:37:41 -0500 Received: by mail-wr1-x432.google.com with SMTP id ffacd0b85a97d-33687627ad0so1446595f8f.2 for <67969@debbugs.gnu.org>; Fri, 22 Dec 2023 04:37:36 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=foundationdevices.com; s=google; t=1703248649; x=1703853449; darn=debbugs.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=rKEyKAbpYOPlDRpSltir5R/LkxH60iaRocpJEUXmbeA=; b=QO+lOAZkZndq175CdN68/MmrktVhj2nk4rBx6/FXRXJkQqGsUhKpMGIGcztP4Lu9fQ f4+xMGRdjBxuxnEDJF2PKW694CbwUbTgKVZRrtFfgjEY+U/7TWTtKIxfOJQvMrv0GjdT J4JbWqB30p3OLDscYUateLhQi4TBX5k4N1IUQIGzcI3S+9imyDRNgZRv2SzVEffn+7mT PqXp4vYMThXvfbew5sy9L/rAQJjtAL+yyyqeXfLQ8NSJ56Z1t+dvKn5OmaB1IVnNK8z0 RAAGJlaFJO/rA+2zmnlH+rmm6lhan8CQWv5zyaKE6fFGF9u+fsGRCMdrrCHlD6ytNPrD 3/jw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1703248649; x=1703853449; 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=rKEyKAbpYOPlDRpSltir5R/LkxH60iaRocpJEUXmbeA=; b=XiHSPK9l7YQri2k+MftSrMp6IsgnzJowuNxUqEgwULT7R6PxCryfPUkuUqZyUzcxbi xMIYFTnFyVyFFGc/K0q1pQQ4/wxOhSWufjBDYqfnoLi1BL78GS3yEajv/0eUstNbTpTO epSwg0UKvesFhrEZHf7W69tynruYIsbPGne5eQCQ9rl78inmRHKMjcHsAHMJyz6dfka3 p9WtdexOeR/tTRyeK/4w6YOwX4nLtM36U0cvrxgQ3iBJM/E3UePl62UEGPVv9QbBiVCY v7qdOx9a/5v+avO307wHa8N6oJAI3igM7lCREEwmrzOPgWDLan3Mrwz5os9RHH7hJ8C/ nhSQ== X-Gm-Message-State: AOJu0YzNvpor2IzFkjLc47REqdCnyYb5vueUzK7avKd0LBCXlwbNhL1X E725nYD7AYYC74fib0Vgh42WiyYLKj+Z7lsNu/ISNskuoI/WMA== X-Google-Smtp-Source: AGHT+IHYOwl2qclyRQDTqskA7a2lcefO721XCSulJJmZo8is05M9RK9Gdn5TrEwu5+YPWQW59Bh34g== X-Received: by 2002:adf:ed47:0:b0:336:73e6:8194 with SMTP id u7-20020adfed47000000b0033673e68194mr758077wro.28.1703248649465; Fri, 22 Dec 2023 04:37:29 -0800 (PST) Received: from jeandudey.home ([89.131.29.87]) by smtp.gmail.com with ESMTPSA id s23-20020adf9797000000b00336813bb588sm4258959wrb.111.2023.12.22.04.37.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 22 Dec 2023 04:37:29 -0800 (PST) Date: Fri, 22 Dec 2023 13:37:17 +0100 Message-ID: X-Mailer: git-send-email 2.41.0 In-Reply-To: References: 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: , Reply-to: Jean-Pierre De Jesus DIAZ X-ACL-Warn: , Jean-Pierre De Jesus DIAZ via Guix-patches X-Patchwork-Original-From: Jean-Pierre De Jesus DIAZ via Guix-patches via From: Jean-Pierre De Jesus DIAZ 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 * gnu/packages/installers.scm (make-nsis) : Use `@acronym' for NSIS. Change-Id: Ibff07455897542672affc1762d85009eaed0065a --- gnu/packages/installers.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/installers.scm b/gnu/packages/installers.scm index 67e91b908d..9a971d5081 100644 --- a/gnu/packages/installers.scm +++ b/gnu/packages/installers.scm @@ -80,9 +80,9 @@ (define (make-nsis machine target-arch nsis-target-type) (home-page "https://nsis.sourceforge.io/Main_Page") (synopsis "System to create Windows installers") (description - "NSIS (Nullsoft Scriptable Install System) is a system to create -Windows installers. It is designed to be as small and flexible as possible -and is therefore very suitable for internet distribution.") + "@acronym{NSIS, Nullsoft Scriptable Install System} is a system to +create Windows installers. It is designed to be as small and flexible as +possible and is therefore very suitable for internet distribution.") (license (license:non-copyleft "file://COPYING" "See COPYING in the distribution.")))))