From patchwork Tue Feb 27 22:56:12 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Artyom Bologov X-Patchwork-Id: 61185 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 6A02727BBEA; Tue, 27 Feb 2024 23:41:16 +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=0.6 required=5.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,MAILING_LIST_MULTI,RCVD_IN_SBL_CSS,SPF_HELO_PASS, URIBL_BLOCKED autolearn=no 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 C367827BBE2 for ; Tue, 27 Feb 2024 23:41:10 +0000 (GMT) Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1rf74C-0006vJ-7V; Tue, 27 Feb 2024 18:40:57 -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 1rf73v-0006qK-Tz for guix-patches@gnu.org; Tue, 27 Feb 2024 18:40:40 -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 1rf73u-0006rk-5h for guix-patches@gnu.org; Tue, 27 Feb 2024 18:40:39 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1rf74J-0002v8-9W for guix-patches@gnu.org; Tue, 27 Feb 2024 18:41:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#69443] [PATCH] gnu: Add guile-gsl. Resent-From: Artyom Bologov Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Tue, 27 Feb 2024 23:41:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 69443 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 69443@debbugs.gnu.org X-Debbugs-Original-To: Guix patches Received: via spool by submit@debbugs.gnu.org id=B.170907721111066 (code B ref -1); Tue, 27 Feb 2024 23:41:03 +0000 Received: (at submit) by debbugs.gnu.org; 27 Feb 2024 23:40:11 +0000 Received: from localhost ([127.0.0.1]:37405 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rf73S-0002sP-K5 for submit@debbugs.gnu.org; Tue, 27 Feb 2024 18:40:11 -0500 Received: from lists.gnu.org ([209.51.188.17]:46570) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1rf73L-0002r1-Ph for submit@debbugs.gnu.org; Tue, 27 Feb 2024 18:40:05 -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 1rf6Uz-0003we-39 for guix-patches@gnu.org; Tue, 27 Feb 2024 18:04:33 -0500 Received: from mta-12-4.privateemail.com ([198.54.127.107]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1rf6Ux-0002ZU-7I for guix-patches@gnu.org; Tue, 27 Feb 2024 18:04:32 -0500 Received: from mta-12.privateemail.com (localhost [127.0.0.1]) by mta-12.privateemail.com (Postfix) with ESMTP id 3A3ED18000B3 for ; Tue, 27 Feb 2024 18:04:23 -0500 (EST) DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=aartaka.me; s=default; t=1709075063; bh=kFc4C33nPhyzaBrzCZ8hT1n971W+tz56SYnLldljThQ=; h=From:To:Subject:Date:From; b=dEEwtBcl/pP7UoxT9XHP9TWiTTh4OG6GUUvDH+t5+qghFr5X1umlACcKufH5zv0VW 6EEL0KOYrIbrxO1L4RGOupftldYMvnl3pMlIPt0vG0m3YsLQE3VN2h1NzmKPYdlYty LBDobgLuyBlr6Ra/oUyzQ8Yh6vI7Hk/v0n51wY3sMxjg/y+Oc1FHmFtTXDIbxxAuPt CnkmhC+j7MxpCRZh4A6t4GpoHl8sJ2ikoZKswbqhSZ8V/bqF54UJdEkaSQxiWIgNKJ W3N6ZII6Lomkjj3TJw5rnk299HhZqypKGr4whlrz7Z883sjses/F8J+DtqQTT7NBMv FS09EVj17dRBg== Received: from paranoidal (unknown [185.167.217.34]) by mta-12.privateemail.com (Postfix) with ESMTPA for ; Tue, 27 Feb 2024 18:04:22 -0500 (EST) User-agent: mu4e 1.10.8; emacs 29.1 From: Artyom Bologov Date: Wed, 28 Feb 2024 02:56:12 +0400 Message-ID: <877ciptsq4.fsf@aartaka.me> MIME-Version: 1.0 X-Virus-Scanned: ClamAV using ClamSMTP Received-SPF: pass client-ip=198.54.127.107; envelope-from=mail@aartaka.me; helo=MTA-12-4.privateemail.com X-Spam_score_int: 16 X-Spam_score: 1.6 X-Spam_bar: + X-Spam_report: (1.6 / 5.0 requ) BAYES_00=-1.9, DKIM_INVALID=0.1, DKIM_SIGNED=0.1, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-0.001, RCVD_IN_SBL_CSS=3.335, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001, T_SCC_BODY_TEXT_LINE=-0.01 autolearn=no 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 Hi y'all, This is both a patch submission and a call for help—I'm far out of my waters with this package and am not sure of the proper Guix-y way to build it. So the build sequence for Guile GSL is: (1) Compile a bundled libguilegslblas.so with a C compiler, using the GSL libraries from package inputs. (2) Put proper paths to the GSL libraries and libguilegslblas into the Scheme files. (3) Compile Scheme files as per guile-build-system. I've got (2) and (3) more or less working. The problem is: which build system should I use and how do I synthesize GNU build system (makefile, libguilegslblas.so, (1)) and Guile one? You can find my draft (doesn't build and is not usable in general) patch attached below. Any help appreciated! Thanks, --- Artyom Bologov. From 5bd38a674fff008c189d1c39495d771354c945fb Mon Sep 17 00:00:00 2001 From: Artyom Bologov Date: Wed, 28 Feb 2024 02:54:31 +0400 Subject: [PATCH] gnu: Add guile-gsl. * gnu/packages/guile-xyz.scm (guile-gsl): New variable. --- gnu/packages/guile-xyz.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm index b34472d5bd..6b9492c4b7 100644 --- a/gnu/packages/guile-xyz.scm +++ b/gnu/packages/guile-xyz.scm @@ -4474,6 +4474,40 @@ (define-public guile-ffi-cblas function: raw, typed, and functional.") (license license:lgpl3+)))) +(define-public guile-gsl + (let ((commit "8540bcb6afa9be37153852255608d26d5a4df9dd") + (revision "0")) + (package + (name "guile-gsl") + (version "0.0.1") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/aartaka/guile-gsl") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "00dy33ibvfhzs5xp65g4g8d02wy4fiamjbp3pg87cghg41q4lwkr")))) + (build-system guile-build-system) + (arguments + '(#:source-directory "modules" + #:phases + #~(modify-phases %standard-phases + (add-before 'build 'substitute-gsl-so + (lambda _ + (let ((gsl (string-append #$(this-package-input "lmdb") + "/lib/libgsl.so"))) + (substitute* "modules/gsl/core.scm" + (("libgsl.so") gsl)))))))) + (native-inputs (list guile-3.0)) + (inputs (list guile-3.0 gsl)) + (home-page "https://github.com/aartaka/guile-gsl") + (synopsis "Bindings for GNU Scientific library in Guile.") + (description "This package provides Guile Scheme wrapper for libgsl.so. +Only vector, matrix, and BLAS operations are covered for now.") + (license license:gpl3+)))) + (define-public guile-ffi-fftw (let ((commit "294ad9e7491dcb40026d2fec9be2af05263be1c0") (revision "2")) -- 2.41.0