unofficial mirror of guix-patches@gnu.org 
 help / color / mirror / code / Atom feed
From: Artyom Bologov <mail@aartaka.me>
To: 69820@debbugs.gnu.org
Subject: [bug#69820] [PATCH] gnu: Add guile-gsl.
Date: Thu, 21 Mar 2024 00:15:23 +0400	[thread overview]
Message-ID: <87v85gveu7.fsf@aartaka.me> (raw)
In-Reply-To: <87jzm3b2nr.fsf@aartaka.me>

[-- Attachment #1: Type: text/plain, Size: 90 bytes --]

Hi y'all,

Sorry, I added the wrong email to the previous patch, here's the updated
one:


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Add guile-gsl --]
[-- Type: text/x-patch, Size: 2550 bytes --]

From 0185af4d2c467a45de568d1193f76cfcf23e8bab Mon Sep 17 00:00:00 2001
From: Artyom Bologov <mail@aartaka.me>
Date: Sat, 16 Mar 2024 01:11:09 +0400
Subject: [PATCH] gnu: Add guile-gsl.

* gnu/packages/guile-xyz.scm (guile-gsl): New variable.
---
 gnu/packages/guile-xyz.scm | 40 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 40 insertions(+)

diff --git a/gnu/packages/guile-xyz.scm b/gnu/packages/guile-xyz.scm
index 9d683199ac..3c85c35b45 100644
--- a/gnu/packages/guile-xyz.scm
+++ b/gnu/packages/guile-xyz.scm
@@ -1438,6 +1438,46 @@ (define-public guile-algorithms
     (home-page "https://guile-algorithms.lajszczak.dev/")
     (license license:gpl3+)))
 
+(define-public guile-gsl
+  (let ((commit "739a0ddcf00fdf4bdd409e6dd75de23e01aceded")
+        (revision "0"))
+    (package
+      (name "guile-gsl")
+      (version (git-version "0.0.1" revision commit))
+      (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
+                  "0x0z5xx6jx5zhjy83zi7l9mzi65v58wl2khf11q5d2vf4hya16bb"))))
+      (build-system guile-build-system)
+      (arguments
+       (list #:source-directory "modules"
+             #:phases
+             #~(modify-phases %standard-phases
+                 (add-before 'build 'substitute-gsl-so
+                   (lambda _
+                     (let ((gsl (string-append #$(this-package-input "gsl")
+                                               "/lib/libgsl.so"))
+                           (gslcblas (string-append #$(this-package-input "gsl")
+                                                    "/lib/libgslcblas.so")))
+                       (substitute* '("modules/gsl/core.scm")
+                         (("libgsl.so")
+                          gsl)
+                         (("libgslcblas.so")
+                          gslcblas))
+                       #t))))))
+      (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.")
+      (description "Scheme wrapper around @code{libgsl.so}.
+Implements vector, matrix, and BLAS operations.")
+      (license license:gpl3+))))
+
 (define-public guile-aws
   (let ((commit "f32bea12333e1054b97ab50e58a72636edabb5b7")
         (revision "1"))
-- 
2.41.0


  reply	other threads:[~2024-03-20 20:17 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-03-15 21:31 [bug#69820] [PATCH] gnu: Add guile-gsl Artyom Bologov
2024-03-20 20:15 ` Artyom Bologov [this message]
2024-04-04 11:25 ` bug#69820: " Sharlatan Hellseher

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87v85gveu7.fsf@aartaka.me \
    --to=mail@aartaka.me \
    --cc=69820@debbugs.gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).