;;; Copyright (C) 2020 Ahmet Artu Yildirim ;;; ;;; orca is free software: you can redistribute it and/or modify ;;; it under the terms of the GNU Lesser General Public License as ;;; published by the Free Software Foundation, either version 3 of ;;; the License, or (at your option) any later version. ;;; ;;; orca is distributed in the hope that it will be useful, ;;; but WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU Lesser General Public License for more details. ;;; ;;; You should have received a copy of the GNU Lesser General Public License ;;; along with orca. If not, see . (use-modules (ice-9 match) (ice-9 popen) (ice-9 rdelim) (srfi srfi-1) (srfi srfi-26) (guix gexp) (guix packages) (guix licenses) (guix git-download) (guix build-system gnu) ((guix build utils) #:select (with-directory-excursion)) (gnu packages) (gnu packages autotools) (gnu packages guile) (gnu packages pkg-config) (gnu packages geo) (gnu packages texinfo)) (define %source-dir (dirname (current-filename))) (define git-file? (let* ((pipe (with-directory-excursion %source-dir (open-pipe* OPEN_READ "git" "ls-files"))) (files (let loop ((lines '())) (match (read-line pipe) ((? eof-object?) (reverse lines)) (line (loop (cons line lines)))))) (status (close-pipe pipe))) (lambda (file stat) (match (stat:type stat) ('directory #t) ((or 'regular 'symlink) (any (cut string-suffix? <> file) files)) (_ #f))))) (package (name "guile-orca") (version "0.1.0") (source (local-file %source-dir #:recursive? #t #:select? git-file?)) (build-system gnu-build-system) (arguments '(#:configure-flags (list (string-append "--with-libmpi-path=" (assoc-ref %build-inputs "libmpich") "libmpich.so")) #:make-flags '("GUILE_AUTO_COMPILE=0") #:phases (modify-phases %standard-phases (add-after 'unpack 'bootstrap (lambda _ (zero? (system* "sh" "bootstrap"))))))) (native-inputs `(("autoconf" ,autoconf) ("automake" ,automake) ("pkg-config" ,pkg-config) ("texinfo" ,texinfo))) (inputs `(("guile" ,guile-2.2) ("libmpich" ,libmpich))) (synopsis "RPC library for Guile") (description "Guile-orca library aims to provide Remote Procedure Call (RPC) capabilities using Message Passing Interface (MPI).") (home-page "https://github.com/ayild/guile-orca") (license lgpl3+))