gnu: Add python-igraph.
[jackhill/guix/guix.git] / gnu / packages / graph.scm
1 ;;; GNU Guix --- Functional package management for GNU
2 ;;; Copyright © 2017 Ricardo Wurmus <rekado@elephly.net>
3 ;;;
4 ;;; This file is part of GNU Guix.
5 ;;;
6 ;;; GNU Guix is free software; you can redistribute it and/or modify it
7 ;;; under the terms of the GNU General Public License as published by
8 ;;; the Free Software Foundation; either version 3 of the License, or (at
9 ;;; your option) any later version.
10 ;;;
11 ;;; GNU Guix is distributed in the hope that it will be useful, but
12 ;;; WITHOUT ANY WARRANTY; without even the implied warranty of
13 ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 ;;; GNU General Public License for more details.
15 ;;;
16 ;;; You should have received a copy of the GNU General Public License
17 ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
18
19 (define-module (gnu packages graph)
20 #:use-module (guix download)
21 #:use-module (guix packages)
22 #:use-module (guix build-system gnu)
23 #:use-module (guix build-system python)
24 #:use-module ((guix licenses) #:prefix license:)
25 #:use-module (gnu packages)
26 #:use-module (gnu packages compression)
27 #:use-module (gnu packages maths)
28 #:use-module (gnu packages multiprecision)
29 #:use-module (gnu packages pkg-config)
30 #:use-module (gnu packages xml))
31
32 (define-public igraph
33 (package
34 (name "igraph")
35 (version "0.7.1")
36 (source
37 (origin
38 (method url-fetch)
39 (uri (string-append "http://igraph.org/nightly/get/c/igraph-"
40 version ".tar.gz"))
41 (sha256
42 (base32
43 "1pxh8sdlirgvbvsw8v65h6prn7hlm45bfsl1yfcgd6rn4w706y6r"))))
44 (build-system gnu-build-system)
45 (arguments
46 `(#:configure-flags
47 (list "--with-external-glpk"
48 "--with-external-blas"
49 "--with-external-lapack")))
50 (inputs
51 `(("gmp" ,gmp)
52 ("glpk" ,glpk)
53 ("libxml2" ,libxml2)
54 ("lapack" ,lapack)
55 ("openblas" ,openblas)
56 ("zlib" ,zlib)))
57 (home-page "http://igraph.org")
58 (synopsis "Network analysis and visualization")
59 (description
60 "This package provides a library for the analysis of networks and graphs.
61 It can handle large graphs very well and provides functions for generating
62 random and regular graphs, graph visualization, centrality methods and much
63 more.")
64 (license license:gpl2+)))
65
66 (define-public python-igraph
67 (package (inherit igraph)
68 (name "python-igraph")
69 (version "0.7.1.post6")
70 (source
71 (origin
72 (method url-fetch)
73 (uri (pypi-uri "python-igraph" version))
74 (sha256
75 (base32
76 "0xp61zz710qlzhmzbfr65d5flvsi8zf2xy78s6rsszh719wl5sm5"))))
77 (build-system python-build-system)
78 (arguments '())
79 (inputs
80 `(("igraph" ,igraph)))
81 (native-inputs
82 `(("pkg-config" ,pkg-config)))
83 (home-page "http://pypi.python.org/pypi/python-igraph")
84 (synopsis "Python bindings for the igraph network analysis library")))