From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40397) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ffttb-00080K-QQ for guix-patches@gnu.org; Wed, 18 Jul 2018 17:22:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fftta-0003RF-Mp for guix-patches@gnu.org; Wed, 18 Jul 2018 17:22:03 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:42228) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fftta-0003RA-I7 for guix-patches@gnu.org; Wed, 18 Jul 2018 17:22:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fftta-0007nH-Cf for guix-patches@gnu.org; Wed, 18 Jul 2018 17:22:02 -0400 Subject: [bug#32205] [PATCH 3/3] gnu: Add guile-pfds. Resent-Message-ID: From: Ludovic =?UTF-8?Q?Court=C3=A8s?= Date: Wed, 18 Jul 2018 23:20:43 +0200 Message-Id: <20180718212043.17270-3-ludo@gnu.org> In-Reply-To: <20180718212043.17270-1-ludo@gnu.org> References: <20180718212043.17270-1-ludo@gnu.org> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 32205@debbugs.gnu.org * gnu/packages/guile.scm (guile-pfds): New variable. --- gnu/packages/guile.scm | 72 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index 2dd04917a..f179f293e 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -1974,6 +1974,78 @@ It has a nice, simple s-expression based syntax.") "Guile-colorized provides you with a colorized REPL for GNU Guile.") (license license:gpl3+))) +(define-public guile-pfds + (package + (name "guile-pfds") + (version "0.3") + (home-page "https://github.com/ijp/pfds") + (source (origin + (method git-fetch) + (uri (git-reference + (url home-page) + (commit (string-append "v" version)))) + (sha256 + (base32 + "19y33wg94pf0n98dkfqd1zbw93fgky4sawxsxl6s3vyqwl0yi5vh")) + (file-name (string-append name "-" version "-checkout")))) + (build-system guile-build-system) + (arguments + '(#:source-directory "src" + #:phases (modify-phases %standard-phases + (add-after 'unpack 'move-files-around + (lambda _ + ;; Move files under a pfds/ directory to reflect the + ;; module hierarchy. + (mkdir-p "src/pfds") + (for-each (lambda (file) + (rename-file file + (string-append "src/pfds/" + file))) + '("bbtrees.sls" + "deques" + "deques.sls" + "dlists.sls" + "fingertrees.sls" + "hamts.sls" + "heaps.sls" + "private" + "psqs.sls" + "queues" + "queues.sls" + "sequences.sls" + "sets.sls")) + + ;; In Guile <= 2.2.4, there's no way to tell 'guild + ;; compile' to accept the ".sls" extension. So... + (for-each (lambda (file) + (rename-file file + (string-append + (string-drop-right file 4) + ".scm"))) + (find-files "." "\\.sls$")) + #t))))) + (native-inputs + `(("guile" ,guile-2.2))) + (synopsis "Purely functional data structures for Guile") + (description + "This package provides purely functional data structures written in R6RS +Scheme and compiled for Guile. It has been tested with Racket, Guile 2, +Vicare Scheme and IronScheme. Right now it contains: + +@itemize +@item queues +@item deques +@item bbtrees +@item sets +@item dlists +@item priority search queues (PSQs) +@item finger trees +@item sequences +@item heaps +@item hash array mapped tries (HAMTs). +@end itemize\n") + (license license:bsd-3))) + (define-public guile-simple-zmq (let ((commit "1f3b7c0b9b249c6fde8e8a632b252d8a1b794424") (revision "1")) -- 2.18.0