From patchwork Fri Oct 18 20:42:06 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Guillaume Le Vaillant X-Patchwork-Id: 15767 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 53B2A175D2; Fri, 18 Oct 2019 21:43:27 +0100 (BST) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on mira.cbaines.net X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,T_DKIM_INVALID, URIBL_BLOCKED autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) by mira.cbaines.net (Postfix) with ESMTP id C9D47175D2 for ; Fri, 18 Oct 2019 21:43:26 +0100 (BST) Received: from localhost ([::1]:45916 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLZ5q-0006VL-Bi for patchwork@mira.cbaines.net; Fri, 18 Oct 2019 16:43:26 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:50179) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iLZ5Y-0006HI-FY for guix-patches@gnu.org; Fri, 18 Oct 2019 16:43:10 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iLZ5W-000645-0j for guix-patches@gnu.org; Fri, 18 Oct 2019 16:43:08 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:42835) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1iLZ5V-00063q-TF for guix-patches@gnu.org; Fri, 18 Oct 2019 16:43:05 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1iLZ5V-0001Cm-Pp for guix-patches@gnu.org; Fri, 18 Oct 2019 16:43:05 -0400 X-Loop: help-debbugs@gnu.org Subject: [bug#37817] [PATCH 7/7] gnu: Add graph. Resent-From: Guillaume Le Vaillant Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Fri, 18 Oct 2019 20:43:05 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 37817 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 37817@debbugs.gnu.org Cc: Guillaume Le Vaillant Received: via spool by 37817-submit@debbugs.gnu.org id=B37817.15714313824589 (code B ref 37817); Fri, 18 Oct 2019 20:43:05 +0000 Received: (at 37817) by debbugs.gnu.org; 18 Oct 2019 20:43:02 +0000 Received: from localhost ([127.0.0.1]:51650 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iLZ5R-0001Bm-LD for submit@debbugs.gnu.org; Fri, 18 Oct 2019 16:43:02 -0400 Received: from mout02.posteo.de ([185.67.36.66]:56839) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1iLZ5M-0001Ar-Dd for 37817@debbugs.gnu.org; Fri, 18 Oct 2019 16:43:00 -0400 Received: from submission (posteo.de [89.146.220.130]) by mout02.posteo.de (Postfix) with ESMTPS id B87D92400FC for <37817@debbugs.gnu.org>; Fri, 18 Oct 2019 22:42:50 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.net; s=2017; t=1571431370; bh=PBEU8yV/L5asZUk/K4p0HhDkPagLwotVGqZIqH4yfw8=; h=From:To:Cc:Subject:Date:From; b=kR2KGFUp9mWM3ZUXdMsvn4JJXIF5leWspV3SOqyXYCub4PP2Ug0suprgufJJRb5a5 wU6fY4OYDmv6V0lNXA1GnPDUYjXhrycctCvXG8R/DNutV1R5Az3H7WjIxYiAA2UXI7 Oq1dhhiGzOHMQBb/0wCCL4EcF+aLQXD5iwru19cM+IgKkQjQmprx7PB37cKEsqCjXB Gcb3JrUb8LIPX4sUBkuAUbOy2CPqgaNmWT6HssMIs2LtPxyrNErBfoeSje0wwkkxfn 1qwN1TnTv98YLKJNSFO+TJ7huPz7puUtjbvqB1K2cV2DSGgqOWUMURnwKg/1ONYhyN ZOEFuEQYkPLWA== Received: from customer (localhost [127.0.0.1]) by submission (posteo.de) with ESMTPSA id 46vyf142mbz9rxB; Fri, 18 Oct 2019 22:42:49 +0200 (CEST) From: Guillaume Le Vaillant Date: Fri, 18 Oct 2019 22:42:06 +0200 Message-Id: <20191018204206.15154-7-glv@posteo.net> X-Mailer: git-send-email 2.23.0 In-Reply-To: <20191018204206.15154-1-glv@posteo.net> References: <87k191x006.fsf@yamatai> <20191018204206.15154-1-glv@posteo.net> MIME-Version: 1.0 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.51.188.43 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" X-getmail-retrieved-from-mailbox: Patches * gnu/packages/lisp.scm (cl-graph, sbcl-graph): New variables. * gnu/packages/patches/sbcl-graph-asdf-definitions.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/lisp.scm | 74 +++++++++++++++++++ .../patches/sbcl-graph-asdf-definitions.patch | 70 ++++++++++++++++++ 3 files changed, 145 insertions(+) create mode 100644 gnu/packages/patches/sbcl-graph-asdf-definitions.patch diff --git a/gnu/local.mk b/gnu/local.mk index 3fbfe0f2bb..30c2b4e27b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1312,6 +1312,7 @@ dist_patch_DATA = \ %D%/packages/patches/rust-coresimd-doctest.patch \ %D%/packages/patches/rust-reproducible-builds.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ + %D%/packages/patches/sbcl-graph-asdf-definitions.patch \ %D%/packages/patches/scalapack-blacs-mpi-deprecations.patch \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-build-parallelism.patch \ diff --git a/gnu/packages/lisp.scm b/gnu/packages/lisp.scm index c69a8cac6b..eab4214740 100644 --- a/gnu/packages/lisp.scm +++ b/gnu/packages/lisp.scm @@ -7976,3 +7976,77 @@ interactive development.") (define-public cl-stefil (sbcl-package->cl-source-package sbcl-stefil)) + +(define-public sbcl-graph + (let ((commit "78bf9ec930d8eae4f0861b5be76765fb1e45e24f") + (revision "0")) + (package + (name "sbcl-graph") + (version (git-version "0.0.0" revision commit)) + (source + (origin + (method git-fetch) + (uri + (git-reference + (url "https://github.com/eschulte/graph.git") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1qpij4xh8bqwc2myahpilcbh916v7vg0acz2fij14d3y0jm02h0g")) + (patches (search-patches "sbcl-graph-asdf-definitions.patch")))) + (build-system asdf-build-system/sbcl) + (native-inputs + `(("stefil" ,sbcl-stefil))) + (inputs + `(("alexandria" ,sbcl-alexandria) + ("cl-heap" ,sbcl-cl-heap) + ("curry-compose-reader-macros" ,sbcl-curry-compose-reader-macros) + ("metabang-bind" ,sbcl-metabang-bind) + ("named-readtables" ,sbcl-named-readtables))) + (arguments + '(#:test-asd-file "graph.test.asd")) + (synopsis "Graph data structure and algorithms for Common Lisp") + (description + "The GRAPH Common Lisp library provides a data structures to represent +graphs, as well as some graph manipulation and analysis algorithms (shortest +path, maximum flow, minimum spanning tree, etc.).") + (home-page "https://eschulte.github.io/graph/") + (license license:gpl3+)))) + +(define-public cl-graph + (sbcl-package->cl-source-package sbcl-graph)) + +(define-public sbcl-graph-dot + (package + (inherit sbcl-graph) + (name "sbcl-graph-dot") + (inputs + `(("alexandria" ,sbcl-alexandria) + ("cl-ppcre" ,sbcl-cl-ppcre) + ("curry-compose-reader-macros" ,sbcl-curry-compose-reader-macros) + ("graph" ,sbcl-graph) + ("metabang-bind" ,sbcl-metabang-bind) + ("named-readtables" ,sbcl-named-readtables))) + (arguments + (substitute-keyword-arguments (package-arguments sbcl-graph) + ((#:asd-file _ "") "graph.dot.asd") + ((#:asd-system-name _ #f) "graph-dot"))) + (synopsis "Serialize graphs to and from DOT format"))) + +(define-public sbcl-graph-json + (package + (inherit sbcl-graph) + (name "sbcl-graph-json") + (inputs + `(("alexandria" ,sbcl-alexandria) + ("curry-compose-reader-macros" ,sbcl-curry-compose-reader-macros) + ("graph" ,sbcl-graph) + ("metabang-bind" ,sbcl-metabang-bind) + ("named-readtables" ,sbcl-named-readtables) + ("yason" ,sbcl-yason))) + (arguments + (substitute-keyword-arguments (package-arguments sbcl-graph) + ((#:asd-file _ "") "graph.json.asd") + ((#:asd-system-name _ #f) "graph-json"))) + (synopsis "Serialize graphs to and from JSON format"))) diff --git a/gnu/packages/patches/sbcl-graph-asdf-definitions.patch b/gnu/packages/patches/sbcl-graph-asdf-definitions.patch new file mode 100644 index 0000000000..a528ccfcc6 --- /dev/null +++ b/gnu/packages/patches/sbcl-graph-asdf-definitions.patch @@ -0,0 +1,70 @@ +commit 52ebece1243ae6900e414b6248b5145a28348eef +Author: Guillaume Le Vaillant +Date: Fri Oct 18 15:41:23 2019 +0200 + + Use basic ASDF system definitions instead of package-inferred-system + +diff --git a/graph.asd b/graph.asd +index 193b6e3..56afc8f 100644 +--- a/graph.asd ++++ b/graph.asd +@@ -3,12 +3,10 @@ + :version "0.0.0" + :author ("Eric Schulte " "Thomas Dye") + :licence "GPL V3" +- :class :package-inferred-system +- :defsystem-depends-on (:asdf-package-system) ++ :in-order-to ((test-op (test-op graph-test))) + :depends-on (alexandria + metabang-bind + named-readtables + curry-compose-reader-macros +- graph/graph)) +- +-(register-system-packages "femlisp-matlisp" '(:fl.matlisp)) ++ cl-heap) ++ :components ((:file "graph"))) +diff --git a/graph.dot.asd b/graph.dot.asd +new file mode 100644 +index 0000000..12aec7e +--- /dev/null ++++ b/graph.dot.asd +@@ -0,0 +1,8 @@ ++(defsystem :graph-dot ++ :depends-on (alexandria ++ metabang-bind ++ named-readtables ++ curry-compose-reader-macros ++ cl-ppcre ++ graph) ++ :components ((:file "dot"))) +diff --git a/graph.json.asd b/graph.json.asd +new file mode 100644 +index 0000000..e7d091f +--- /dev/null ++++ b/graph.json.asd +@@ -0,0 +1,8 @@ ++(defsystem :graph-json ++ :depends-on (alexandria ++ metabang-bind ++ named-readtables ++ curry-compose-reader-macros ++ yason ++ graph) ++ :components ((:file "json"))) +diff --git a/graph.test.asd b/graph.test.asd +new file mode 100644 +index 0000000..1e811e1 +--- /dev/null ++++ b/graph.test.asd +@@ -0,0 +1,10 @@ ++(defsystem :graph-test ++ :depends-on (alexandria ++ metabang-bind ++ named-readtables ++ curry-compose-reader-macros ++ graph ++ stefil) ++ :perform (test-op (o s) ++ (uiop:symbol-call :graph/test 'test)) ++ :components ((:file "test")))