gnu: Add guile-ffi-fftw.

* gnu/packages/guile-xyz.scm (guile-ffi-fftw): New variable.
This commit is contained in:
Ricardo Wurmus 2019-10-29 12:58:10 +01:00
parent 9b6410b96a
commit 7ff157c16c
No known key found for this signature in database
GPG key ID: 197A5888235FACAC

View file

@ -41,6 +41,7 @@
(define-module (gnu packages guile-xyz)
#:use-module ((guix licenses) #:prefix license:)
#:use-module (gnu packages)
#:use-module (gnu packages algebra)
#:use-module (gnu packages aspell)
#:use-module (gnu packages autotools)
#:use-module (gnu packages base)
@ -2608,3 +2609,47 @@ (define-public guile-cv
enriched with pure Guile Scheme algorithms, all accessible through a nice,
clean and easy to use high level API.")
(license license:gpl3+)))
(define-public guile-ffi-fftw
(let ((commit "95d7ffb55860f3163c5283ecec1ef43bc3d174dd")
(revision "1"))
(package
(name "guile-ffi-fftw")
(version (git-version "0" revision commit))
(source (origin
(method git-fetch)
(uri (git-reference
(url "https://github.com/lloda/guile-ffi-fftw.git")
(commit commit)))
(file-name (git-file-name "guile-ffi-fftw" version))
(sha256
(base32
"0v9vk9cr4x9gn36lihi9gfkxyiqak0i598v5li6qw8bg95004p49"))))
(build-system guile-build-system)
(arguments
`(#:source-directory "mod"
#:phases
(modify-phases %standard-phases
(add-after 'unpack 'prepare-build
(lambda* (#:key inputs #:allow-other-keys)
(substitute* "mod/ffi/fftw.scm"
(("\\(getenv \"GUILE_FFI_FFTW_LIBFFTW3_PATH\"\\)")
(format #f "\"~a/lib\"" (assoc-ref inputs "fftw"))))
#t))
(add-after 'build 'check
(lambda _
(invoke "guile" "-L" "mod"
"-s" "test/test-ffi-fftw.scm"))))))
(inputs
`(("fftw" ,fftw)
("guile" ,guile-2.2)))
(home-page "https://github.com/lloda/guile-ffi-fftw/")
(synopsis "Access FFTW through Guile's FFI")
(description "This is a minimal set of Guile FFI bindings for the FFTW
library's guru interface. It provides two functions: @code{fftw-dft! rank
sign in out} and @code{fftw-dft rank sign in}. These bindings being minimal,
there is no support for computing & reusing plans, or split r/i transforms, or
anything other than straight complex DFTs.")
;; TODO: This might actually be LGPLv3+
;; See https://github.com/lloda/guile-ffi-fftw/issues/1
(license license:gpl3+))))